Re: [PATCH 2/3] push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE

2013-01-21 Thread Junio C Hamano
This one has a logic flaw. The logic outlined in the cover letter is correct, and the one described in the log message of this one is not. We should say "fetch first" only when we do not have old_sha1. diff --git a/remote.c b/remote.c index 248910f..8c39ea2 100644 --- a/remote.c +++ b/remote.c

[PATCH 2/3] push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE

2013-01-21 Thread Junio C Hamano
When pushing update an existing ref, we wouldn't even know if we are fast-forwarding the ref on the other end if: * we do not have the object currently at the tip of remote; * the object currently at the tip of remote is not a committish; or * the object we are pushing is not a committish. In