From e1e5ec868fab6f8131e8b228f1d6d543b7501933 Mon Sep 17 00:00:00 2001 From: Clemens Buchacher Date: Sat, 5 Jun 2010 10:04:20 +0200 Subject: [PATCH 1/3] setup: document prefix Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- setup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.c b/setup.c index 5716d90b57..0e4cfe603f 100644 --- a/setup.c +++ b/setup.c @@ -519,6 +519,12 @@ int check_repository_format(void) return check_repository_format_gently(NULL); } +/* + * Returns the "prefix", a path to the current working directory + * relative to the work tree root, or NULL, if the current working + * directory is not a strict subdirectory of the work tree root. The + * prefix always ends with a '/' character. + */ const char *setup_git_directory(void) { const char *retval = setup_git_directory_gently(NULL); From 3334729cf29605389b51effc1f311656f3fd8086 Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Sun, 6 Jun 2010 19:31:34 -0400 Subject: [PATCH 2/3] commit.txt: clarify how --author argument is used commit --author was added by 146ea06 (git commit --author=$name: look $name up in existing commits), but its documentation was sorely lacking compared to its excellent commit message. This commit tries to improve the documentation. Signed-off-by: Jay Soffian Signed-off-by: Junio C Hamano --- Documentation/git-commit.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 64fb458b45..69eb86e450 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -95,10 +95,11 @@ OPTIONS read the message from the standard input. --author=:: - Override the author name used in the commit. You can use the - standard `A U Thor ` format. Otherwise, - an existing commit that matches the given string and its author - name is used. + Override the commit author. Specify an explicit author using the + standard `A U Thor ` format. Otherwise + is assumed to be a pattern and is used to search for an existing + commit by that author (i.e. rev-list --all -i --author=); + the commit author is then copied from the first such commit found. --date=:: Override the author date used in the commit. From 2543d9b609d158f611e317738644e67cacac6b9a Mon Sep 17 00:00:00 2001 From: Tor Arntsen Date: Fri, 4 Jun 2010 11:32:11 +0200 Subject: [PATCH 3/3] Change C99 comments to old-style C comments Signed-off-by: Tor Arntsen Signed-off-by: Junio C Hamano --- builtin/blame.c | 2 +- builtin/for-each-ref.c | 4 ++-- remote.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index fc1586350f..4dd4c3f494 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -1589,7 +1589,7 @@ static void emit_porcelain(struct scoreboard *sb, struct blame_entry *ent) strcpy(hex, sha1_to_hex(suspect->commit->object.sha1)); printf("%s%c%d %d %d\n", hex, - ent->guilty ? ' ' : '*', // purely for debugging + ent->guilty ? ' ' : '*', /* purely for debugging */ ent->s_lno + 1, ent->lno + 1, ent->num_lines); diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index 62be1bbfd6..7f5011f75e 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -549,10 +549,10 @@ static void grab_values(struct atom_value *val, int deref, struct object *obj, v grab_person("committer", val, deref, obj, buf, sz); break; case OBJ_TREE: - // grab_tree_values(val, deref, obj, buf, sz); + /* grab_tree_values(val, deref, obj, buf, sz); */ break; case OBJ_BLOB: - // grab_blob_values(val, deref, obj, buf, sz); + /* grab_blob_values(val, deref, obj, buf, sz); */ break; default: die("Eh? Object of type %d?", obj->type); diff --git a/remote.c b/remote.c index c70181cdc6..26ce56046d 100644 --- a/remote.c +++ b/remote.c @@ -476,7 +476,7 @@ static void read_config(void) unsigned char sha1[20]; const char *head_ref; int flag; - if (default_remote_name) // did this already + if (default_remote_name) /* did this already */ return; default_remote_name = xstrdup("origin"); current_branch = NULL;