The -e/--exclude-commits functionality depends on branch_contains().
branch_contains unconditionally truncates sha1 to an 8 character prefix. This is potentially problematic by itself.
However, the more problematic issue in the function comes in the following test: "result = out == sha1". Here, 'out' comes from git-merge-base, which will give a complete sha1. This could be fixed by testing whether 'sha1' is a prefix of 'out', though given the potential issues inherent in chopping 'sha1' at 8 characters, it would probably be better to remove the "[:8]" from the start of the function.
The -e/--exclude-commits functionality depends on branch_contains().
branch_contains unconditionally truncates sha1 to an 8 character prefix. This is potentially problematic by itself.
However, the more problematic issue in the function comes in the following test: "result = out == sha1". Here, 'out' comes from git-merge-base, which will give a complete sha1. This could be fixed by testing whether 'sha1' is a prefix of 'out', though given the potential issues inherent in chopping 'sha1' at 8 characters, it would probably be better to remove the "[:8]" from the start of the function.