summaryrefslogtreecommitdiff
path: root/builtin-push.c
diff options
context:
space:
mode:
authorIlari Liusvaara <ilari.liusvaara@elisanet.fi>2010-01-16 23:45:31 +0200
committerJunio C Hamano <gitster@pobox.com>2010-01-16 16:39:58 -0800
commite9fcd1e2121100d43d2d212eb6c6f1fc82aade1d (patch)
tree6a1d97f297fa15ee407e395a778c43675c95194f /builtin-push.c
parent1f73566af5bec28cd8489c6139a9ede95817349c (diff)
downloadgit-e9fcd1e2121100d43d2d212eb6c6f1fc82aade1d.tar.gz
Add push --set-upstream
Frequent complaint is lack of easy way to set up upstream (tracking) references for git pull to work as part of push command. So add switch --set-upstream (-u) to do just that. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-push.c')
-rw-r--r--builtin-push.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-push.c b/builtin-push.c
index 28a26e7db2..5df66081a6 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -218,6 +218,8 @@ int cmd_push(int argc, const char **argv, const char *prefix)
OPT_BOOLEAN( 0 , "thin", &thin, "use thin pack"),
OPT_STRING( 0 , "receive-pack", &receivepack, "receive-pack", "receive pack program"),
OPT_STRING( 0 , "exec", &receivepack, "receive-pack", "receive pack program"),
+ OPT_BIT('u', "set-upstream", &flags, "set upstream for git pull/status",
+ TRANSPORT_PUSH_SET_UPSTREAM),
OPT_END()
};