First-parent hook shows invalid git command

Issue #18 closed
Marijn van Zon created an issue

Hi,

When the "Protect First Parent" hook is enabled and a merge or pull request is rejected the error shows the following git command to run to see the issue:

git show --graph -s --pretty='%h %d%n' <commit> <commit>~1 origin/master

However that git command is invalid, when trying to run it git produces the following error:

cannot combine --no-walk with --graph

I've done some digging and it looks like this was changed somewhere in the git v2.3 range: http://permalink.gmane.org/gmane.comp.version-control.git/264991

Comments (4)

  1. Julius Davies [bit-booster.com] repo owner

    Fantastic bug report, thanks!

    I plan to switch the git command to this:

     git log --graph --pretty='%h%d%n%s%n' -3 " + badCommit + " origin/master\
    

    I plan to upload the fix to atlassian marketplace in a week, but you can try it earlier using this link:

    http://bit-booster.com/misc.html

  2. Log in to comment