Open dansimau opened 10 months ago
I was trying spr
out and I thought I was going nuts because it kept reporting pull request stack is empty
. Thank you for raising this issue.
FWIW, I'd recommend option 2 because then the program doesn't care what the user's config has done here.
As mentioned here: https://github.com/ejoffe/spr/issues/213#issuecomment-1825873127
Problem
git spr up
returnspull request stack is empty
— even when there are local commits to be pushed and PRs created — when the following git config is present:helpers.go:78 defines the following regexp for extracting the commit hash:
However, when using abbreviated commit hashes, this regexp doesn't match. Here is an example of log output with an abbreviated commit hash:
Using the following config options, the commit hash length could be anywhere between 1-40 characters:
Solutions
--no-abbrev-commit
when runninggit log
I would go with option (1), because it is backwards-compatible with git versions prior to the
--no-abbrev-commit
flag appearing (didn't check when this was though).