-
Notifications
You must be signed in to change notification settings - Fork 399
use git log that acts like git whatchanged. include merge commits #237
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
Conversation
…lude merge commits. w/ jasquat
|
i'll pull the classic "the master build failed with the same test failure at around the same time that it failed for my branch" defense (for the continuous-integration/jenkins/pr-merge check). sorry about that. |
|
Yes, that test failure is happening only on Windows, and has resisted my attempts to fix it. It passes on my Windows machines, and passes on my Linux machines. I'll investigate further today or tomorrow. |
|
well i actually tried installing the hpi generated from a maven build off this branch and it didn't seem to do what i would have expected. the following changes in the screenshot include merge commits, but it's still only showing the one non-merge commit instead of both the normal commit and the merge commit. i also tried changing the line in question to totally botch it ("git borked" instead of "git log" or "git whatchanged") to see if that would break everything, but it didn't break jenkins like i expected it to. maybe that line isn't used, or maybe my testing process was bad (i maven built, grabbed the hpi, shoved it up via the upload plugin UI, and then restarted jenkins). |
|
@burnettk For me, the addition of Since the only differences cited between git log and git whatchanged are the default format and excluding merges, I would guess that you don't need it. https://git-scm.com/docs/git-whatchanged |
|
i was intending to keep the functionality as close to the existing functionality as possible while adding merge commits. are you suggesting removing the |
|
@burnettk I didn't spend as much time researching as you did, but for my GH project, it seemed that adding the On the other topic, one way to make it backward compatible is to add an additional option to the configuration screen. By default, the values would be exactly as it is now, e.g.:
In my case, I would change it to:
If it was too much work to change various interface definitions to pass in this string, then a less elegant approach would pull the values from a system environment variable (an approach that is already implemented in that class for other constants):
If someone needed different formats for different jobs, then it would have to move into the additional behaviors for Git, which seems unlikely to be worth the effort IMO. |
|
either of those options you mentioned to support configuring this command would be awesome from my perspective. |
|
@burnettk BTW, I did the same testing as you (maven build, upload hpi) and after removing the diff-filter, I now see merge commits too. You might want to retest yourself. Do the extra commits you see due to "rev.always_show_header = 1" impact you, or were you just trying to maintain backward compatibility? |


we ran some tests that compared the output of git log and git whatchanged on several repos, and determined that this set of arguments made them act the same for our repos. then we removed the --no-merges flag from git log so it will include merge commits per https://issues.jenkins-ci.org/browse/JENKINS-28907 (see also the comment there). updated all references to git whatchanged in comments, since whatchanged no longer appears in the source code of this repo.
working w/ jasquat.