summaryrefslogtreecommitdiff
path: root/builtin-push.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-04 17:18:29 -0800
committerJunio C Hamano <junkio@cox.net>2006-11-04 17:18:29 -0800
commit66fd23153ae84df505f81b4816f54a62a467378f (patch)
tree06a5382733ad16118647d08cb3630e63e8380964 /builtin-push.c
parent67e78c3b8aeb44681b2d4ab2cf97145b7cc9a7a2 (diff)
parentbcc785f611dc6084be75999a3b6bafcc950e21d6 (diff)
downloadgit-66fd23153ae84df505f81b4816f54a62a467378f.tar.gz
Merge branch 'lt/push-config'
* lt/push-config: git push: add verbose flag and allow overriding of default target repository Allow '-' in config variable names
Diffstat (limited to 'builtin-push.c')
-rw-r--r--builtin-push.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/builtin-push.c b/builtin-push.c
index 5f7eccf14b..d23974e708 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -10,7 +10,7 @@
static const char push_usage[] = "git-push [--all] [--tags] [-f | --force] <repository> [<refspec>...]";
-static int all, tags, force, thin = 1;
+static int all, tags, force, thin = 1, verbose;
static const char *execute;
#define BUF_SIZE (2084)
@@ -248,6 +248,8 @@ static int do_push(const char *repo)
while (dest_refspec_nr--)
argv[dest_argc++] = *dest_refspec++;
argv[dest_argc] = NULL;
+ if (verbose)
+ fprintf(stderr, "Pushing to %s\n", dest);
err = run_command_v(argc, argv);
if (!err)
continue;
@@ -281,6 +283,14 @@ int cmd_push(int argc, const char **argv, const char *prefix)
i++;
break;
}
+ if (!strcmp(arg, "-v")) {
+ verbose=1;
+ continue;
+ }
+ if (!strncmp(arg, "--repo=", 7)) {
+ repo = arg+7;
+ continue;
+ }
if (!strcmp(arg, "--all")) {
all = 1;
continue;