Signed-off-by: Johannes Schindelin <Johannes.Schindelin@xxxxxx> --- On Tue, 19 Feb 2008, Jeff King wrote: > On Tue, Feb 19, 2008 at 10:18:09AM -0500, Jay Soffian wrote: > > > > It seems like the default should be to push just the > > > > current branch ... this would correspond to what a user of > > > > git pull expects (even though the converse of git-push is > > > > really git-fetch, for a new user, that might not be > > > > entirely clear). > > > > > > I agree with you, but others do not > > > > Sounds like an opportunity for a config option. > > Again I agree, though I think there is some resistance to that > (see the thread I mentioned). Junio's opinion seems to be "why > can't they just use 'git push <remote> HEAD'?" (and he suggested > a 'git push HEAD' shorthand syntax, as well). FWIW I would resist, just because that config option would change the _semantics_ of a git program. Just think about the IRC channel. "How do I update only HEAD?" -- "Just say 'git push'" -- "No, that updates nothing" -- "Well, works here" -- "But not here!" ... "Can _nobody_ help me?" Having inconsistent semantics is wrong, wrong, wrong. > But then, nobody has put forth a patch, so I think if you wanted > to argue it, the best way would be to do so (though I think it > would be rejected, it would give those who wanted to try it > something to play with). This is a tongue-in-cheek patch. Just so that nobody can say that there were no patches. builtin-push.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/builtin-push.c b/builtin-push.c index c8cb63e..7bcb141 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -134,6 +134,14 @@ int cmd_push(int argc, const char **argv, const char *prefix) flags |= TRANSPORT_PUSH_ALL; if (mirror) flags |= (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE); + if (!all && argc < 2) + warning("Pushing without branch names is deprecated.\n" + "Too many users just assumed what it should do\n" + "according to them, got burned, and blamed us,\n" + "the good git developers.\n\n" + "So everybody has to suffer now, and get used to\n" + "new semantics.\n\n" + "Thank you for your time.\n"); if (argc > 0) { repo = argv[0]; - 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