From 82e5a82fd73edb80a841f5fab1660e14b9b8f3ad Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 10 Jul 2006 01:50:18 -0400 Subject: Fix more typos, primarily in the code The only visible change is that git-blame doesn't understand "--compability" anymore, but it does accept "--compatibility" instead, which is already documented. Signed-off-by: Pavel Roskin Signed-off-by: Junio C Hamano --- builtin-push.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-push.c') diff --git a/builtin-push.c b/builtin-push.c index 66b9407822..a8fac886f1 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -104,7 +104,7 @@ static int get_remotes_uri(const char *repo, const char *uri[MAX_URI]) if (n < MAX_URI) uri[n++] = strdup(s); else - error("more than %d URL's specified, ignoreing the rest", MAX_URI); + error("more than %d URL's specified, ignoring the rest", MAX_URI); } else if (is_refspec && !has_explicit_refspec) add_refspec(strdup(s)); -- cgit v1.2.1 From a9486b02ec7e03d17317fe538b0d06ca04379f23 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 10 Jul 2006 02:57:51 -0400 Subject: Avoid C99 comments, use old-style C comments instead. This doesn't make the code uglier or harder to read, yet it makes the code more portable. This also simplifies checking for other potential incompatibilities. "gcc -std=c89 -pedantic" can flag many incompatible constructs as warnings, but C99 comments will cause it to emit an error. Signed-off-by: Pavel Roskin Signed-off-by: Junio C Hamano --- builtin-push.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-push.c') diff --git a/builtin-push.c b/builtin-push.c index a8fac886f1..31cbfd7386 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -273,7 +273,7 @@ static int do_push(const char *repo) int cmd_push(int argc, const char **argv, char **envp) { int i; - const char *repo = "origin"; // default repository + const char *repo = "origin"; /* default repository */ for (i = 1; i < argc; i++) { const char *arg = argv[i]; -- cgit v1.2.1 From a633fca0c056aa221d23493c276d3713191621b3 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 28 Jul 2006 22:44:25 -0700 Subject: Call setup_git_directory() much earlier This changes the calling convention of built-in commands and passes the "prefix" (i.e. pathname of $PWD relative to the project root level) down to them. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- builtin-push.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-push.c') diff --git a/builtin-push.c b/builtin-push.c index 31cbfd7386..a824171066 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -270,7 +270,7 @@ static int do_push(const char *repo) return 0; } -int cmd_push(int argc, const char **argv, char **envp) +int cmd_push(int argc, const char **argv, const char *prefix) { int i; const char *repo = "origin"; /* default repository */ -- cgit v1.2.1 From 8f615493e6b6fd47bc4011c264cb7e6f01052d37 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 2 Aug 2006 11:28:16 -0400 Subject: git-push: allow -f as an alias for --force This was already documented in the options section of the manpage. This patch implements it, adds it to the usage message, and mentions it at the top of the manpage. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin-push.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin-push.c') diff --git a/builtin-push.c b/builtin-push.c index a824171066..c39dd1e092 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -8,7 +8,7 @@ #define MAX_URI (16) -static const char push_usage[] = "git push [--all] [--tags] [--force] [...]"; +static const char push_usage[] = "git push [--all] [--tags] [-f | --force] [...]"; static int all = 0, tags = 0, force = 0, thin = 1; static const char *execute = NULL; @@ -291,7 +291,7 @@ int cmd_push(int argc, const char **argv, const char *prefix) tags = 1; continue; } - if (!strcmp(arg, "--force")) { + if (!strcmp(arg, "--force") || !strcmp(arg, "-f")) { force = 1; continue; } -- cgit v1.2.1 From 15e593e4d37d1d350fef20ab666d58f6881c7f5f Mon Sep 17 00:00:00 2001 From: Ramsay Allan Jones Date: Thu, 3 Aug 2006 16:38:39 +0100 Subject: Fixup command names in some usage strings. Most usage strings, such as for command xxx, start with "git-xxx". This updates the rebels to conform to the general pattern. (The git wrapper is an exception to this, of course ...) Signed-off-by: Ramsay Allan Jones Signed-off-by: Junio C Hamano --- builtin-push.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-push.c') diff --git a/builtin-push.c b/builtin-push.c index c39dd1e092..53bc378f73 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -8,7 +8,7 @@ #define MAX_URI (16) -static const char push_usage[] = "git push [--all] [--tags] [-f | --force] [...]"; +static const char push_usage[] = "git-push [--all] [--tags] [-f | --force] [...]"; static int all = 0, tags = 0, force = 0, thin = 1; static const char *execute = NULL; -- cgit v1.2.1