From e84dc6df86ce91ecc1e355c323a0e681cb82f801 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 5 May 2009 11:16:14 -0700 Subject: git-svn: fix a sloppy Getopt::Long usage Getopt-Long v2.38 is much stricter about sloppy getopt usage. The trailing pipe causes git-svn testcases to fail for all of the --stdin argument calls. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano diff --git a/git-svn.perl b/git-svn.perl index 25ed2f4..8b9ad38 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -133,7 +133,7 @@ my %cmd = ( %cmt_opts, %fc_opts } ], 'set-tree' => [ \&cmd_set_tree, "Set an SVN repository to a git tree-ish", - { 'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ], + { 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ], 'create-ignore' => [ \&cmd_create_ignore, 'Create a .gitignore per svn:ignore', { 'revision|r=i' => \$_revision -- cgit v0.10.2-6-g49f6 From 2c5b0115038ab283b346fbb8059b93973ff4c8f2 Mon Sep 17 00:00:00 2001 From: Allan Caffee Date: Mon, 4 May 2009 13:37:30 -0400 Subject: dir.c: Fix two minor grammatical errors in comments Signed-off-by: Allan Caffee Signed-off-by: Junio C Hamano diff --git a/dir.c b/dir.c index 04a4b98..4e6b988 100644 --- a/dir.c +++ b/dir.c @@ -58,7 +58,7 @@ static inline int special_char(unsigned char c1) } /* - * Does 'match' matches the given name? + * Does 'match' match the given name? * A match is found if * * (1) the 'match' string is leading directory of 'name', or @@ -292,7 +292,7 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen) dir->basebuf[baselen] = '\0'; } -/* Scan the list and let the last match determines the fate. +/* Scan the list and let the last match determine the fate. * Return 1 for exclude, 0 for include and -1 for undecided. */ static int excluded_1(const char *pathname, -- cgit v0.10.2-6-g49f6 From 3db964b551827e25f897cc75ffd8e520ee8b48cd Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Mon, 4 May 2009 22:18:42 -0700 Subject: git-am.txt: add an 'a', say what 'it' is, simplify a sentence It's nice to know that 'it' is git-am or the subject line. Whitespace implies characters so just remove characters. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 1e71dd5..a497010 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -32,7 +32,7 @@ OPTIONS -s:: --signoff:: - Add `Signed-off-by:` line to the commit message, using + Add a `Signed-off-by:` line to the commit message, using the committer identity of yourself. -k:: @@ -118,8 +118,8 @@ The commit author name is taken from the "From: " line of the message, and commit author time is taken from the "Date: " line of the message. The "Subject: " line is used as the title of the commit, after stripping common prefix "[PATCH ]". -It is supposed to describe what the commit is about concisely as -a one line text. +The "Subject: " line is supposed to concisely describe what the +commit is about in one line of text. The body of the message (the rest of the message after the blank line that terminates the RFC2822 headers) can begin with "Subject: " and @@ -128,8 +128,8 @@ to override the values of these fields. The commit message is formed by the title taken from the "Subject: ", a blank line and the body of the message up to -where the patch begins. Excess whitespace characters at the end of the -lines are automatically stripped. +where the patch begins. Excess whitespace at the end of each +line is automatically stripped. The patch is expected to be inline, directly following the message. Any line that is of the form: @@ -141,7 +141,7 @@ message. Any line that is of the form: is taken as the beginning of a patch, and the commit log message is terminated before the first occurrence of such a line. -When initially invoking it, you give it the names of the mailboxes +When initially invoking `git am`, you give it the names of the mailboxes to process. Upon seeing the first patch that does not apply, it aborts in the middle. You can recover from this in one of two ways: -- cgit v0.10.2-6-g49f6 From e77063fccb4c1627bd4656a42a508391d16e7482 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Mon, 4 May 2009 22:19:00 -0700 Subject: git-am.txt: Use date or value instead of time or timestamp Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index a497010..ea84cbb 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -79,14 +79,14 @@ default. You can use `--no-utf8` to override this. message as the commit author date, and uses the time of commit creation as the committer date. This allows the user to lie about the committer date by using the same - timestamp as the author date. + value as the author date. --ignore-date:: By default the command records the date from the e-mail message as the commit author date, and uses the time of commit creation as the committer date. This allows the - user to lie about author timestamp by using the same - timestamp as the committer date. + user to lie about the author date by using the same + value as the committer date. --skip:: Skip the current patch. This is only meaningful when @@ -115,7 +115,7 @@ DISCUSSION ---------- The commit author name is taken from the "From: " line of the -message, and commit author time is taken from the "Date: " line +message, and commit author date is taken from the "Date: " line of the message. The "Subject: " line is used as the title of the commit, after stripping common prefix "[PATCH ]". The "Subject: " line is supposed to concisely describe what the -- cgit v0.10.2-6-g49f6 From 7713e053fd13a09b548cb65d99dfca986064955e Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Sun, 3 May 2009 23:46:58 -0700 Subject: git-am.txt: reword extra headers in message body Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index ea84cbb..6d92cbe 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -121,10 +121,10 @@ the commit, after stripping common prefix "[PATCH ]". The "Subject: " line is supposed to concisely describe what the commit is about in one line of text. -The body of the message (the rest of the message after the blank line -that terminates the RFC2822 headers) can begin with "Subject: " and -"From: " lines that are different from those of the mail header, -to override the values of these fields. +"From: " and "Subject: " lines starting the body (the rest of the +message after the blank line terminating the RFC2822 headers) +override the respective commit author name and title values taken +from the headers. The commit message is formed by the title taken from the "Subject: ", a blank line and the body of the message up to -- cgit v0.10.2-6-g49f6 From f697b33b015fcb0c90210840eb4ef8e6a18d4bdf Mon Sep 17 00:00:00 2001 From: Bernd Ahlers Date: Mon, 6 Apr 2009 19:26:37 +0200 Subject: Work around BSD whose typeof(tv.tv_sec) != time_t According to POSIX, tv_sec is supposed to be a time_t, but OpenBSD (and FreeBSD, too) defines it to be a long, which triggers a type mismatch when a pointer to it is given to localtime_r(). Acked-by: Jeff King Signed-off-by: Junio C Hamano diff --git a/date.c b/date.c index 1165d30..409a17d 100644 --- a/date.c +++ b/date.c @@ -871,13 +871,15 @@ unsigned long approxidate(const char *date) int number = 0; struct tm tm, now; struct timeval tv; + time_t time_sec; char buffer[50]; if (parse_date(date, buffer, sizeof(buffer)) > 0) return strtoul(buffer, NULL, 10); gettimeofday(&tv, NULL); - localtime_r(&tv.tv_sec, &tm); + time_sec = tv.tv_sec; + localtime_r(&time_sec, &tm); now = tm; for (;;) { unsigned char c = *date; -- cgit v0.10.2-6-g49f6 From 066e596abb2768be1ef3984a55ce39643fbb36e5 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Sat, 2 May 2009 09:31:16 -0500 Subject: t4018-diff-funcname: add cpp xfuncname pattern to syntax test Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh index be54134..5b10e97 100755 --- a/t/t4018-diff-funcname.sh +++ b/t/t4018-diff-funcname.sh @@ -32,7 +32,7 @@ EOF sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java -builtin_patterns="bibtex html java objc pascal php python ruby tex" +builtin_patterns="bibtex cpp html java objc pascal php python ruby tex" for p in $builtin_patterns do test_expect_success "builtin $p pattern compiles" ' -- cgit v0.10.2-6-g49f6 From e88d022af96312e64216bfec31bd6749277c335a Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Wed, 29 Apr 2009 23:27:54 +0200 Subject: improve error message in config.c Show errno if opening a lockfile fails. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano diff --git a/config.c b/config.c index 7a83c76..5d9072c 100644 --- a/config.c +++ b/config.c @@ -954,7 +954,7 @@ int git_config_set_multivar(const char* key, const char* value, lock = xcalloc(sizeof(struct lock_file), 1); fd = hold_lock_file_for_update(lock, config_filename, 0); if (fd < 0) { - error("could not lock config file %s", config_filename); + error("could not lock config file %s: %s", config_filename, strerror(errno)); free(store.key); ret = -1; goto out_free; -- cgit v0.10.2-6-g49f6