On Oct 30, 2007, at 11:26 AM, Andreas Ericsson wrote:
Steffen Prohaska wrote:
My strange rule 10/10 adds a check that verifies if the local
side has something interesting to push. Only in this case a
pull make sense. If you do not have something new, a pull will
be a fast-forward, and just a waste of time.
Err... fast-forward pulls are not a waste of time. What a strange
notion. Perhaps I misunderstood, but this sentence jumped out at
me and immediately got filed under "decidedly odd".
If the local branch is a strict ancestor, a pull is only
interesting if you want to start to work on such a branch
locally. But pull is a waste of time if you're only goal is to
push. Push suggests to pull first. So you pull; and then you
push again; and the result on the remote is the same. Only
the error message is gone that could have been avoided in the
first place. -> waste of time.
If you _pull_ it would be interesting to learn that you probably
want to merge to more than the current local branch. At that
time you expressed the intention to integrate new changes from
the remote. And it's probably a good idea to integrate changes
on all local branches that are set up to automatically merge
from the same remote you just pulled.
But if you push you want to push. You'd probably only interested
in pulls that add immediate value to the push. That is if the
result of a subsequent push modified the remote.
Steffen
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html