From ceae78b438d2e5ca035aec9b067643ca79ed4ccd Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Sat, 12 Nov 2005 23:15:50 +0100 Subject: [PATCH 01/21] debian packaging: git-cvs needs cvsps --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 8cc527e2da..d2a923407a 100644 --- a/debian/control +++ b/debian/control @@ -48,7 +48,7 @@ Description: The git content addressable filesystem, GNUArch interoperability Package: git-cvs Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, git-core +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, git-core, cvsps (>= 2.1) Suggests: cvs Description: The git content addressable filesystem, CVS interoperability This package contains 'git-cvsimport', to import development history from From acc075a8ad5ee798c170fc2276e1c840a03b5fa4 Mon Sep 17 00:00:00 2001 From: Nick Hengeveld Date: Sat, 12 Nov 2005 09:11:32 -0800 Subject: [PATCH 02/21] Fix for multiple alternates requests in http-fetch Stop additional alternates requests from starting if one is already in progress. This adds an optional callback which is processed after a slot has finished running. Signed-off-by: Nick Hengeveld Signed-off-by: Junio C Hamano --- http-fetch.c | 178 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 117 insertions(+), 61 deletions(-) diff --git a/http-fetch.c b/http-fetch.c index f39e748fc0..99b6cc7e41 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -25,7 +25,7 @@ #define PREV_BUF_SIZE 4096 #define RANGE_HEADER_SIZE 30 -static int got_alternates = 0; +static int got_alternates = -1; static int active_requests = 0; static int data_received; @@ -87,9 +87,19 @@ struct active_request_slot int done; CURLcode curl_result; long http_code; + void *callback_data; + void (*callback_func)(void *data); struct active_request_slot *next; }; +struct alt_request { + char *base; + char *url; + struct buffer *buffer; + struct active_request_slot *slot; + int http_specific; +}; + static struct transfer_request *request_queue_head = NULL; static struct active_request_slot *active_queue_head = NULL; @@ -237,7 +247,7 @@ static size_t fwrite_sha1_file(void *ptr, size_t eltsize, size_t nmemb, static void process_curl_messages(void); static void process_request_queue(void); #endif -static int fetch_alternates(char *base); +static void fetch_alternates(char *base); static CURL* get_curl_handle(void) { @@ -324,6 +334,8 @@ static struct active_request_slot *get_active_slot(void) slot->in_use = 1; slot->done = 0; slot->local = NULL; + slot->callback_data = NULL; + slot->callback_func = NULL; curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, pragma_header); curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, no_range_header); curl_easy_setopt(slot->curl, CURLOPT_ERRORBUFFER, curl_errorstr); @@ -601,6 +613,12 @@ static void process_curl_messages(void) } else { fprintf(stderr, "Received DONE message for unknown request!\n"); } + + /* Process slot callback if appropriate */ + if (slot->callback_func != NULL) { + slot->callback_func(slot->callback_data); + } + if (request != NULL) { request->curl_result = curl_result; request->http_code = slot->http_code; @@ -766,72 +784,51 @@ static int setup_index(struct alt_base *repo, unsigned char *sha1) return 0; } -static int fetch_alternates(char *base) +static void process_alternates(void *callback_data) { - int ret = 0; - struct buffer buffer; - char *url; - char *data; - int i = 0; - int http_specific = 1; + struct alt_request *alt_req = (struct alt_request *)callback_data; + struct active_request_slot *slot = alt_req->slot; struct alt_base *tail = alt; + char *base = alt_req->base; static const char null_byte = '\0'; + char *data; + int i = 0; - struct active_request_slot *slot; - - if (got_alternates) - return 0; - - data = xmalloc(4096); - buffer.size = 4096; - buffer.posn = 0; - buffer.buffer = data; - - if (get_verbosely) - fprintf(stderr, "Getting alternates list for %s\n", base); - - url = xmalloc(strlen(base) + 31); - sprintf(url, "%s/objects/info/http-alternates", base); - - slot = get_active_slot(); - curl_easy_setopt(slot->curl, CURLOPT_FILE, &buffer); - curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, - fwrite_buffer_dynamic); - curl_easy_setopt(slot->curl, CURLOPT_URL, url); - if (start_active_slot(slot)) { - run_active_slot(slot); - if (slot->curl_result != CURLE_OK || !buffer.posn) { - http_specific = 0; - - sprintf(url, "%s/objects/info/alternates", base); - - slot = get_active_slot(); - curl_easy_setopt(slot->curl, CURLOPT_FILE, &buffer); - curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, - fwrite_buffer_dynamic); - curl_easy_setopt(slot->curl, CURLOPT_URL, url); + if (alt_req->http_specific) { + if (slot->curl_result != CURLE_OK || + !alt_req->buffer->posn) { + + /* Try reusing the slot to get non-http alternates */ + alt_req->http_specific = 0; + sprintf(alt_req->url, "%s/objects/info/alternates", + base); + curl_easy_setopt(slot->curl, CURLOPT_URL, + alt_req->url); + active_requests++; + slot->in_use = 1; + slot->done = 0; if (start_active_slot(slot)) { - run_active_slot(slot); - if (slot->curl_result != CURLE_OK) { - free(buffer.buffer); - if (slot->http_code == 404) - got_alternates = 1; - return 0; - } + return; + } else { + got_alternates = -1; + slot->done = 1; + return; } } - } else { - free(buffer.buffer); - return 0; + } else if (slot->curl_result != CURLE_OK) { + if (slot->http_code != 404) { + got_alternates = -1; + return; + } } - fwrite_buffer_dynamic(&null_byte, 1, 1, &buffer); - buffer.posn--; - data = buffer.buffer; + fwrite_buffer_dynamic(&null_byte, 1, 1, alt_req->buffer); + alt_req->buffer->posn--; + data = alt_req->buffer->buffer; - while (i < buffer.posn) { + while (i < alt_req->buffer->posn) { int posn = i; - while (posn < buffer.posn && data[posn] != '\n') + while (posn < alt_req->buffer->posn && data[posn] != '\n') posn++; if (data[posn] == '\n') { int okay = 0; @@ -855,7 +852,7 @@ static int fetch_alternates(char *base) // If the server got removed, give up. okay = strchr(base, ':') - base + 3 < serverlen; - } else if (http_specific) { + } else if (alt_req->http_specific) { char *colon = strchr(data + i, ':'); char *slash = strchr(data + i, '/'); if (colon && slash && colon < data + posn && @@ -881,15 +878,74 @@ static int fetch_alternates(char *base) while (tail->next != NULL) tail = tail->next; tail->next = newalt; - ret++; } } i = posn + 1; } got_alternates = 1; - free(buffer.buffer); - return ret; +} + +static void fetch_alternates(char *base) +{ + struct buffer buffer; + char *url; + char *data; + struct active_request_slot *slot; + static struct alt_request alt_req; + int num_transfers; + + /* If another request has already started fetching alternates, + wait for them to arrive and return to processing this request's + curl message */ + while (got_alternates == 0) { + curl_multi_perform(curlm, &num_transfers); + process_curl_messages(); + process_request_queue(); + } + + /* Nothing to do if they've already been fetched */ + if (got_alternates == 1) + return; + + /* Start the fetch */ + got_alternates = 0; + + data = xmalloc(4096); + buffer.size = 4096; + buffer.posn = 0; + buffer.buffer = data; + + if (get_verbosely) + fprintf(stderr, "Getting alternates list for %s\n", base); + + url = xmalloc(strlen(base) + 31); + sprintf(url, "%s/objects/info/http-alternates", base); + + /* Use a callback to process the result, since another request + may fail and need to have alternates loaded before continuing */ + slot = get_active_slot(); + slot->callback_func = process_alternates; + slot->callback_data = &alt_req; + + curl_easy_setopt(slot->curl, CURLOPT_FILE, &buffer); + curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, + fwrite_buffer_dynamic); + curl_easy_setopt(slot->curl, CURLOPT_URL, url); + + alt_req.base = base; + alt_req.url = url; + alt_req.buffer = &buffer; + alt_req.http_specific = 1; + alt_req.slot = slot; + + if (start_active_slot(slot)) + run_active_slot(slot); + else + got_alternates = -1; + + free(data); + free(url); } static int fetch_indices(struct alt_base *repo) From 54a9ba0d44c37c43670087793bfeb1b54d718cdb Mon Sep 17 00:00:00 2001 From: Nick Hengeveld Date: Sat, 12 Nov 2005 09:38:28 -0800 Subject: [PATCH 03/21] Fix fd leak in http-fetch Added a call to finish_request to clean up resources if the server returned a 404 and there are no alternates left to try. Signed-off-by: Nick Hengeveld Signed-off-by: Junio C Hamano --- http-fetch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/http-fetch.c b/http-fetch.c index 99b6cc7e41..b8aa965ea3 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -632,6 +632,8 @@ static void process_curl_messages(void) request->repo = request->repo->next; start_request(request); + } else { + finish_request(request); } } else { finish_request(request); From 8614e92323bff2319ca92b0718e3044e3b3b1f79 Mon Sep 17 00:00:00 2001 From: Thomas Matysik Date: Sun, 13 Nov 2005 17:56:55 +1300 Subject: [PATCH 04/21] Add expat and expat-devel dependencies (for http-push) to RPM spec. Signed-off-by: Thomas Matysik Signed-off-by: Junio C Hamano --- git-core.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-core.spec.in b/git-core.spec.in index 6a482ad1f1..a7abb5f44e 100644 --- a/git-core.spec.in +++ b/git-core.spec.in @@ -7,9 +7,9 @@ License: GPL Group: Development/Tools URL: http://kernel.org/pub/software/scm/git/ Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz -BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3} +BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: zlib >= 1.2, rsync, rcs, curl, less, openssh-clients, python >= 2.3, tk >= 8.4 +Requires: zlib >= 1.2, rsync, rcs, curl, less, openssh-clients, python >= 2.3, tk >= 8.4, expat %description This is a stupid (but extremely fast) directory content manager. It From ba1dbb61ea1dc6995ce8ff32e109110c1d5aa304 Mon Sep 17 00:00:00 2001 From: Thomas Matysik Date: Sun, 13 Nov 2005 17:58:02 +1300 Subject: [PATCH 05/21] Split gitk into seperate RPM package I don't want to have to install x11-libs and all it's dependencies on my headless machines, so this patch splits gitk out of the RPM. The .deb already appears to have gitk split out. Signed-off-by: Thomas Matysik Signed-off-by: Junio C Hamano --- git-core.spec.in | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/git-core.spec.in b/git-core.spec.in index a7abb5f44e..16c626902a 100644 --- a/git-core.spec.in +++ b/git-core.spec.in @@ -9,7 +9,7 @@ URL: http://kernel.org/pub/software/scm/git/ Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: zlib >= 1.2, rsync, rcs, curl, less, openssh-clients, python >= 2.3, tk >= 8.4, expat +Requires: zlib >= 1.2, rsync, rcs, curl, less, openssh-clients, python >= 2.3, expat %description This is a stupid (but extremely fast) directory content manager. It @@ -47,6 +47,13 @@ Requires: git-core = %{version}-%{release} %description email Git tools for sending email. +%package tk +Summary: Git revision tree visualiser ('gitk') +Group: Development/Tools +Requires: git-core = %{version}-%{release}, tk >= 8.4 +%description tk +Git revision tree visualiser ('gitk') + %prep %setup -q @@ -60,9 +67,9 @@ make %{_smp_mflags} DESTDIR=$RPM_BUILD_ROOT WITH_OWN_SUBPROCESS_PY=YesPlease WIT prefix=%{_prefix} mandir=%{_mandir} \ install %{!?_without_docs: install-doc} -(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE "arch|svn|cvs|email" | sed -e s@^$RPM_BUILD_ROOT@@) > bin-man-doc-files +(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE "arch|svn|cvs|email|gitk" | sed -e s@^$RPM_BUILD_ROOT@@) > bin-man-doc-files %if %{!?_without_docs:1}0 -(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE "arch|svn|git-cvs|email" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files +(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE "arch|svn|git-cvs|email|gitk" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files %endif %clean @@ -96,6 +103,13 @@ rm -rf $RPM_BUILD_ROOT %{!?_without_docs: %{_mandir}/man1/*email*.1*} %{!?_without_docs: %doc Documentation/*email*.html } +%files tk +%defattr(-,root,root) +%doc Documentation/*gitk*.txt +%{_bindir}/*gitk* +%{!?_without_docs: %{_mandir}/man1/*gitk*.1*} +%{!?_without_docs: %doc Documentation/*gitk*.html } + %files -f bin-man-doc-files %defattr(-,root,root) %{_datadir}/git-core/ From ac0b86dadf243305810199096f0b35acd518abc1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 13 Nov 2005 01:57:33 -0800 Subject: [PATCH 06/21] Debian: build-depend on libexpat-dev. Signed-off-by: Junio C Hamano --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 10f67b8a2e..376f0fa5a3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-core (0.99.9.GIT-2) unstable; urgency=low + + * Build Dependency did not include libexpat-dev. + + -- Junio C Hamano Sun, 13 Nov 2005 01:55:34 -0800 + git-core (0.99.9.GIT-1) unstable; urgency=low * Do not scatter txt and html documentation into feature diff --git a/debian/control b/debian/control index 8cc527e2da..a77bb5dfd1 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: git-core Section: devel Priority: optional Maintainer: Junio C Hamano -Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev|libcurl3-gnutls-dev|libcurl3-openssl-dev, asciidoc (>= 6.0.3), xmlto, debhelper (>= 4.0.0), bc +Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev|libcurl3-gnutls-dev|libcurl3-openssl-dev, asciidoc (>= 6.0.3), xmlto, debhelper (>= 4.0.0), bc, libexpat1-dev Standards-Version: 3.6.1 Package: git-core From abacbe4166bcf9d62f430a4a75de2e82df3799b1 Mon Sep 17 00:00:00 2001 From: Kai Ruemmler Date: Sat, 12 Nov 2005 17:33:24 +0100 Subject: [PATCH 07/21] Fix compilation warnings in pack-redundant.c This fixes compilation warnings where "%ld" was used to print values of type size_t. Signed-off-by: Kai Ruemmler Signed-off-by: Junio C Hamano --- pack-redundant.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pack-redundant.c b/pack-redundant.c index 1f8c577391..28b82ee65a 100644 --- a/pack-redundant.c +++ b/pack-redundant.c @@ -593,19 +593,20 @@ int main(int argc, char **argv) minimize(&min); if (verbose) { - fprintf(stderr, "There are %ld packs available in alt-odbs.\n", - pack_list_size(altodb_packs)); + fprintf(stderr, "There are %lu packs available in alt-odbs.\n", + (unsigned long)pack_list_size(altodb_packs)); fprintf(stderr, "The smallest (bytewise) set of packs is:\n"); pl = min; while (pl) { fprintf(stderr, "\t%s\n", pl->pack->pack_name); pl = pl->next; } - fprintf(stderr, "containing %ld duplicate objects " - "with a total size of %ldkb.\n", - get_pack_redundancy(min), pack_set_bytecount(min)/1024); - fprintf(stderr, "A total of %ld unique objects were considered.\n", - all_objects->size); + fprintf(stderr, "containing %lu duplicate objects " + "with a total size of %lukb.\n", + (unsigned long)get_pack_redundancy(min), + (unsigned long)pack_set_bytecount(min)/1024); + fprintf(stderr, "A total of %lu unique objects were considered.\n", + (unsigned long)all_objects->size); fprintf(stderr, "Redundant packs (with indexes):\n"); } pl = red = pack_list_difference(local_packs, min); From 0086e2c854e3af3209915e4ec2f933bcef400050 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 13 Nov 2005 02:07:02 -0800 Subject: [PATCH 08/21] Rename lost+found to lost-found. Because we use "lost-found" as the directory name to hold dangling object names, it is confusing to call the command git-lost+found, although it makes sense and is even cute ;-). Signed-off-by: Junio C Hamano --- .gitignore | 2 +- Documentation/{git-lost+found.txt => git-lost-found.txt} | 8 ++++---- Documentation/git.txt | 2 +- Makefile | 2 +- git-lost+found.sh => git-lost-found.sh | 0 5 files changed, 7 insertions(+), 7 deletions(-) rename Documentation/{git-lost+found.txt => git-lost-found.txt} (93%) rename git-lost+found.sh => git-lost-found.sh (100%) diff --git a/.gitignore b/.gitignore index 328b399f9f..16a8af63f0 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,7 @@ git-index-pack git-init-db git-local-fetch git-log -git-lost+found +git-lost-found git-ls-files git-ls-remote git-ls-tree diff --git a/Documentation/git-lost+found.txt b/Documentation/git-lost-found.txt similarity index 93% rename from Documentation/git-lost+found.txt rename to Documentation/git-lost-found.txt index a8cc5739d7..03156f218b 100644 --- a/Documentation/git-lost+found.txt +++ b/Documentation/git-lost-found.txt @@ -1,13 +1,13 @@ -git-lost+found(1) +git-lost-found(1) ================= NAME ---- -git-lost+found - Recover lost refs that luckily have not yet been pruned. +git-lost-found - Recover lost refs that luckily have not yet been pruned. SYNOPSIS -------- -'git-lost+found' +'git-lost-found' DESCRIPTION ----------- @@ -31,7 +31,7 @@ The ref to your tag is overwritten, but until you run 'git prune', it is still there. ------------ -$ git lost+found +$ git lost-found [1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c ... ------------ diff --git a/Documentation/git.txt b/Documentation/git.txt index a9d47c115c..1c32dd5be7 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -309,7 +309,7 @@ gitlink:git-convert-objects[1]:: gitlink:git-cvsimport[1]:: Salvage your data out of another SCM people love to hate. -gitlink:git-lost+found[1]:: +gitlink:git-lost-found[1]:: Recover lost refs that luckily have not yet been pruned. gitlink:git-merge-one-file[1]:: diff --git a/Makefile b/Makefile index b75cb13787..5b2eca8973 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,7 @@ SCRIPT_SH = \ git-applymbox.sh git-applypatch.sh git-am.sh \ git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \ git-merge-resolve.sh git-merge-ours.sh git-grep.sh \ - git-lost+found.sh + git-lost-found.sh SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ diff --git a/git-lost+found.sh b/git-lost-found.sh similarity index 100% rename from git-lost+found.sh rename to git-lost-found.sh From 4b1ca25e429a67de4828c029b053dea637732722 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Mon, 14 Nov 2005 08:31:00 +0100 Subject: [PATCH 09/21] Remove trailing slashes SVN dies a messy death when passed a path with trailing slashes. --- git-svnimport.perl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git-svnimport.perl b/git-svnimport.perl index cb9afb955c..af13fdd8e4 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -280,7 +280,8 @@ sub revert_split_path($$) { $svnpath = "$branch_name/$branch/$path"; } - return $svnpath + $svnpath =~ s#/+$##; + return $svnpath; } sub get_file($$$) { @@ -372,6 +373,10 @@ sub copy_path($$$$$$$$) { my($newrev,$newbranch,$path,$oldpath,$rev,$node_kind,$new,$parents) = @_; my($srcbranch,$srcpath) = split_path($rev,$oldpath); + unless(defined $srcbranch) { + print "Path not found when copying from $oldpath @ $rev\n"; + return; + } my $therev = branch_rev($srcbranch, $rev); my $gitrev = $branches{$srcbranch}{$therev}; unless($gitrev) { From 94d2331770b08dc28faf1d950a546a0feb953323 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 13 Nov 2005 01:46:13 -0800 Subject: [PATCH 10/21] Separate LDFLAGS and CFLAGS. Stuffing -L flag and friends meant for the linking phase into ALL_CFLAGS is not right; honor LDFLAGS and introduce ALL_LDFLAGS to separate them out. Signed-off-by: Junio C Hamano --- Makefile | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5b2eca8973..eeedf8ceb9 100644 --- a/Makefile +++ b/Makefile @@ -52,10 +52,12 @@ GIT_VERSION = 0.99.9.GIT -# CFLAGS is for the users to override from the command line. +# CFLAGS and LDFLAGS are for the users to override from the command line. CFLAGS = -g -O2 -Wall +LDFLAGS = ALL_CFLAGS = $(CFLAGS) +ALL_LDFLAGS = $(LDFLAGS) prefix = $(HOME) bindir = $(prefix)/bin @@ -187,9 +189,11 @@ ifeq ($(uname_S),Darwin) NEEDS_SSL_WITH_CRYPTO = YesPlease NEEDS_LIBICONV = YesPlease ## fink - ALL_CFLAGS += -I/sw/include -L/sw/lib + ALL_CFLAGS += -I/sw/include + ALL_LDFLAGS += -L/sw/lib ## darwinports - ALL_CFLAGS += -I/opt/local/include -L/opt/local/lib + ALL_CFLAGS += -I/opt/local/include + ALL_LDFLAGS += -L/opt/local/lib endif ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease @@ -211,7 +215,13 @@ endif ifeq ($(uname_S),OpenBSD) NO_STRCASESTR = YesPlease NEEDS_LIBICONV = YesPlease - ALL_CFLAGS += -I/usr/local/include -L/usr/local/lib + ALL_CFLAGS += -I/usr/local/include + ALL_LDFLAGS += -L/usr/local/lib +endif +ifeq ($(uname_S),NetBSD) + NEEDS_LIBICONV = YesPlease + ALL_CFLAGS += -I/usr/pkg/include + ALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib endif ifneq (,$(findstring arm,$(uname_M))) ARM_SHA1 = YesPlease @@ -221,7 +231,7 @@ endif ifndef NO_CURL ifdef CURLDIR - # This is still problematic -- gcc does not want -R. + # This is still problematic -- gcc does not always want -R. ALL_CFLAGS += -I$(CURLDIR)/include CURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl else @@ -369,12 +379,13 @@ git-cherry-pick: git-revert $(CC) -o $*.o -c $(ALL_CFLAGS) $< git-%$X: %.o $(LIB_FILE) - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) + $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV) $(SIMPLE_PROGRAMS) : $(LIB_FILE) $(SIMPLE_PROGRAMS) : git-%$X : %.o - $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB) + $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ + $(LIB_FILE) $(SIMPLE_LIB) git-http-fetch$X: fetch.o git-local-fetch$X: fetch.o @@ -408,10 +419,10 @@ test: all $(MAKE) -C t/ all test-date$X: test-date.c date.o ctype.o - $(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o ctype.o + $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) test-date.c date.o ctype.o test-delta$X: test-delta.c diff-delta.o patch-delta.o - $(CC) $(ALL_CFLAGS) -o $@ $^ + $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^ check: for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done From b0c698a6e41c47ef3e036367e58a0cf2639c1f0d Mon Sep 17 00:00:00 2001 From: Josef Weidendorfer Date: Sun, 13 Nov 2005 15:03:31 +0100 Subject: [PATCH 11/21] Bugfix: stop if directory already exists Fix a typo: We do not want to run the directory as command, and want to terminate if the directory exists Additionally, update the usage message Signed-off-by: Josef Weidendorfer Signed-off-by: Junio C Hamano --- git-clone.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-clone.sh b/git-clone.sh index f99e0adf86..c09979a7a4 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -9,7 +9,7 @@ unset CDPATH usage() { - echo >&2 "* git clone [-l [-s]] [-q] [-u ] [-n] " + echo >&2 "* git clone [-l [-s]] [-q] [-u ] [-n] []" exit 1 } @@ -98,7 +98,7 @@ fi dir="$2" # Try using "humanish" part of source repo if user didn't specify one [ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's|/$||' -e 's|:*/*\.git$||' -e 's|.*/||g') -[ -e "$dir" ] && $(echo "$dir already exists."; usage) +[ -e "$dir" ] && echo "$dir already exists." && usage mkdir -p "$dir" && D=$( (cd "$dir" && git-init-db && pwd) From 1331df878113037aabc496860b49ed14a762517c Mon Sep 17 00:00:00 2001 From: Josef Weidendorfer Date: Sun, 13 Nov 2005 15:08:00 +0100 Subject: [PATCH 12/21] Remove git-rename. git-mv does the same Signed-off-by: Josef Weidendorfer Signed-off-by: Junio C Hamano --- .gitignore | 1 - Documentation/git-rename.txt | 32 ----------------- Documentation/git.txt | 3 -- Makefile | 2 +- git-rename.perl | 70 ------------------------------------ 5 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 Documentation/git-rename.txt delete mode 100755 git-rename.perl diff --git a/.gitignore b/.gitignore index 16a8af63f0..0dd7b9c7b4 100644 --- a/.gitignore +++ b/.gitignore @@ -74,7 +74,6 @@ git-read-tree git-rebase git-receive-pack git-relink -git-rename git-repack git-request-pull git-reset diff --git a/Documentation/git-rename.txt b/Documentation/git-rename.txt deleted file mode 100644 index 583cb0315e..0000000000 --- a/Documentation/git-rename.txt +++ /dev/null @@ -1,32 +0,0 @@ -git-rename(1) -============= - -NAME ----- -git-rename - Script used to rename a file, directory or symlink. - - -SYNOPSIS --------- -'git-rename' - -DESCRIPTION ------------ -This script is used to rename a file, directory or symlink. - -The index is updated after successful completion, but the change must still be -committed. - -Author ------- -Written by Linus Torvalds -Rewritten by Ryan Anderson - -Documentation --------------- -Documentation by David Greaves, Junio C Hamano and the git-list . - -GIT ---- -Part of the gitlink:git[7] suite - diff --git a/Documentation/git.txt b/Documentation/git.txt index 1c32dd5be7..7045f3f97e 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -262,9 +262,6 @@ gitlink:git-push[1]:: gitlink:git-rebase[1]:: Rebase local commits to new upstream head. -gitlink:git-rename[1]:: - Rename files and directories. - gitlink:git-repack[1]:: Pack unpacked objects in a repository. diff --git a/Makefile b/Makefile index eeedf8ceb9..63cb99847f 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ SCRIPT_SH = \ SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ - git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \ + git-shortlog.perl git-fmt-merge-msg.perl \ git-svnimport.perl git-mv.perl git-cvsexportcommit.perl SCRIPT_PYTHON = \ diff --git a/git-rename.perl b/git-rename.perl deleted file mode 100755 index 3b1127b1b2..0000000000 --- a/git-rename.perl +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl -# -# Copyright 2005, Ryan Anderson -# -# This file is licensed under the GPL v2, or a later version -# at the discretion of Linus Torvalds. - - -use warnings; -use strict; - -sub usage($); - -# Sanity checks: -my $GIT_DIR = $ENV{'GIT_DIR'} || ".git"; - -unless ( -d $GIT_DIR && -d $GIT_DIR . "/objects" && - -d $GIT_DIR . "/objects/" && -d $GIT_DIR . "/refs") { - usage("Git repository not found."); -} - -usage("") if scalar @ARGV != 2; - -my ($src,$dst) = @ARGV; - -unless (-f $src || -l $src || -d $src) { - usage("git rename: bad source '$src'"); -} - -if (-e $dst) { - usage("git rename: destinations '$dst' already exists"); -} - -my (@allfiles,@srcfiles,@dstfiles); - -$/ = "\0"; -open(F,"-|","git-ls-files","-z") - or die "Failed to open pipe from git-ls-files: " . $!; - -@allfiles = map { chomp; $_; } ; -close(F); - -my $safesrc = quotemeta($src); -@srcfiles = grep /^$safesrc/, @allfiles; -@dstfiles = @srcfiles; -s#^$safesrc(/|$)#$dst$1# for @dstfiles; - -rename($src,$dst) - or die "rename failed: $!"; - -my $rc = system("git-update-index","--add","--",@dstfiles); -die "git-update-index failed to add new name with code $?\n" if $rc; - -$rc = system("git-update-index","--remove","--",@srcfiles); -die "git-update-index failed to remove old name with code $?\n" if $rc; - - -sub usage($) { - my $s = shift; - print $s, "\n" if (length $s != 0); - print < -source must exist and be either a file, symlink or directory. -dest must NOT exist. - -Renames source to dest, and updates the git cache to reflect the change. -Use "git commit" to make record the change permanently. -EOT - exit(1); -} From 0f3f5e3f69020f8d08a9ca7b097cb225b933dafb Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Mon, 14 Nov 2005 17:41:31 +0100 Subject: [PATCH 13/21] Depend on asciidoc 7 (at least). --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index d2a923407a..965fb6281b 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: git-core Section: devel Priority: optional Maintainer: Junio C Hamano -Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev|libcurl3-gnutls-dev|libcurl3-openssl-dev, asciidoc (>= 6.0.3), xmlto, debhelper (>= 4.0.0), bc +Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev|libcurl3-gnutls-dev|libcurl3-openssl-dev, asciidoc (>= 7), xmlto, debhelper (>= 4.0.0), bc Standards-Version: 3.6.1 Package: git-core From d4072c9722d1ef28abe8ef0eb0b244017fff3f42 Mon Sep 17 00:00:00 2001 From: Andreas Ericsson Date: Mon, 14 Nov 2005 17:53:42 +0100 Subject: [PATCH 14/21] git-branch: Mention -d and -D in man-page. Signed-off-by: Andreas Ericsson Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index a7121a4c63..98014f6d9b 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -3,11 +3,11 @@ git-branch(1) NAME ---- -git-branch - Create a new branch. +git-branch - Create a new branch, or remove an old one. SYNOPSIS -------- -'git-branch' [ [start-point]] +'git-branch' [-d | -D] [ [start-point]] DESCRIPTION ----------- @@ -19,11 +19,18 @@ created, otherwise it will be created at the current HEAD. OPTIONS ------- +-d:: + Delete a branch. The branch must be fully merged. + +-D:: + Delete a branch irrespective of its index status. + :: - The name of the branch to create. + The name of the branch to create or delete. start-point:: - Where to create the branch; defaults to HEAD. + Where to create the branch; defaults to HEAD. This + option has no meaning with -d and -D. Author ------ From 2ed02887bda74871bad64f1be36fb4f60d07706e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 14 Nov 2005 10:01:26 -0800 Subject: [PATCH 15/21] Fix git-rev-list "date order" with --topo-order This fixes git-rev-list so that when there are multiple branches, we still sort the heads in proper approximate date order even when sorting the output topologically. This makes things like gitk --all -d work sanely and show the branches in date order (where "date order" is obviously modified by the paren-child dependency requirements of the topological sort). The trivial fix is to just build the "work" list in date order rather than inserting the new work entries at the beginning. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- commit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commit.c b/commit.c index 534c03ea59..ebf4db6416 100644 --- a/commit.c +++ b/commit.c @@ -536,7 +536,7 @@ int count_parents(struct commit * commit) void sort_in_topological_order(struct commit_list ** list) { struct commit_list * next = *list; - struct commit_list * work = NULL; + struct commit_list * work = NULL, **insert; struct commit_list ** pptr = list; struct sort_node * nodes; struct sort_node * next_nodes; @@ -580,11 +580,12 @@ void sort_in_topological_order(struct commit_list ** list) * the tips serve as a starting set for the work queue. */ next=*list; + insert = &work; while (next) { struct sort_node * node = (struct sort_node *)next->item->object.util; if (node->indegree == 0) { - commit_list_insert(next->item, &work); + insert = &commit_list_insert(next->item, insert)->next; } next=next->next; } From 9add69b1b1f76db874ed899c46fbe0b252aa3c23 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 14 Nov 2005 17:15:07 -0800 Subject: [PATCH 16/21] apply: fix binary patch detection. The comparison to find "Binary files " string was looking at a wrong place when offset != 0. Also, we may have the full 40-byte textual sha1 on the index line; two off-by-one errors prevented it. Signed-off-by: Junio C Hamano --- apply.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apply.c b/apply.c index 34181188b8..590adc6afa 100644 --- a/apply.c +++ b/apply.c @@ -370,7 +370,7 @@ static int gitdiff_index(const char *line, struct patch *patch) int len; ptr = strchr(line, '.'); - if (!ptr || ptr[1] != '.' || 40 <= ptr - line) + if (!ptr || ptr[1] != '.' || 40 < ptr - line) return 0; len = ptr - line; memcpy(patch->old_sha1_prefix, line, len); @@ -384,7 +384,7 @@ static int gitdiff_index(const char *line, struct patch *patch) ptr = eol; len = ptr - line; - if (40 <= len) + if (40 < len) return 0; memcpy(patch->new_sha1_prefix, line, len); patch->new_sha1_prefix[len] = 0; @@ -895,7 +895,8 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch) static const char binhdr[] = "Binary files "; if (sizeof(binhdr) - 1 < size - offset - hdrsize && - !memcmp(binhdr, buffer + hdrsize, sizeof(binhdr)-1)) + !memcmp(binhdr, buffer + hdrsize + offset, + sizeof(binhdr)-1)) patch->is_binary = 1; if (patch->is_binary && !apply && !check) From b2309b70197f9067cb32a620465a9b3477d8f0c3 Mon Sep 17 00:00:00 2001 From: Nikolai Weibull Date: Tue, 15 Nov 2005 00:20:01 +0100 Subject: [PATCH 17/21] Document the -n command-line option to git-unpack-objects This patch documents the -n command-line option to git-unpack-objects, as it was previously undocumented. Signed-off-by: Nikolai Weibull Signed-off-by: Junio C Hamano --- Documentation/git-unpack-objects.txt | 6 +++++- unpack-objects.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt index b716ba1ad3..31ea34d229 100644 --- a/Documentation/git-unpack-objects.txt +++ b/Documentation/git-unpack-objects.txt @@ -8,7 +8,7 @@ git-unpack-objects - Unpack objects from a packed archive. SYNOPSIS -------- -'git-unpack-objects' [-q] static int dry_run, quiet; -static const char unpack_usage[] = "git-unpack-objects [-q] < pack-file"; +static const char unpack_usage[] = "git-unpack-objects [-n] [-q] < pack-file"; /* We always read in 4kB chunks. */ static unsigned char buffer[4096]; From 2db0bfbc04478d9fb42f58ff50ad4123a2a9ddde Mon Sep 17 00:00:00 2001 From: Nikolai Weibull Date: Tue, 15 Nov 2005 00:20:01 +0100 Subject: [PATCH 18/21] Document a couple of missing command-line options. This patch adds documentation to quite a few command-line options. Signed-off-by: Nikolai Weibull Signed-off-by: Junio C Hamano --- Documentation/git-checkout-index.txt | 10 +++++----- Documentation/git-prune-packed.txt | 6 ++++++ Documentation/git-read-tree.txt | 4 ++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt index 94b283a6bf..5bff4865f7 100644 --- a/Documentation/git-checkout-index.txt +++ b/Documentation/git-checkout-index.txt @@ -18,21 +18,21 @@ Will copy all files listed from the index to the working directory OPTIONS ------- --u:: +-u|--index:: update stat information for the checked out entries in the index file. --q:: +-q|--quiet:: be quiet if files exist or are not in the index --f:: +-f|--force:: forces overwrite of existing files --a:: +-a|--all:: checks out all files in the index. Cannot be used together with explicit filenames. --n:: +-n|--no-create:: Don't checkout new files, only refresh files already checked out. diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt index 28a1500d39..8d96a91b41 100644 --- a/Documentation/git-prune-packed.txt +++ b/Documentation/git-prune-packed.txt @@ -23,6 +23,12 @@ compression applied, stored in a single file, with an associated index file. Packs are used to reduce the load on mirror systems, backup engines, disk storage, etc. +OPTIONS +------- +-n:: + Don't actually remove any objects, only show those that would have been + removed. + Author ------ Written by Linus Torvalds diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt index e219c6a788..7be0cbd620 100644 --- a/Documentation/git-read-tree.txt +++ b/Documentation/git-read-tree.txt @@ -30,6 +30,10 @@ OPTIONS -m:: Perform a merge, not just a read. +--reset:: + + Same as -m except that unmerged entries will be silently ignored. + -u:: After a successful merge, update the files in the work tree with the result of the merge. From 7acab8f16785151f9b6d9bbd8a9b0a8b76b26fba Mon Sep 17 00:00:00 2001 From: Nikolai Weibull Date: Tue, 15 Nov 2005 00:20:01 +0100 Subject: [PATCH 19/21] Documentation nitpicking This patch fixes some small problems with the documentation. Signed-off-by: Nikolai Weibull Signed-off-by: Junio C Hamano --- Documentation/git-commit-tree.txt | 2 +- Documentation/git-update-index.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index b64cd6a84b..5cf6bd3e21 100644 --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -8,7 +8,7 @@ git-commit-tree - Creates a new commit object SYNOPSIS -------- -'git-commit-tree' [-p ]\ < changelog +'git-commit-tree' [-p ]\* < changelog DESCRIPTION ----------- diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 52874c8562..fdcb8bea7d 100644 --- a/Documentation/git-update-index.txt +++ b/Documentation/git-update-index.txt @@ -60,7 +60,7 @@ OPTIONS Directly insert the specified info into the index. --index-info:: - Read index info from stdin. + Read index information from stdin. --chmod=(+|-)x:: Set the execute permissions on the updated files. From 08db81a9f1e4072790f0257f5398e8408e3d6816 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Mon, 14 Nov 2005 23:10:59 +0100 Subject: [PATCH 20/21] allow git-update-ref create refs with slashes in names Make git-update-ref create references with slashes in them. git-branch and git-checkout already support such reference names. git-branch can use git-update-ref to create the references in a more formal manner now. Signed-off-by: Junio C Hamano --- git-branch.sh | 5 ++--- t/t3200-branch.sh | 8 ++++++++ update-ref.c | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/git-branch.sh b/git-branch.sh index 67f113acb9..11d52fd78e 100755 --- a/git-branch.sh +++ b/git-branch.sh @@ -102,6 +102,5 @@ rev=$(git-rev-parse --verify "$head") || exit git-check-ref-format "heads/$branchname" || die "we do not like '$branchname' as a branch name." -leading=`expr "refs/heads/$branchname" : '\(.*\)/'` && -mkdir -p "$GIT_DIR/$leading" && -echo $rev > "$GIT_DIR/refs/heads/$branchname" +git update-ref "refs/heads/$branchname" $rev + diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 5f98f64de1..36f7749bed 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -24,4 +24,12 @@ test_expect_failure \ 'git branch --help should not have created a bogus branch' \ 'test -f .git/refs/heads/--help' +test_expect_success \ + 'git branch abc should create a branch' \ + 'git-branch abc && test -f .git/refs/heads/abc' + +test_expect_success \ + 'git branch a/b/c should create a branch' \ + 'git-branch a/b/c && test -f .git/refs/heads/a/b/c' + test_done diff --git a/update-ref.c b/update-ref.c index d79dc52fd7..e6fbddbab6 100644 --- a/update-ref.c +++ b/update-ref.c @@ -19,7 +19,8 @@ static int re_verify(const char *path, unsigned char *oldsha1, unsigned char *cu int main(int argc, char **argv) { char *hex; - const char *refname, *value, *oldval, *path, *lockpath; + const char *refname, *value, *oldval, *path; + char *lockpath; unsigned char sha1[20], oldsha1[20], currsha1[20]; int fd, written; @@ -49,6 +50,8 @@ int main(int argc, char **argv) } path = strdup(path); lockpath = mkpath("%s.lock", path); + if (safe_create_leading_directories(lockpath) < 0) + die("Unable to create all of %s", lockpath); fd = open(lockpath, O_CREAT | O_EXCL | O_WRONLY, 0666); if (fd < 0) From d7bba815753bf8c31886fcf6bb89c9e6250674a5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 14 Nov 2005 18:15:30 -0800 Subject: [PATCH 21/21] Update topo-order test. The recently we updated rev-list --topo-order to show the heads in date order, but we had a test that expected to see the old behaviour. Signed-off-by: Junio C Hamano --- t/t6003-rev-list-topo-order.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh index 3c4c44c24d..98f9a1e677 100755 --- a/t/t6003-rev-list-topo-order.sh +++ b/t/t6003-rev-list-topo-order.sh @@ -25,7 +25,7 @@ on_committer_date "1971-08-16 00:00:05" save_tag a1 unique_commit a1 tree -p a0 on_committer_date "1971-08-16 00:00:06" save_tag b1 unique_commit b1 tree -p a0 on_committer_date "1971-08-16 00:00:07" save_tag c1 unique_commit c1 tree -p b1 on_committer_date "1971-08-16 00:00:08" as_author foobar@example.com save_tag b2 unique_commit b2 tree -p b1 -on_committer_date "1971-08-16 00:00:09" save_tag b3 unique_commit b2 tree -p b2 +on_committer_date "1971-08-16 00:00:09" save_tag b3 unique_commit b3 tree -p b2 on_committer_date "1971-08-16 00:00:10" save_tag c2 unique_commit c2 tree -p c1 -p b2 on_committer_date "1971-08-16 00:00:11" save_tag c3 unique_commit c3 tree -p c2 on_committer_date "1971-08-16 00:00:12" save_tag a2 unique_commit a2 tree -p a1 @@ -116,15 +116,15 @@ g0 EOF test_output_expect_success 'multiple heads' 'git-rev-list --topo-order a3 b3 c3' <