-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to compare between two branches #4
Comments
I've been slowly working on a similar plugin at work, so thanks for open sourcing this and finishing my work for me! 😆 For instance, what I was working on, the main focus was for CI so my branches would be a remote branch, not local (although I was planning on a way to config local vs remote). Would need to handle a situation where the branch does not exists, is there a fallback or do you error? If I were to try and spend some time implementing this enhancement, do you have any guidance on what you would like to see for this enhancement? Please don't wait for me to get around to this enhancement as my day to day varies on how much coding I can do. |
Glad to hear this is helpful for you! We currently only support running on the local branch and will assume the last commit has all the changes to consider. This is a byproduct of how our CI system works, but understand most aren't like this. If this was to be added, I would expect that we'd want to allow configuration via the extension And then updating the GitClient to make the appropriate queries into git. |
I'm planning to take this issue up today |
Merged preliminary config. I need to push it down to module granularity next |
I was also thinking of another ability for the plugin: comparing the changes of the current branch to the parent fork point. Would this be ok to implement? If so, I noticed in the thread above you mentioned to implement a similar extension to this plugin "allow configuration via the extension". Am I along the right lines in thinking of adding a Something like this? https://gist.github.com/jonnycaley/ad196a3a258dfb0e271a4a261a646426 If not, no worries 😄 |
Yup makes sense! I've added the base git logic here. It just needs to be enabled if the extension has a prop. Line 183 in 54bf063
I can finish impl over holidays unless someone wants to go to ahead and complete it. |
What does that command do? I can't work it out from the shell output 😅 |
It should be finding the last merge commit. In theory that should be where you last branched |
Ahhh, when I pasted that into a shell it doesn't remove every other I think that command gets the parent branch (also found here). We should be able to combine it with the current branch and the command
If that looks ok i'd like to have a crack at it over the next week or so 😄 |
Looks great, please do! |
I'm running into |
It seems ProcessBuilder does not use a shell to execute the commands, so grep is not supported. I'll use kotlin string manipulation instead to get the branch name |
Currently, the git client will only query for
HEAD~1
and determine the files in the last commit.We should add the ability to let a developer specify a branch to compare against and determine all the changed files between
HEAD
and that branch.We should configure this in the extension and let the user decide which option to use and the branch to compare against.
The text was updated successfully, but these errors were encountered: