From 6900d750f4894e7bee714874c04cc14312cd91ec Mon Sep 17 00:00:00 2001 From: Christian Himpel Date: Fri, 25 Sep 2009 17:14:31 +0200 Subject: [PATCH 01/29] git-am: fixed patch_format detection according to RFC2822 RFC2822 specifies in paragraph 3.6.8, that optional header fields are made up of any printable US-ASCII character except ' ' (space) and ':' (colon). The pattern for the egrep command is changed to match all of these characters. Signed-off-by: Christian Himpel Signed-off-by: Shawn O. Pearce --- git-am.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-am.sh b/git-am.sh index 26ffe702e0..0ddd80fef9 100755 --- a/git-am.sh +++ b/git-am.sh @@ -205,7 +205,7 @@ check_patch_format () { # and see if it looks like that they all begin with the # header field names... sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" | - egrep -v '^[A-Za-z]+(-[A-Za-z]+)*:' >/dev/null || + egrep -v '^[!-9;-~]+:' >/dev/null || patch_format=mbox fi } < "$1" || clean_abort From fa9d3485ead15387fd76a35284bd3ffb32d7c6c7 Mon Sep 17 00:00:00 2001 From: Christian Himpel Date: Fri, 25 Sep 2009 18:43:20 +0200 Subject: [PATCH 02/29] git-am: force egrep to use correct characters set According to egrep(1) the US-ASCII table is used when LC_ALL=C is set. We do not rely here on the LC_ALL value we get from the environment. Signed-off-by: Christian Himpel Signed-off-by: Shawn O. Pearce --- git-am.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-am.sh b/git-am.sh index 0ddd80fef9..c132f50da5 100755 --- a/git-am.sh +++ b/git-am.sh @@ -205,7 +205,7 @@ check_patch_format () { # and see if it looks like that they all begin with the # header field names... sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" | - egrep -v '^[!-9;-~]+:' >/dev/null || + LC_ALL=C egrep -v '^[!-9;-~]+:' >/dev/null || patch_format=mbox fi } < "$1" || clean_abort From f4ea32f0b48bc300afcb7c980c5a294deba31daa Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 24 Sep 2009 04:28:15 -0400 Subject: [PATCH 03/29] improve reflog date/number heuristic When we show a reflog, we have two ways of naming the entry: by sequence number (e.g., HEAD@{0}) or by date (e.g., HEAD@{10 minutes ago}). There is no explicit option to set one or the other, but we guess based on whether or not the user has provided us with a date format, showing them the date version if they have done so, and the sequence number otherwise. This usually made sense if the use did something like "git log -g --date=relative". However, it didn't make much sense if the user set the date format using the log.date config variable; in that case, all of their reflogs would end up as dates. This patch records the source of the date format and only triggers the date-based view if --date= was given on the command line. Signed-off-by: Jeff King Signed-off-by: Shawn O. Pearce --- log-tree.c | 4 +++- revision.c | 2 ++ revision.h | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/log-tree.c b/log-tree.c index 1c9eefee33..1618f3c79a 100644 --- a/log-tree.c +++ b/log-tree.c @@ -390,7 +390,9 @@ void show_log(struct rev_info *opt) */ show_reflog_message(opt->reflog_info, opt->commit_format == CMIT_FMT_ONELINE, - opt->date_mode); + opt->date_mode_explicit ? + opt->date_mode : + DATE_NORMAL); if (opt->commit_format == CMIT_FMT_ONELINE) return; } diff --git a/revision.c b/revision.c index 35eca4a361..9fc4e8d381 100644 --- a/revision.c +++ b/revision.c @@ -1159,8 +1159,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->simplify_history = 0; } else if (!strcmp(arg, "--relative-date")) { revs->date_mode = DATE_RELATIVE; + revs->date_mode_explicit = 1; } else if (!strncmp(arg, "--date=", 7)) { revs->date_mode = parse_date_format(arg + 7); + revs->date_mode_explicit = 1; } else if (!strcmp(arg, "--log-size")) { revs->show_log_size = 1; } diff --git a/revision.h b/revision.h index 9d0dddbcbc..b6421a6432 100644 --- a/revision.h +++ b/revision.h @@ -81,7 +81,8 @@ struct rev_info { show_merge:1, abbrev_commit:1, use_terminator:1, - missing_newline:1; + missing_newline:1, + date_mode_explicit:1; enum date_mode date_mode; unsigned int abbrev; From a4f3131c07c1f601be1e24b2143ca7e2deea09b5 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 30 Sep 2009 18:05:49 +0000 Subject: [PATCH 04/29] increase portability of NORETURN declarations Some compilers (including at least MSVC) support NORETURN on function declarations, but only before the function-name. This patch makes it possible to define NORETURN to something meaningful for those compilers. Signed-off-by: Erik Faye-Lund Signed-off-by: Jeff King --- git-compat-util.h | 8 ++++---- index-pack.c | 4 ++-- usage.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 8d6e29cdea..bac376f4c7 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -186,13 +186,13 @@ extern char *gitbasename(char *); #include "compat/bswap.h" /* General helper functions */ -extern void usage(const char *err) NORETURN; -extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2))); -extern void die_errno(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2))); +extern NORETURN void usage(const char *err); +extern NORETURN void die(const char *err, ...) __attribute__((format (printf, 1, 2))); +extern NORETURN void die_errno(const char *err, ...) __attribute__((format (printf, 1, 2))); extern int error(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); -extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN); +extern void set_die_routine(NORETURN void (*routine)(const char *err, va_list params)); extern int prefixcmp(const char *str, const char *prefix); extern time_t tm_to_time_t(const struct tm *tm); diff --git a/index-pack.c b/index-pack.c index 340074fc79..b4f8278659 100644 --- a/index-pack.c +++ b/index-pack.c @@ -206,8 +206,8 @@ static void parse_pack_header(void) use(sizeof(struct pack_header)); } -static void bad_object(unsigned long offset, const char *format, - ...) NORETURN __attribute__((format (printf, 2, 3))); +static NORETURN void bad_object(unsigned long offset, const char *format, + ...) __attribute__((format (printf, 2, 3))); static void bad_object(unsigned long offset, const char *format, ...) { diff --git a/usage.c b/usage.c index b6aea45280..0555ce6ccd 100644 --- a/usage.c +++ b/usage.c @@ -36,12 +36,12 @@ static void warn_builtin(const char *warn, va_list params) /* If we are in a dlopen()ed .so write to a global variable would segfault * (ugh), so keep things static. */ -static void (*usage_routine)(const char *err) NORETURN = usage_builtin; -static void (*die_routine)(const char *err, va_list params) NORETURN = die_builtin; +static NORETURN void (*usage_routine)(const char *err) = usage_builtin; +static NORETURN void (*die_routine)(const char *err, va_list params) = die_builtin; static void (*error_routine)(const char *err, va_list params) = error_builtin; static void (*warn_routine)(const char *err, va_list params) = warn_builtin; -void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN) +void set_die_routine(NORETURN void (*routine)(const char *err, va_list params)) { die_routine = routine; } From 18660bc96ec0419cc096a53998d3197f2b905e8a Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 30 Sep 2009 18:05:50 +0000 Subject: [PATCH 05/29] add NORETURN_PTR for function pointers Some compilers (including at least MSVC and ARM RVDS) supports NORETURN on function declarations, but not on function pointers. This patch makes it possible to define NORETURN for these compilers, by splitting the NORETURN macro into two - one for function declarations and one for function pointers. Signed-off-by: Erik Faye-Lund Signed-off-by: Jeff King --- git-compat-util.h | 4 +++- usage.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index bac376f4c7..ef60803384 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -176,8 +176,10 @@ extern char *gitbasename(char *); #ifdef __GNUC__ #define NORETURN __attribute__((__noreturn__)) +#define NORETURN_PTR __attribute__((__noreturn__)) #else #define NORETURN +#define NORETURN_PTR #ifndef __attribute__ #define __attribute__(x) #endif @@ -192,7 +194,7 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin extern int error(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); -extern void set_die_routine(NORETURN void (*routine)(const char *err, va_list params)); +extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params)); extern int prefixcmp(const char *str, const char *prefix); extern time_t tm_to_time_t(const struct tm *tm); diff --git a/usage.c b/usage.c index 0555ce6ccd..c488f3afcd 100644 --- a/usage.c +++ b/usage.c @@ -36,12 +36,12 @@ static void warn_builtin(const char *warn, va_list params) /* If we are in a dlopen()ed .so write to a global variable would segfault * (ugh), so keep things static. */ -static NORETURN void (*usage_routine)(const char *err) = usage_builtin; -static NORETURN void (*die_routine)(const char *err, va_list params) = die_builtin; +static NORETURN_PTR void (*usage_routine)(const char *err) = usage_builtin; +static NORETURN_PTR void (*die_routine)(const char *err, va_list params) = die_builtin; static void (*error_routine)(const char *err, va_list params) = error_builtin; static void (*warn_routine)(const char *err, va_list params) = warn_builtin; -void set_die_routine(NORETURN void (*routine)(const char *err, va_list params)) +void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params)) { die_routine = routine; } From ffc01f9baddb09a90ad4c5f391344e6e907851c8 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Wed, 30 Sep 2009 17:49:36 +0300 Subject: [PATCH 06/29] send-email: fix mutt regex for grouped aliases For example: alias -group friends foo Foo Bar Signed-off-by: Felipe Contreras Acked(-and-tested)-by: Eric Wong Signed-off-by: Jeff King --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index dd821f70cd..f5ba4e7699 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -401,7 +401,7 @@ my %aliases; my %parse_alias = ( # multiline formats can be supported in the future mutt => sub { my $fh = shift; while (<$fh>) { - if (/^\s*alias\s+(\S+)\s+(.*)$/) { + if (/^\s*alias\s+(?:-group\s+\S+\s+)*(\S+)\s+(.*)$/) { my ($alias, $addr) = ($1, $2); $addr =~ s/#.*$//; # mutt allows # comments # commas delimit multiple addresses From ebfbdb340ad9a1b6fbaf91464f0fd86643fdcb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Thu, 8 Oct 2009 18:46:54 +0200 Subject: [PATCH 07/29] Git archive and trailing "/" in prefix With --prefix=string that does not end with a slash, the top-level entries are written out with the specified prefix as expected, but no paths in the directories are added. Fix this by adding the prefix in write_archive_entry() instead of letting get_pathspec() and read_tree_recursive() pair; they are designed to only handle prefixes that are path components. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- archive.c | 7 ++++--- t/t5000-tar-tree.sh | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/archive.c b/archive.c index 0bca9ca403..57ac65e5ca 100644 --- a/archive.c +++ b/archive.c @@ -115,6 +115,7 @@ static int write_archive_entry(const unsigned char *sha1, const char *base, strbuf_reset(&path); strbuf_grow(&path, PATH_MAX); + strbuf_add(&path, args->base, args->baselen); strbuf_add(&path, base, baselen); strbuf_addstr(&path, filename); path_without_prefix = path.buf + args->baselen; @@ -187,8 +188,8 @@ int write_archive_entries(struct archiver_args *args, git_attr_set_direction(GIT_ATTR_INDEX, &the_index); } - err = read_tree_recursive(args->tree, args->base, args->baselen, 0, - args->pathspec, write_archive_entry, &context); + err = read_tree_recursive(args->tree, "", 0, 0, args->pathspec, + write_archive_entry, &context); if (err == READ_TREE_RECURSIVE) err = 0; return err; @@ -211,7 +212,7 @@ static const struct archiver *lookup_archiver(const char *name) static void parse_pathspec_arg(const char **pathspec, struct archiver_args *ar_args) { - ar_args->pathspec = get_pathspec(ar_args->base, pathspec); + ar_args->pathspec = get_pathspec("", pathspec); } static void parse_treeish_arg(const char **argv, diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 5f84b18fa5..0037f63d91 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -230,4 +230,16 @@ test_expect_success \ 'git archive --list outside of a git repo' \ 'GIT_DIR=some/non-existing/directory git archive --list' +test_expect_success 'git-archive --prefix=olde-' ' + git archive --prefix=olde- >h.tar HEAD && + ( + mkdir h && + cd h && + "$TAR" xf - <../h.tar + ) && + test -d h/olde-a && + test -d h/olde-a/bin && + test -f h/olde-a/bin/sh +' + test_done From f2d50d937bd17eb413cb78ccb37c17c2d933f76d Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 8 Oct 2009 16:21:44 +0100 Subject: [PATCH 08/29] Fix MSVC build on cygwin In the MSVC section of the Makefile, BASIC_CFLAGS is set to a value which contains the string "-DWIN32-D_CONSOLE". This results in a (single) malformed -Define being passed to the compiler. At least on my cygwin installation, the msvc compiler seems to ignore this parameter, without issuing an error or warning, and results in the WIN32 and _CONSOLE macros being undefined. This breaks the build. In order to fix the build, we simply insert a space between the two -Define parameters, "-DWIN32" and "-D_CONSOLE", as originally intended. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 12defd4c97..ae9bb03382 100644 --- a/Makefile +++ b/Makefile @@ -914,7 +914,7 @@ ifdef MSVC CC = compat/vcbuild/scripts/clink.pl AR = compat/vcbuild/scripts/lib.pl CFLAGS = - BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32-D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE + BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE COMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -DSTRIP_EXTENSION=\".exe\" BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib From b5d18b8e6f68746a85edfea08e9aff3351d7e891 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 8 Oct 2009 16:33:31 +0100 Subject: [PATCH 09/29] Fix the exit code of MSVC build scripts on cygwin During an MSVC build on cygwin, the make program did not notice when the compiler or linker exited with an error. This was caused by the scripts exiting with the value returned by system() directly. On POSIX-like systems, such as cygwin, the return value of system() has the exit code of the executed command encoded in the first byte (ie the value is shifted up by 8 bits). This allows the bottom 7 bits to contain the signal number of a terminated process, while the eighth bit indicates whether a core-dump was produced. (A value of -1 indicates that the command failed to execute.) The make program, however, expects the exit code to be encoded in the bottom byte. Futhermore, it apparently masks off and ignores anything in the upper bytes. However, these scripts are (naturally) intended to be used on the windows platform, where we can not assume POSIX-like semantics from a perl implementation (eg ActiveState). So, in general, we can not assume that shifting the return value right by eight will get us the exit code. In order to improve portability, we assume that a zero return from system() indicates success, whereas anything else indicates failure. Since we don't need to know the exact exit code from the compiler or linker, we simply exit with 0 (success) or 1 (failure). Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- compat/vcbuild/scripts/clink.pl | 2 +- compat/vcbuild/scripts/lib.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl index 0ffd59f9fb..f9528c0ea1 100644 --- a/compat/vcbuild/scripts/clink.pl +++ b/compat/vcbuild/scripts/clink.pl @@ -45,4 +45,4 @@ if ($is_linking) { push(@args, @cflags); } #printf("**** @args\n"); -exit system(@args); +exit (system(@args) != 0); diff --git a/compat/vcbuild/scripts/lib.pl b/compat/vcbuild/scripts/lib.pl index 68f66446ea..d8054e469f 100644 --- a/compat/vcbuild/scripts/lib.pl +++ b/compat/vcbuild/scripts/lib.pl @@ -23,4 +23,4 @@ while (@ARGV) { } unshift(@args, "lib.exe"); # printf("**** @args\n"); -exit system(@args); +exit (system(@args) != 0); From 817350d3af9e1227c737e47ff79f65f0373b31d6 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Thu, 8 Oct 2009 18:07:41 -0500 Subject: [PATCH 10/29] Makefile: enable THREADED_DELTA_SEARCH on IRIX and IRIX64 Since commit dcda3614 removed the use of a variable length array from builtin-pack-objects.c, it is now safe to compile with the threaded delta search feature enabled. Formerly, the MIPSpro 7.4.4m compiler warned that variable length arrays should not be used with pthreads. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index dd3d5203f9..c956ce9437 100644 --- a/Makefile +++ b/Makefile @@ -846,6 +846,7 @@ ifeq ($(uname_S),IRIX) SNPRINTF_RETURNS_BOGUS = YesPlease SHELL_PATH = /usr/gnu/bin/bash NEEDS_LIBGEN = YesPlease + THREADED_DELTA_SEARCH = YesPlease endif ifeq ($(uname_S),IRIX64) NO_SETENV=YesPlease @@ -859,6 +860,7 @@ ifeq ($(uname_S),IRIX64) SNPRINTF_RETURNS_BOGUS = YesPlease SHELL_PATH=/usr/gnu/bin/bash NEEDS_LIBGEN = YesPlease + THREADED_DELTA_SEARCH = YesPlease endif ifeq ($(uname_S),HP-UX) NO_IPV6=YesPlease From ac78b009398f8cab1f57d1ef62db21ac95e11ed1 Mon Sep 17 00:00:00 2001 From: Ben Walton Date: Thu, 8 Oct 2009 21:53:35 -0400 Subject: [PATCH 11/29] ls-files: die instead of fprintf/exit in -i error When ls-files was called with -i but no exclude pattern, it was calling fprintf(stderr, "...", NULL) and then exiting. On Solaris, passing NULL into fprintf was causing a segfault. On glibc systems, it was simply producing incorrect output (eg: "(null)": ...). The NULL pointer was a result of argv[0] not being preserved by the option parser. Instead of requesting that the option parser preserve argv[0], use die() with a constant string. A trigger for this bug was: `git ls-files -i` Signed-off-by: Ben Walton Signed-off-by: Junio C Hamano --- builtin-ls-files.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/builtin-ls-files.c b/builtin-ls-files.c index f473220502..2c95ca6105 100644 --- a/builtin-ls-files.c +++ b/builtin-ls-files.c @@ -524,11 +524,8 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix) ps_matched = xcalloc(1, num); } - if ((dir.flags & DIR_SHOW_IGNORED) && !exc_given) { - fprintf(stderr, "%s: --ignored needs some exclude pattern\n", - argv[0]); - exit(1); - } + if ((dir.flags & DIR_SHOW_IGNORED) && !exc_given) + die("ls-files --ignored needs some exclude pattern"); /* With no flags, we default to showing the cached files */ if (!(show_stage | show_deleted | show_others | show_unmerged | From 651aef3428d9688e3fdffc6760380ead47debb9f Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Thu, 8 Oct 2009 19:09:37 -0500 Subject: [PATCH 12/29] Makefile: add a note about the NO_MMAP setting on IRIX and IRIX64 When git is compiled with the MIPSpro 7.4.4m compiler, and NO_PTHREADS is set, and NO_MMAP is _not_ set, then git segfaults when trying to access the first entry in a reflog. If NO_PTHREADS is not set (which implies that the pthread library is linked in), or NO_MMAP _is_ set, then the segfault is not encountered. The conservative choice has been made to set NO_MMAP in the Makefile to avoid this flaw. The GNU C compiler does not produce this behavior. The segfault happens in refs.c:read_ref_at(). The mmap succeeds, and the loop is executed properly until rec is rewound into the first line (reflog entry) of the file. The segfault is caught by test 28 of t1400-update-ref.sh which fails when 'git rev-parse --verify "master@{May 25 2005}"' is called. So, add a comment in the Makefile to describe why NO_MMAP is set and as a hint to those who may be interested in unsetting it. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index c956ce9437..532be9dd9a 100644 --- a/Makefile +++ b/Makefile @@ -841,6 +841,12 @@ ifeq ($(uname_S),IRIX) NO_MEMMEM = YesPlease NO_MKSTEMPS = YesPlease NO_MKDTEMP = YesPlease + # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads + # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), + # git dies with a segmentation fault when trying to access the first + # entry of a reflog. The conservative choice is made to always set + # NO_MMAP. If you suspect that your compiler is not affected by this + # issue, comment out the NO_MMAP statement. NO_MMAP = YesPlease NO_EXTERNAL_GREP = UnfortunatelyYes SNPRINTF_RETURNS_BOGUS = YesPlease @@ -855,6 +861,12 @@ ifeq ($(uname_S),IRIX64) NO_MEMMEM = YesPlease NO_MKSTEMPS = YesPlease NO_MKDTEMP = YesPlease + # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads + # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), + # git dies with a segmentation fault when trying to access the first + # entry of a reflog. The conservative choice is made to always set + # NO_MMAP. If you suspect that your compiler is not affected by this + # issue, comment out the NO_MMAP statement. NO_MMAP = YesPlease NO_EXTERNAL_GREP = UnfortunatelyYes SNPRINTF_RETURNS_BOGUS = YesPlease From dc3c7a7256ed05a14baaffbc35c016f7ffde51c5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 8 Oct 2009 23:59:15 -0700 Subject: [PATCH 13/29] Update draft release notes to 1.6.5 --- Documentation/RelNotes-1.6.5.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Documentation/RelNotes-1.6.5.txt b/Documentation/RelNotes-1.6.5.txt index d260b03723..636e226a37 100644 --- a/Documentation/RelNotes-1.6.5.txt +++ b/Documentation/RelNotes-1.6.5.txt @@ -53,6 +53,10 @@ Updates since v1.6.4 * Unnecessary inefficiency in deepening of a shallow repository has been removed. + * "git clone" does not grab objects that it does not need (i.e. + referenced only from refs outside refs/heads and refs/tags + hierarchy) anymore. + * The "git" main binary used to link with libcurl, which then dragged in a large number of external libraries. When using basic plumbing commands in scripts, this unnecessarily slowed things down. We now @@ -154,18 +158,18 @@ Updates since v1.6.4 * With GIT_TEST_OPTS="--root=/p/a/t/h", tests can be run outside the source directory; using tmpfs may give faster turnaround. + * With NO_PERL_MAKEMAKER set, DESTDIR= is now honoured, so you can + build for one location, and install into another location to tar it + up. Fixes since v1.6.4 ------------------ -# All of the fixes in v1.6.4.X maintenance series are included in this -# release, unless otherwise noted. - -# Here are fixes that this release has, but have not been backported to -# v1.6.4.X series. +All of the fixes in v1.6.4.X maintenance series are included in this +release, unless otherwise noted. -- exec >/var/tmp/1 -O=v1.6.5-rc1-44-ga16753d +O=v1.6.5-rc3-4-gbf8fc21 echo O=$(git describe master) git shortlog --no-merges $O..master --not maint From c03c1f798d5f865331428e88c7d19b15471d25a8 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 9 Oct 2009 11:01:04 +0400 Subject: [PATCH 14/29] git-svn: Avoid spurious errors when rewriteRoot is used. After doing a rebase, git-svn checks that the SVN URL is what it expects. However, it does not account for rewriteRoot, which is a legitimate way for the URL to change. This produces a lot of spurious errors. [ew: fixed line wrapping] Signed-off-by: Alexander Gavrilov Acked-by: Eric Wong --- git-svn.perl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index e0ec258e33..ab65d688fe 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -603,8 +603,15 @@ sub cmd_dcommit { "\nBefore dcommitting"; } if ($url_ ne $expect_url) { - fatal "URL mismatch after rebase: ", - "$url_ != $expect_url"; + if ($url_ eq $gs->metadata_url) { + print + "Accepting rewritten URL:", + " $url_\n"; + } else { + fatal + "URL mismatch after rebase:", + " $url_ != $expect_url"; + } } if ($uuid_ ne $uuid) { fatal "uuid mismatch after rebase: ", From a8c9bef4e0b87e596f37ec238991b447c739dee9 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 5 Oct 2009 15:35:16 -0400 Subject: [PATCH 15/29] pull: improve advice for unconfigured error case There are several reasons a git-pull invocation might not have anything marked for merge: 1. We're not on a branch, so there is no branch configuration. 2. We're on a branch, but there is no configuration for this branch. 3. We fetched from the configured remote, but the configured branch to merge didn't get fetched (either it doesn't exist, or wasn't part of the fetch refspec). 4. We fetched from the non-default remote, but didn't specify a branch to merge. We can't use the configured one because it applies to the default remote. 5. We fetched from a specified remote, and a refspec was given, but it ended up not fetching anything (this is actually hard to do; if the refspec points to a remote branch and it doesn't exist, then fetch will fail and we never make it to this code path. But if you provide a wildcard refspec like refs/bogus/*:refs/remotes/origin/* then you can see this failure). We have handled (1) and (2) for some time. Recently, commit a6dbf88 added code to handle case (3). This patch handles cases (4) and (5), which previously just fell under other cases, producing a confusing message. While we're at it, let's rewrap the text for case (3), which looks terribly ugly as it is. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- git-pull.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/git-pull.sh b/git-pull.sh index 66d73eb59d..fc78592ae0 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -90,8 +90,17 @@ error_on_no_merge_candidates () { curr_branch=${curr_branch#refs/heads/} upstream=$(git config "branch.$curr_branch.merge") + remote=$(git config "branch.$curr_branch.remote") - if [ -z "$curr_branch" ]; then + if [ $# -gt 1 ]; then + echo "There are no candidates for merging in the refs that you just fetched." + echo "Generally this means that you provided a wildcard refspec which had no" + echo "matches on the remote end." + elif [ $# -gt 0 ] && [ "$1" != "$remote" ]; then + echo "You asked to pull from the remote '$1', but did not specify" + echo "a branch to merge. Because this is not the default configured remote" + echo "for your current branch, you must specify a branch on the command line." + elif [ -z "$curr_branch" ]; then echo "You are not currently on a branch, so I cannot use any" echo "'branch..merge' in your configuration file." echo "Please specify which branch you want to merge on the command" @@ -116,9 +125,8 @@ error_on_no_merge_candidates () { echo echo "See git-config(1) for details." else - echo "Your configuration specifies to merge the ref" - echo "'${upstream#refs/heads/}' from the remote, but no such ref" - echo "was fetched." + echo "Your configuration specifies to merge the ref '${upstream#refs/heads/}' from the" + echo "remote, but no such ref was fetched." fi exit 1 } From 162213d2329d5e87f9b74ed8153ce7008788d213 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 05:15:29 -0500 Subject: [PATCH 16/29] Describe DOCBOOK_XSL_172, ASCIIDOC_NO_ROFF options in Makefile There is excellent documentation for these options in Documentation/Makefile, but some users may never find it. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 629ab35047..fea237bc80 100644 --- a/Makefile +++ b/Makefile @@ -153,7 +153,11 @@ all:: # # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8 # -# Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72. +# Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72 +# (not v1.73 or v1.71). +# +# Define ASCIIDOC_NO_ROFF if your DocBook XSL escapes raw roff directives +# (versions 1.72 and later and 1.68.1 and earlier). # # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's # MakeMaker (e.g. using ActiveState under Cygwin). From 0f8a02c640397ce22080e1c2eaa5029388638589 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 05:16:15 -0500 Subject: [PATCH 17/29] Documentation: git fmt-merge-msg does not have to be a script The fmt-merge-message builtin can be invoked as "git fmt-merge-msg" rather than through the hard link in GIT_EXEC_PATH. Although this is unlikely to confuse most script writers, it should not hurt to make the documentation a little clearer anyway. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-fmt-merge-msg.txt | 4 ++-- Documentation/git-merge.txt | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt index 1c24796d66..a586950b48 100644 --- a/Documentation/git-fmt-merge-msg.txt +++ b/Documentation/git-fmt-merge-msg.txt @@ -18,8 +18,8 @@ Takes the list of merged objects on stdin and produces a suitable commit message to be used for the merge commit, usually to be passed as the '' argument of 'git-merge'. -This script is intended mostly for internal use by scripts -automatically invoking 'git-merge'. +This command is intended mostly for internal use by scripts +automatically invoking 'git merge'. OPTIONS ------- diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index af68d694a0..ac9f17a11e 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -28,9 +28,10 @@ OPTIONS include::merge-options.txt[] -m :: - The commit message to be used for the merge commit (in case - it is created). The 'git-fmt-merge-msg' script can be used - to give a good default for automated 'git-merge' invocations. + Set the commit message to be used for the merge commit (in + case one is created). The 'git fmt-merge-msg' command can be + used to give a good default for automated 'git merge' + invocations. ...:: Other branch heads to merge into our branch. You need at From 25dcc0d64b9f3c11abcd0f53a9b9cdb6092ed646 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 13:51:14 -0500 Subject: [PATCH 18/29] Documentation: clarify mergeoptions description Sounds better this way, at least to my ears. ("The syntax and supported options of git merge" is a plural noun. "the same" instead of "equal" sounds less technical and seems to convey the meaning better here.) Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/config.txt | 2 +- Documentation/git-merge.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index be0b8cacaa..cd1781498e 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -539,7 +539,7 @@ branch..merge:: branch..mergeoptions:: Sets default options for merging into branch . The syntax and - supported options are equal to that of linkgit:git-merge[1], but + supported options are the same as those of linkgit:git-merge[1], but option values containing whitespace characters are currently not supported. diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index ac9f17a11e..d05f324462 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -50,8 +50,8 @@ include::merge-config.txt[] branch..mergeoptions:: Sets default options for merging into branch . The syntax and - supported options are equal to that of 'git-merge', but option values - containing whitespace characters are currently not supported. + supported options are the same as those of 'git merge', but option + values containing whitespace characters are currently not supported. HOW MERGE WORKS --------------- From 58d2c961b310d9366dd193f2d95d7eae56edecec Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 05:18:58 -0500 Subject: [PATCH 19/29] Documentation: branch: update --merged description Update the documentation for --merged and --no-merged to explain the meaning of the optional parameter introduced in commit 049716b (branch --merged/--no-merged: allow specifying arbitrary commit, 2008-07-08). Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index aad71dc59a..f34911fe9a 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -134,11 +134,13 @@ start-point is either a local or remote branch. --contains :: Only list branches which contain the specified commit. ---merged:: - Only list branches which are fully contained by HEAD. +--merged []:: + Only list branches whose tips are reachable from the + specified commit (HEAD if not specified). ---no-merged:: - Do not list branches which are fully contained by HEAD. +--no-merged []:: + Only list branches whose tips are not reachable from the + specified commit (HEAD if not specified). :: The name of the branch to create or delete. From bb35f35e67ed2fdfce1892cc9d55827b90fcb775 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 13:34:08 -0500 Subject: [PATCH 20/29] Documentation: clarify branch creation The documentation seems to assume that the starting point for a new branch is the tip of an existing (ordinary) branch, but that is not the most common case. More often, "git branch" is used to begin a branch from a remote-tracking branch, a tag, or an interesting commit (e.g. origin/pu^2). Clarify the language so it can apply to these cases. Thanks to Sean Estabrooks for the wording. Also add a pointer to the user's manual for the bewildered. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index f34911fe9a..0e836809c2 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -30,10 +30,8 @@ commit) will be listed. With `--no-merged` only branches not merged into the named commit will be listed. If the argument is missing it defaults to 'HEAD' (i.e. the tip of the current branch). -In the command's second form, a new branch named will be created. -It will start out with a head equal to the one given as . -If no is given, the branch will be created with a head -equal to that of the currently checked out branch. +The command's second form creates a new branch head named +which points to the current 'HEAD', or if given. Note that this will create the new branch, but it will not switch the working tree to it; use "git checkout " to switch to the @@ -149,9 +147,9 @@ start-point is either a local or remote branch. may restrict the characters allowed in a branch name. :: - The new branch will be created with a HEAD equal to this. It may - be given as a branch name, a commit-id, or a tag. If this option - is omitted, the current branch is assumed. + The new branch head will point to this commit. It may be + given as a branch name, a commit-id, or a tag. If this + option is omitted, the current HEAD will be used instead. :: The name of an existing branch to rename. @@ -216,7 +214,9 @@ SEE ALSO -------- linkgit:git-check-ref-format[1], linkgit:git-fetch[1], -linkgit:git-remote[1]. +linkgit:git-remote[1], +link:user-manual.html#what-is-a-branch[``Understanding history: What is +a branch?''] in the Git User's Manual. Author ------ From 580cbb58a29ee3ebc3714f4792d34f958fd86165 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 05:20:19 -0500 Subject: [PATCH 21/29] Documentation: clarify "working tree" definition It is not necessarily obvious to a git novice what it means for a filesystem tree to be equal to the HEAD. Spell it out. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/glossary-content.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index 572374f7a6..43d84d15e9 100644 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@ -456,6 +456,6 @@ This commit is referred to as a "merge commit", or sometimes just a of 'A' is 'origin/B' sometimes we say "'A' is tracking 'origin/B'". [[def_working_tree]]working tree:: - The tree of actual checked out files. The working tree is - normally equal to the <> plus any local changes - that you have made but not yet committed. + The tree of actual checked out files. The working tree normally + contains the contents of the <> commit's tree, + plus any local changes that you have made but not yet committed. From 989c530e7f7f85db7fb5a340319cca88ca702b2a Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 05:25:54 -0500 Subject: [PATCH 22/29] racy-git.txt: explain nsec problem in more detail Idealists may want USE_NSEC to be the default on Linux some day. Point to a patch to better explain the requirements on filesystem code for that to happen. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/technical/racy-git.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/technical/racy-git.txt b/Documentation/technical/racy-git.txt index 48bb97f0b1..53aa0c82c2 100644 --- a/Documentation/technical/racy-git.txt +++ b/Documentation/technical/racy-git.txt @@ -42,10 +42,12 @@ compared, but this is not enabled by default because this member is not stable on network filesystems. With `USE_NSEC` compile-time option, `st_mtim.tv_nsec` and `st_ctim.tv_nsec` members are also compared, but this is not enabled by default -because the value of this member becomes meaningless once the -inode is evicted from the inode cache on filesystems that do not -store it on disk. - +because in-core timestamps can have finer granularity than +on-disk timestamps, resulting in meaningless changes when an +inode is evicted from the inode cache. See commit 8ce13b0 +of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git +([PATCH] Sync in core time granuality with filesystems, +2005-01-04). Racy git -------- From b6aaaa4470ef578add390bb60292ed9b4cb4af3c Mon Sep 17 00:00:00 2001 From: Ingmar Vanhassel Date: Fri, 9 Oct 2009 14:08:31 +0200 Subject: [PATCH 23/29] import-tars: Add missing closing bracket This fixes an obvious syntax error that snuck in commit 7e787953: syntax error at /home/ingmar/bin//git-import-tars line 143, near "/^$/ { " syntax error at /home/ingmar/bin//git-import-tars line 145, near "} else" syntax error at /home/ingmar/bin//git-import-tars line 152, near "}" Signed-off-by: Ingmar Vanhassel Acked-and-Tested-by: Peter Krefting Signed-off-by: Junio C Hamano --- contrib/fast-import/import-tars.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl index a909716682..7001862bfd 100755 --- a/contrib/fast-import/import-tars.perl +++ b/contrib/fast-import/import-tars.perl @@ -140,7 +140,7 @@ foreach my $tar_file (@ARGV) } elsif (!$header_done && /^Author:\s+([^<>]*)\s+<(.*)>\s*$/i) { $this_author_name = $1; $this_author_email = $2; - } elsif (!$header_done && /^$/ { # empty line ends header. + } elsif (!$header_done && /^$/) { # empty line ends header. $header_done = 1; } else { $commit_msg .= $_; From 427e586b197c94961b548c8a25ed721651fc335e Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 8 Oct 2009 23:21:43 -0700 Subject: [PATCH 24/29] completion: fix completion of git After commit 511a3fc (wrap git's main usage string., 2009-09-12), the bash completion for git commands includes COMMAND and [ARGS] when it shouldn't. Fix this by grepping more strictly for a line with git commands. It's doubtful whether git will ever have commands starting with anything besides numbers and letters so this should be fine. At least by being stricter we'll know when we break the completion earlier. Signed-off-by: Stephen Boyd Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 88b1b3c7a0..652a47c772 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -496,7 +496,7 @@ __git_all_commands () return fi local i IFS=" "$'\n' - for i in $(git help -a|egrep '^ ') + for i in $(git help -a|egrep '^ [a-zA-Z0-9]') do case $i in *--*) : helper pattern;; From e0d78059540aab2e6ff720e7c940d7244cc12c18 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 8 Oct 2009 23:21:44 -0700 Subject: [PATCH 25/29] completion: fix alias listings with newlines Aliases with newlines have been a problem since commit 56fc25f (Bash completion support for remotes in .git/config., 2006-11-05). The chance of the problem occurring has been slim at best, until commit 518ef8f (completion: Replace config --list with --get-regexp, 2009-09-11) removed the case statement introduced by commit 56fc25f. Before removing the case statement, most aliases with newlines would work unless they were specially crafted as follows [alias] foo = "log -1 --pretty='format:%s\nalias.error=broken'" After removing the case statement, a more benign alias like [alias] whowhat = "log -1 --pretty='format:%an <%ae>\n%s'" wont-complete = ... would cause the completion to break badly. For now, revert the removal of the case statement until someone comes up with a better way to get keys from git-config. Signed-off-by: Stephen Boyd Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 652a47c772..e482c8d076 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -602,8 +602,12 @@ __git_aliases () { local i IFS=$'\n' for i in $(git --git-dir="$(__gitdir)" config --get-regexp "alias\..*" 2>/dev/null); do - i="${i#alias.}" - echo "${i/ */}" + case "$i" in + alias.*) + i="${i#alias.}" + echo "${i/ */}" + ;; + esac done } From e1c1a0674b5848eb3207a29d5513c9112c72d10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 9 Oct 2009 22:49:06 +0200 Subject: [PATCH 26/29] bash: add support for 'git replace' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Gustavsson Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index e482c8d076..7cf8557468 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1798,6 +1798,11 @@ _git_remote () esac } +_git_replace () +{ + __gitcomp "$(__git_refs)" +} + _git_reset () { __git_has_doubledash && return @@ -2166,6 +2171,7 @@ _git () push) _git_push ;; rebase) _git_rebase ;; remote) _git_remote ;; + replace) _git_replace ;; reset) _git_reset ;; revert) _git_revert ;; rm) _git_rm ;; From 33405be34bcb72d8fe69463c80c542eacb19b7ef Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 9 Oct 2009 18:07:39 -0500 Subject: [PATCH 27/29] Documentation: clone: clarify discussion of initial branch When saying the initial branch is equal to the currently active remote branch, it is probably intended that the branch heads point to the same commit. Maybe it would be more useful to a new user to emphasize that the tree contents and history are the same. More important, probably, is that this new branch is set up so that "git pull" merges changes from the corresponding remote branch. The next paragraph addresses that directly. What the reader needs to know to begin with is that (1) the initial branch is your own; if you do not pull, it won't get updated, and that (2) the initial branch starts out at the same commit as the upstream. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index aacf4fd327..5ebcba1c7c 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -19,8 +19,9 @@ DESCRIPTION Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository -(visible using `git branch -r`), and creates and checks out an initial -branch equal to the cloned repository's currently active branch. +(visible using `git branch -r`), and creates and checks out an +initial branch that is forked from the cloned repository's +currently active branch. After the clone, a plain `git fetch` without arguments will update all the remote-tracking branches, and a `git pull` without From 85886162f1149bb1db48e6a4c8e1c4a4a726173f Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Fri, 9 Oct 2009 13:21:13 +0100 Subject: [PATCH 28/29] git-svn: hide find_parent_branch output in double quiet mode Hide find_parent_branch logging when -qq is specified. This eliminates more unnecessary output when run from cron, e.g.: Found possible branch point: http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/trunk => http://undernet-ircu.svn.sourceforge.net/svnroot/undernet-ircu/ircu2/branches/authz, 1919 Found branch parent: (authz) ea061d76aea985dc0208d36fa5e0b2249b698557 Following parent with do_switch Successfully followed parent Acked-by: Eric Wong Signed-off-by: Simon Arlott Signed-off-by: Junio C Hamano --- git-svn.perl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index ab65d688fe..eb4b75aff3 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2633,7 +2633,8 @@ sub find_parent_branch { my $url = $self->ra->{url}; my $new_url = $url . $branch_from; print STDERR "Found possible branch point: ", - "$new_url => ", $self->full_url, ", $r\n"; + "$new_url => ", $self->full_url, ", $r\n" + unless $::_q > 1; $branch_from =~ s#^/##; my $gs = $self->other_gs($new_url, $url, $branch_from, $r, $self->{ref_id}); @@ -2654,11 +2655,13 @@ sub find_parent_branch { ($r0, $parent) = $gs->find_rev_before($r, 1); } if (defined $r0 && defined $parent) { - print STDERR "Found branch parent: ($self->{ref_id}) $parent\n"; + print STDERR "Found branch parent: ($self->{ref_id}) $parent\n" + unless $::_q > 1; my $ed; if ($self->ra->can_do_switch) { $self->assert_index_clean($parent); - print STDERR "Following parent with do_switch\n"; + print STDERR "Following parent with do_switch\n" + unless $::_q > 1; # do_switch works with svn/trunk >= r22312, but that # is not included with SVN 1.4.3 (the latest version # at the moment), so we can't rely on it @@ -2673,18 +2676,20 @@ sub find_parent_branch { print STDERR "Trees match:\n", " $new_url\@$r0\n", " ${\$self->full_url}\@$rev\n", - "Following parent with no changes\n"; + "Following parent with no changes\n" + unless $::_q > 1; $self->tmp_index_do(sub { command_noisy('read-tree', $parent); }); $self->{last_commit} = $parent; } else { - print STDERR "Following parent with do_update\n"; + print STDERR "Following parent with do_update\n" + unless $::_q > 1; $ed = SVN::Git::Fetcher->new($self); $self->ra->gs_do_update($rev, $rev, $self, $ed) or die "SVN connection failed somewhere...\n"; } - print STDERR "Successfully followed parent\n"; + print STDERR "Successfully followed parent\n" unless $::_q > 1; return $self->make_log_entry($rev, [$parent], $ed); } return undef; @@ -2829,7 +2834,7 @@ sub other_gs { $ref_id .= "\@$r"; # just grow a tail if we're not unique enough :x $ref_id .= '-' while find_ref($ref_id); - print STDERR "Initializing parent: $ref_id\n"; + print STDERR "Initializing parent: $ref_id\n" unless $::_q > 1; my ($u, $p, $repo_id) = ($new_url, '', $ref_id); if ($u =~ s#^\Q$url\E(/|$)##) { $p = $u; From 78d553b7d7b269bb22ebd8b1198657c37484a3a0 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 10 Oct 2009 00:05:19 -0700 Subject: [PATCH 29/29] GIT 1.6.5 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.5.txt | 6 ------ Documentation/git.txt | 5 +++++ GIT-VERSION-GEN | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Documentation/RelNotes-1.6.5.txt b/Documentation/RelNotes-1.6.5.txt index 636e226a37..ee141c19ad 100644 --- a/Documentation/RelNotes-1.6.5.txt +++ b/Documentation/RelNotes-1.6.5.txt @@ -167,9 +167,3 @@ Fixes since v1.6.4 All of the fixes in v1.6.4.X maintenance series are included in this release, unless otherwise noted. - --- -exec >/var/tmp/1 -O=v1.6.5-rc3-4-gbf8fc21 -echo O=$(git describe master) -git shortlog --no-merges $O..master --not maint diff --git a/Documentation/git.txt b/Documentation/git.txt index 20b573e37c..d97aaf5bf8 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -43,6 +43,11 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: +* link:v1.6.5/git.html[documentation for release 1.6.5] + +* release notes for + link:RelNotes-1.6.5.txt[1.6.5]. + * link:v1.6.4.4/git.html[documentation for release 1.6.4.4] * release notes for diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index d7d9a9a063..08e6073f33 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.4.GIT +DEF_VER=v1.6.5 LF=' '