There are two cases the push does not fast forward. The case where you
are truly behind (aka "stale") and you and the pushed-to repository have
diverged history. Reporting success when you did not push due to the
latter is unacceptable. I personally rely on the fast-forward safety in
my push-out scripts, but I do not think it is just me. The exit status from
commands are designed to be used that way.
The issue of "many refs in the repo but I work only on a few" has already
been resolved by being able to say "I push only the current branch" in the
previous thread, I think, but I am too busy to go back to re-study the
history, so could you kindly do that for us?
The thing is, the user asked to push certain refs, and some did not get
updated. The user has the right to expect a failure indication from the
command. If you choose to _ignore_ the failure, that is _your_ choice,
like:
$ git push || :
You might argue that the case where you are truly behind _could_ be
ignored and pretend as if the user did not even _ask_ to push it (hence,
return success without doing anything to that branch), but I am not
convinced even that is a good idea.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html