Re: Checking for fast-forward
- From
- Lee Griffiths <poddster@gmail.com>
- Date
- Jul 8, 2009, 17:36 UTC
- Message-ID
- <ca4f67be0907081036j38724491n6c4c0e9aa995ee51@mail.gmail.com>
- In-Reply-To
- <4A530594.20100@drmicha.warpmail.net>
Thanks for the answers :)
After seeing that git push skips the packing (and potentially other things) when doing a dry run, and given that: git push --dry-run takes 1.5s on average and that: git fetch git rev-list master..remotes/origin/master OR git ls-remote origin refs/remotes/origin/master
take 4s on average, I think I'll stick with the dry-run & checking for exception method.
Thanks though :)
2009/7/7 Michael J Gruber <git@drmicha.warpmail.net>:
> If $(git rev-list bar..remotes/origin/foo) is empty then the branch foo > in the remote repo can be fast-forwarded to bar.