Bug in git rev-parse @{push}?
- From
Chris Purcell <chris.purcell.39@gmail.com>
- Date
- Nov 3, 2016, 14:53 UTC
- Message-ID
- <CAJUoZVYF=ZCBUX6jztwhJX3BZdq4JEfrSRbi4cFPwn+7yA=VjA@mail.gmail.com>
Hi folks,
I think I have discovered a bug in rev-parse's handling of @{push}:$ git push Everything up-to-date $ git rev-parse @{push} fatal: cannot resolve 'simple' push to a single destination
The documentation for rev-parse says that "the suffix @{push} reports the branch 'where we would push to' if git push were run while branchname was checked out", so I would not expect this to error unless git push does.
The relevant parts of my configuration are:
[push]
default = simple
[remote]
pushdefault = origin
[branch "foo"]
remote = origin
merge = refs/heads/developThe code in branch_get_push_1 (remote.c) in the PUSH_DEFAULT_SIMPLE case is calling both branch_get_upstream and tracking_for_push_dest and erroring if they don't return the same result, which I assume is incorrect for a triangular workflow?
Please let me know if I've missed out important information by mistake. I'm happy to work on a patch if given guidance, but this is definitely outside my comfort zone for an unfamiliar codebase otherwise! e.g. I can't find the test suite.
Cheers, Chris