From 928c210a47fb7e38c56744bb14570638e6c23d7f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 20 Apr 2007 17:25:27 -0700 Subject: git-clone: fix dumb protocol transport to clone from pack-pruned ref This forward-ports a fix from 2986c022 to git-clone. Signed-off-by: Junio C Hamano --- git-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-clone.sh b/git-clone.sh index 513b574d13..cad5c0c088 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -60,7 +60,7 @@ Perhaps git-update-server-info needs to be run there?" else tname=$name fi - git-http-fetch $v -a -w "$tname" "$name" "$1" || exit 1 + git-http-fetch $v -a -w "$tname" "$sha1" "$1" || exit 1 done <"$clone_tmp/refs" rm -fr "$clone_tmp" http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" || -- cgit v1.2.3 From 4a40cbd949d81863375a10e320f74c8fc595d05e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 21 Apr 2007 00:55:00 -0700 Subject: perl: install private Error.pm if the site version is older than our own bdash (on IRC) had a problem with Git.pm (via git-svn) when his site installation of Error.pm was older than the version we package. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- perl/Makefile.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl/Makefile.PL b/perl/Makefile.PL index 9b117fd0d7..437516142c 100644 --- a/perl/Makefile.PL +++ b/perl/Makefile.PL @@ -13,7 +13,7 @@ my %pm = ('Git.pm' => '$(INST_LIBDIR)/Git.pm'); # We come with our own bundled Error.pm. It's not in the set of default # Perl modules so install it if it's not available on the system yet. eval { require Error }; -if ($@) { +if ($@ || $Error::VERSION < 0.15009) { $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm'; } -- cgit v1.2.3 From 97317061c6799765c7f2f83d8e3f4f74df469793 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 21 Apr 2007 13:57:07 -0700 Subject: GIT 1.5.1.2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.1.2.txt | 27 ++++++++++++++++++++------- GIT-VERSION-GEN | 2 +- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Documentation/RelNotes-1.5.1.2.txt b/Documentation/RelNotes-1.5.1.2.txt index f58268f6be..d88456306c 100644 --- a/Documentation/RelNotes-1.5.1.2.txt +++ b/Documentation/RelNotes-1.5.1.2.txt @@ -1,4 +1,4 @@ -GIT v1.5.1.2 Release Notes (draft) +GIT v1.5.1.2 Release Notes ========================== Fixes since v1.5.1.1 @@ -6,6 +6,11 @@ Fixes since v1.5.1.1 * Bugfixes + - "git clone" over http from a repository that has lost the + loose refs by running "git pack-refs" were broken (a code to + deal with this was added to "git fetch" in v1.5.0, but it + was missing from "git clone"). + - "git diff a/ b/" incorrectly fell in "diff between two filesystem objects" codepath, when the user most likely wanted to limit the extent of output to two tracked @@ -24,14 +29,22 @@ Fixes since v1.5.1.1 - git-blame on a very long working tree path had buffer overrun problem. + - git-apply did not like to be fed two patches in a row that created + and then modified the same file. + + - git-svn was confused when a non-project was stored directly under + trunk/, branches/ and tags/. + + - git-svn wants the Error.pm module that was at least as new + as what we ship as part of git; install ours in our private + installation location if the one on the system is older. + + - An earlier update to command line integer parameter parser was + botched and made 'update-index --cacheinfo' completely useless. + + * Documentation updates - Various documentation updates from J. Bruce Fields, Frank Lichtenheld, Alex Riesen and others. Andrew Ruder started a war on undocumented options. - ---- -exec >/var/tmp/1 -O=v1.5.1.1-31-g0220f1e -echo O=`git describe refs/heads/maint` -git shortlog --no-merges $O..refs/heads/maint diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 2325660ff4..41ee8b4ea2 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.5.1.1.GIT +DEF_VER=v1.5.1.2.GIT LF=' ' -- cgit v1.2.3 From c7f34c180b7117cf60ad12a8b180eed33716e390 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 23 Apr 2007 10:21:25 +0200 Subject: dir.c(common_prefix): Fix two bugs The function common_prefix() is used to find the common subdirectory of a couple of pathnames. When checking if the next pathname matches up with the prefix, it incorrectly checked the whole path, not just the prefix (including the slash). Thus, the expensive part of the loop was executed always. The other bug is more serious: if the first and the last pathname in the list have a longer common prefix than the common prefix for _all_ pathnames in the list, the longer one would be chosen. This bug was probably hidden by the fact that bash's wildcard expansion sorts the results, and the code just so happens to work with sorted input. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- dir.c | 3 ++- t/t3700-add.sh | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dir.c b/dir.c index b48e19dc09..602282bd1b 100644 --- a/dir.c +++ b/dir.c @@ -24,8 +24,9 @@ int common_prefix(const char **pathspec) prefix = slash - path + 1; while ((next = *++pathspec) != NULL) { int len = strlen(next); - if (len >= prefix && !memcmp(path, next, len)) + if (len >= prefix && !memcmp(path, next, prefix)) continue; + len = prefix - 1; for (;;) { if (!len) return 0; diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 08e035220c..ad8cc7d4ae 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -104,4 +104,10 @@ test_expect_success 'add ignored ones with -f' ' git-ls-files --error-unmatch d.ig/d.if d.ig/d.ig ' +mkdir 1 1/2 1/3 +touch 1/2/a 1/3/b 1/2/c +test_expect_success 'check correct prefix detection' ' + git add 1/2/a 1/3/b 1/2/c +' + test_done -- cgit v1.2.3 From 81178fe48c1466f400741842f9e3da1528cfd124 Mon Sep 17 00:00:00 2001 From: Brian Gernhardt Date: Mon, 23 Apr 2007 19:56:45 -0400 Subject: Reverse the order of -b and --track in the man page. Using "-b --track newbranch oldbranch" gives the error: git checkout: updating paths is incompatible with switching branches/forcing However, "--track -b ..." works just fine. Signed-off-by: Brian Gernhardt Signed-off-by: Junio C Hamano --- Documentation/git-checkout.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 4f2e847dc3..918d8ee720 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -8,7 +8,7 @@ git-checkout - Checkout and switch to a branch SYNOPSIS -------- [verse] -'git-checkout' [-q] [-f] [-b [--track | --no-track] [-l]] [-m] [] +'git-checkout' [-q] [-f] [[--track | --no-track] -b [-l]] [-m] [] 'git-checkout' [] ... DESCRIPTION -- cgit v1.2.3 From 6777c3806da18d4a3a05e5bcdde0aa9efb9b3b9f Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 23 Apr 2007 17:32:04 -0700 Subject: Fix typo in git-am: s/Was is/Was it/ Signed-off-by: Josh Triplett Signed-off-by: Junio C Hamano --- git-am.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-am.sh b/git-am.sh index e69ecbfdb1..c9f66e2784 100755 --- a/git-am.sh +++ b/git-am.sh @@ -291,7 +291,7 @@ do <"$dotest/$msgnum" >"$dotest/info" || stop_here $this test -s $dotest/patch || { - echo "Patch is empty. Was is split wrong?" + echo "Patch is empty. Was it split wrong?" stop_here $this } git-stripspace < "$dotest/msg" > "$dotest/msg-clean" -- cgit v1.2.3 From ce748f59923b3a3d432d6e8a12366f71284b595f Mon Sep 17 00:00:00 2001 From: Brian Gernhardt Date: Mon, 23 Apr 2007 20:02:34 -0400 Subject: Ignore all man sections as they are generated files. Signed-off-by: Brian Gernhardt Signed-off-by: Junio C Hamano --- Documentation/.gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/.gitignore b/Documentation/.gitignore index b98d21e98e..a37b2152bd 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -1,7 +1,6 @@ *.xml *.html -*.1 -*.7 +*.[1-8] *.made howto-index.txt doc.dep -- cgit v1.2.3 From bbc6354171a08e2c43d651f8645bcdb76bf9f92b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 23 Apr 2007 23:17:41 -0700 Subject: Build RPM with ETC_GITCONFIG=/etc/gitconfig Signed-off-by: Junio C Hamano --- git.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git.spec.in b/git.spec.in index 46aee88fd1..87197d10e1 100644 --- a/git.spec.in +++ b/git.spec.in @@ -86,12 +86,14 @@ Perl interface to Git %build make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \ + ETC_GITCONFIG=/etc/gitconfig \ prefix=%{_prefix} all %{!?_without_docs: doc} %install rm -rf $RPM_BUILD_ROOT make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \ WITH_OWN_SUBPROCESS_PY=YesPlease \ + ETC_GITCONFIG=/etc/gitconfig \ prefix=%{_prefix} mandir=%{_mandir} INSTALLDIRS=vendor \ install %{!?_without_docs: install-doc} find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' -- cgit v1.2.3 From 41728d69426dd707d4978929f8f4ac7a16f115f3 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Mon, 23 Apr 2007 12:06:29 +0000 Subject: Documentation/git-reset.txt: suggest git commit --amend in example. In example 'Undo a commit and redo', refer to 'git commit --amend', as this is the easier alternative. Signed-off-by: Junio C Hamano --- Documentation/git-reset.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 5b55cda512..19c5b9bbda 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -67,6 +67,8 @@ message, or both. Leaves working tree as it was before "reset". <3> "reset" copies the old head to .git/ORIG_HEAD; redo the commit by starting with its log message. If you do not need to edit the message further, you can give -C option instead. ++ +See also the --amend option to gitlink:git-commit[1]. Undo commits permanently:: + -- cgit v1.2.3 From b51b8bbf146d17556226bff14f97957e84aa0207 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 24 Apr 2007 00:51:35 -0700 Subject: Create a sysconfdir variable, and use it for ETC_GITCONFIG ETC_GITCONFIG defaults to $(prefix)/etc/gitconfig, so if you just set prefix=/usr, you end up with a git that looks in /usr/etc/gitconfig, rather than /etc/gitconfig as specified by the FHS. Furthermore, setting ETC_GITCONFIG does not fix the paths to any future system-wide configuration files. Factor out the path to the system-wide configuration directory into a variable sysconfdir, normally set to $(prefix)/etc, but set to /etc when prefix=/usr . This fixes the prefix=/usr problem for ETC_GITCONFIG, and allows centralized configuration of any future system-wide configuration files without requiring further action from package maintainers or other people building and installing git. Signed-off-by: Josh Triplett Signed-off-by: Junio C Hamano --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dcdaa02e47..b61c5d4cd2 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,12 @@ prefix = $(HOME) bindir = $(prefix)/bin gitexecdir = $(bindir) template_dir = $(prefix)/share/git-core/templates/ -ETC_GITCONFIG = $(prefix)/etc/gitconfig +ifeq ($(prefix),/usr) +sysconfdir = /etc +else +sysconfdir = $(prefix)/etc +endif +ETC_GITCONFIG = $(sysconfdir)/gitconfig # DESTDIR= # default configuration for gitweb @@ -152,7 +157,7 @@ GITWEB_FAVICON = git-favicon.png GITWEB_SITE_HEADER = GITWEB_SITE_FOOTER = -export prefix bindir gitexecdir template_dir +export prefix bindir gitexecdir template_dir sysconfdir CC = gcc AR = ar -- cgit v1.2.3 From 7d4f4a2f0dd440ce6116ed318440c2474afdd843 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 24 Apr 2007 14:27:00 -0700 Subject: applymbox & quiltimport: typofix. 6777c380 fixed only one of three typos introduced in an earlier patch 87ab7992. This fixes the other two. Signed-off-by: Junio C Hamano --- git-applymbox.sh | 2 +- git-quiltimport.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git-applymbox.sh b/git-applymbox.sh index 3efd6a7464..c18e80ff8c 100755 --- a/git-applymbox.sh +++ b/git-applymbox.sh @@ -78,7 +78,7 @@ do git-mailinfo $keep_subject $utf8 \ .dotest/msg .dotest/patch <$i >.dotest/info || exit 1 test -s .dotest/patch || { - echo "Patch is empty. Was is split wrong?" + echo "Patch is empty. Was it split wrong?" exit 1 } git-stripspace < .dotest/msg > .dotest/msg-clean diff --git a/git-quiltimport.sh b/git-quiltimport.sh index 018cc75bd0..a7a6757dd8 100755 --- a/git-quiltimport.sh +++ b/git-quiltimport.sh @@ -74,7 +74,7 @@ for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do echo $patch_name (cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3 test -s .dotest/patch || { - echo "Patch is empty. Was is split wrong?" + echo "Patch is empty. Was it split wrong?" exit 1 } -- cgit v1.2.3 From ce11873921e19be44082660882e07b205082643b Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Tue, 24 Apr 2007 18:02:07 -0700 Subject: Remove usernames from all commit messages, not just when using svmprops Signed-off-by: Sam Vilain Signed-off-by: Adam Roben Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- git-svn.perl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index efc4c88a4e..077d6b3a13 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1866,11 +1866,14 @@ sub make_log_entry { } elsif ($self->use_svnsync_props) { my $full_url = $self->svnsync->{url}; $full_url .= "/$self->{path}" if length $self->{path}; + remove_username($full_url); my $uuid = $self->svnsync->{uuid}; $log_entry{metadata} = "$full_url\@$rev $uuid"; $email ||= "$author\@$uuid" } else { - $log_entry{metadata} = $self->metadata_url. "\@$rev " . + my $url = $self->metadata_url; + remove_username($url); + $log_entry{metadata} = "$url\@$rev " . $self->ra->get_uuid; $email ||= "$author\@" . $self->ra->get_uuid; } -- cgit v1.2.3 From d1efefa46fda6bb68bcd73a5e532eef98ef28a1d Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 25 Apr 2007 04:02:27 -0400 Subject: Actually handle some-low memory conditions Tim Ansell discovered his Debian server didn't permit git-daemon to use as much memory as it needed to handle cloning a project with a 128 MiB packfile. Filtering the strace provided by Tim of the rev-list child showed this gem of a sequence: open("./objects/pack/pack-*.pack", O_RDONLY|O_LARGEFILE <... open resumed> ) = 5 OK, so the packfile is fd 5... mmap2(NULL, 33554432, PROT_READ, MAP_PRIVATE, 5, 0 <... mmap2 resumed> ) = 0xb5e2d000 and we mapped one 32 MiB window from it at position 0... mmap2(NULL, 31020635, PROT_READ, MAP_PRIVATE, 5, 0x6000 <... mmap2 resumed> ) = -1 ENOMEM (Cannot allocate memory) And we asked for another window further into the file. But got denied. In Tim's case this was due to a resource limit on the git-daemon process, and its children. Now where are we in the code? We're down inside use_pack(), after we have called unuse_one_window() enough times to make sure we stay within our allowed maximum window size. However since we didn't unmap the prior window at 0xb5e2d000 we aren't exceeding the current limit (which probably was just the defaults). But we're actually down inside xmmap()... So we release the window we do have (by calling release_pack_memory), assuming there is some memory pressure... munmap(0xb5e2d000, 33554432 <... munmap resumed> ) = 0 close(5 <... close resumed> ) = 0 And that was the last window in this packfile. So we closed it. Way to go us. Our xmmap did not expect release_pack_memory to close the fd its about to map... mmap2(NULL, 31020635, PROT_READ, MAP_PRIVATE, 5, 0x6000 <... mmap2 resumed> ) = -1 EBADF (Bad file descriptor) And so the Linux kernel happily tells us f' off. write(2, "fatal: ", 7 <... write resumed> ) = 7 write(2, "Out of memory? mmap failed: Bad "..., 47 <... write resumed> ) = 47 And we report the bad file descriptor error, and not the ENOMEM, and die, claiming we are out of memory. But actually that mmap should have succeeded, as we had enough memory for that window, seeing as how we released the prior one. Originally when I developed the sliding window mmap feature I had this exact same bug in fast-import, and I dealt with it by handing in the struct packed_git* we want to open the new window for, as the caller wasn't prepared to reopen the packfile if unuse_one_window closed it. The same is true here from xmmap, but the caller doesn't have the struct packed_git* handy. So I'm using the file descriptor instead to perform the same test. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- git-compat-util.h | 12 ++++++------ sha1_file.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 5f6a281b78..e3cf3703bb 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -156,13 +156,13 @@ extern size_t gitstrlcpy(char *, const char *, size_t); extern uintmax_t gitstrtoumax(const char *, char **, int); #endif -extern void release_pack_memory(size_t); +extern void release_pack_memory(size_t, int); static inline char* xstrdup(const char *str) { char *ret = strdup(str); if (!ret) { - release_pack_memory(strlen(str) + 1); + release_pack_memory(strlen(str) + 1, -1); ret = strdup(str); if (!ret) die("Out of memory, strdup failed"); @@ -176,7 +176,7 @@ static inline void *xmalloc(size_t size) if (!ret && !size) ret = malloc(1); if (!ret) { - release_pack_memory(size); + release_pack_memory(size, -1); ret = malloc(size); if (!ret && !size) ret = malloc(1); @@ -195,7 +195,7 @@ static inline void *xrealloc(void *ptr, size_t size) if (!ret && !size) ret = realloc(ptr, 1); if (!ret) { - release_pack_memory(size); + release_pack_memory(size, -1); ret = realloc(ptr, size); if (!ret && !size) ret = realloc(ptr, 1); @@ -211,7 +211,7 @@ static inline void *xcalloc(size_t nmemb, size_t size) if (!ret && (!nmemb || !size)) ret = calloc(1, 1); if (!ret) { - release_pack_memory(nmemb * size); + release_pack_memory(nmemb * size, -1); ret = calloc(nmemb, size); if (!ret && (!nmemb || !size)) ret = calloc(1, 1); @@ -228,7 +228,7 @@ static inline void *xmmap(void *start, size_t length, if (ret == MAP_FAILED) { if (!length) return NULL; - release_pack_memory(length); + release_pack_memory(length, fd); ret = mmap(start, length, prot, flags, fd, offset); if (ret == MAP_FAILED) die("Out of memory? mmap failed: %s", strerror(errno)); diff --git a/sha1_file.c b/sha1_file.c index 9c26038420..523417027a 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -516,7 +516,7 @@ static void scan_windows(struct packed_git *p, } } -static int unuse_one_window(struct packed_git *current) +static int unuse_one_window(struct packed_git *current, int keep_fd) { struct packed_git *p, *lru_p = NULL; struct pack_window *lru_w = NULL, *lru_l = NULL; @@ -532,7 +532,7 @@ static int unuse_one_window(struct packed_git *current) lru_l->next = lru_w->next; else { lru_p->windows = lru_w->next; - if (!lru_p->windows && lru_p != current) { + if (!lru_p->windows && lru_p->pack_fd != keep_fd) { close(lru_p->pack_fd); lru_p->pack_fd = -1; } @@ -544,10 +544,10 @@ static int unuse_one_window(struct packed_git *current) return 0; } -void release_pack_memory(size_t need) +void release_pack_memory(size_t need, int fd) { size_t cur = pack_mapped; - while (need >= (cur - pack_mapped) && unuse_one_window(NULL)) + while (need >= (cur - pack_mapped) && unuse_one_window(NULL, fd)) ; /* nothing */ } @@ -680,7 +680,7 @@ unsigned char* use_pack(struct packed_git *p, win->len = (size_t)len; pack_mapped += win->len; while (packed_git_limit < pack_mapped - && unuse_one_window(p)) + && unuse_one_window(p, p->pack_fd)) ; /* nothing */ win->base = xmmap(NULL, win->len, PROT_READ, MAP_PRIVATE, -- cgit v1.2.3 From c21aa54e190e6527f05a2a943b343032e9dac90b Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Thu, 26 Apr 2007 00:28:17 +0200 Subject: Fix handle leak in write_tree This is a quick and dirty fix for the broken "git cherry-pick -n" on some broken OS, which does not remove the directory entry after unlink succeeded(!) if the file is still open somewher. The entry is left but "protected": no open, no unlink, no stat. Very annoying. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- builtin-write-tree.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builtin-write-tree.c b/builtin-write-tree.c index 90fc1cfcf4..a1894814f7 100644 --- a/builtin-write-tree.c +++ b/builtin-write-tree.c @@ -36,8 +36,10 @@ int write_tree(unsigned char *sha1, int missing_ok, const char *prefix) die("git-write-tree: error building trees"); if (0 <= newfd) { if (!write_cache(newfd, active_cache, active_nr) - && !close(newfd)) + && !close(newfd)) { commit_lock_file(lock_file); + newfd = -1; + } } /* Not being able to write is fine -- we are only interested * in updating the cache-tree part, and if the next caller @@ -55,6 +57,8 @@ int write_tree(unsigned char *sha1, int missing_ok, const char *prefix) else hashcpy(sha1, active_cache_tree->sha1); + if (0 <= newfd) + close(newfd); rollback_lock_file(lock_file); return 0; -- cgit v1.2.3 From b03c7a63a0fae58a576749d7a6b0507edde12584 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Wed, 25 Apr 2007 11:50:32 -0700 Subject: git-svn: Don't rely on $_ after making a function call Many functions and operators in perl set $_, so its value cannot be relied upon after calling arbitrary functions. The solution is simply to copy the value of $_ into a local variable that will not get overwritten. Signed-off-by: Adam Roben Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- git-svn.perl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 077d6b3a13..90f3bc18b9 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -771,19 +771,19 @@ sub cmt_metadata { sub working_head_info { my ($head, $refs) = @_; my ($fh, $ctx) = command_output_pipe('rev-list', $head); - while (<$fh>) { - chomp; - my ($url, $rev, $uuid) = cmt_metadata($_); + while (my $hash = <$fh>) { + chomp($hash); + my ($url, $rev, $uuid) = cmt_metadata($hash); if (defined $url && defined $rev) { if (my $gs = Git::SVN->find_by_url($url)) { my $c = $gs->rev_db_get($rev); - if ($c && $c eq $_) { + if ($c && $c eq $hash) { close $fh; # break the pipe return ($url, $rev, $uuid, $gs); } } } - unshift @$refs, $_ if $refs; + unshift @$refs, $hash if $refs; } command_close_pipe($fh, $ctx); (undef, undef, undef, undef); -- cgit v1.2.3 From 238cc6352eabe3f87f13093bc4015162bf424509 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:15 -0700 Subject: Document --dry-run parameter to send-email. Looks like --dry-run was added to the code, but never to the --help output. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-send-email.perl b/git-send-email.perl index 1278fcba46..5e38a97cb6 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -77,6 +77,8 @@ Options: --quiet Make git-send-email less verbose. One line per email should be all that is output. + --dry-run Do everything except actually send the emails. + EOT exit(1); } -- cgit v1.2.3 From 71c7da94218fbe36e64a326825ff30ef811b2a88 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:16 -0700 Subject: Prefix Dry- to the message status to denote dry-runs. While doing testing, it's useful to see that a dry run was actually done, instead of a real one. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 5e38a97cb6..50d45fe005 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -488,9 +488,9 @@ X-Mailer: git-send-email $gitversion $smtp->ok or die "Failed to send $subject\n".$smtp->message; } if ($quiet) { - printf "Sent %s\n", $subject; + printf (($dry_run ? "Dry-" : "")."Sent %s\n", $subject); } else { - print "OK. Log says:\nDate: $date\n"; + print (($dry_run ? "Dry-" : "")."OK. Log says:\nDate: $date\n"); if ($smtp) { print "Server: $smtp_server\n"; } else { -- cgit v1.2.3 From 8e3d436b0b5148bac11259bac55621e285eeb6c4 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:17 -0700 Subject: Debugging cleanup improvements The debug output is much more helpful if it has the parameters that were used. Pull the sendmail parameters into a seperate array for that, and also include similar data during the Net::SMTP case. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 50d45fe005..36795c8bdd 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -465,15 +465,15 @@ X-Mailer: git-send-email $gitversion $header .= join("\n", @xh) . "\n"; } + my @sendmail_parameters = ('-i', map { extract_valid_address($_) } @recipients); + if ($dry_run) { # We don't want to send the email. } elsif ($smtp_server =~ m#^/#) { my $pid = open my $sm, '|-'; defined $pid or die $!; if (!$pid) { - exec($smtp_server,'-i', - map { extract_valid_address($_) } - @recipients) or die $!; + exec($smtp_server, @sendmail_parameters) or die $!; } print $sm "$header\n$message"; close $sm or die $?; @@ -493,8 +493,10 @@ X-Mailer: git-send-email $gitversion print (($dry_run ? "Dry-" : "")."OK. Log says:\nDate: $date\n"); if ($smtp) { print "Server: $smtp_server\n"; + print "MAIL FROM: $from\n"; + print "RCPT TO: ".join(',',@recipients)."\n"; } else { - print "Sendmail: $smtp_server\n"; + print "Sendmail: $smtp_server ".join(' ',@sendmail_parameters)."\n"; } print "From: $from\nSubject: $subject\nCc: $cc\nTo: $to\n\n"; if ($smtp) { -- cgit v1.2.3 From af068d274245be9aedc58e6835c2e43329639974 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:18 -0700 Subject: Change the scope of the $cc variable as it is not needed outside of send_message. $cc is only used inside the send_message scope, so lets clean it out of the global scope. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 36795c8bdd..ad83009e23 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -379,7 +379,7 @@ if (@files) { } # Variables we set as part of the loop over files -our ($message_id, $cc, %mail, $subject, $reply_to, $references, $message); +our ($message_id, %mail, $subject, $reply_to, $references, $message); sub extract_valid_address { my $address = shift; @@ -420,7 +420,6 @@ sub make_message_id -$cc = ""; $time = time - scalar $#files; sub unquote_rfc2047 { @@ -443,7 +442,8 @@ sub send_message $gitversion = Git::version(); } - my ($author_name) = ($from =~ /^(.*?)\s+ Date: Wed, 25 Apr 2007 19:37:19 -0700 Subject: Perform correct quoting of recipient names. Always perform quoting of the recipient names if they contain periods, previously only the author's address was treated this way. This stops sendmail binaries from exploding the name into bad addresses. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index ad83009e23..e4fe8965bb 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -431,9 +431,22 @@ sub unquote_rfc2047 { return "$_"; } +# If an address contains a . in the name portion, the name must be quoted. +sub sanitize_address_rfc822 +{ + my ($recipient) = @_; + my ($recipient_name) = ($recipient =~ /^(.*?)\s+ Date: Wed, 25 Apr 2007 19:37:20 -0700 Subject: Validate @recipients before using it for sendmail and Net::SMTP. Ensure that @recipients is only raw addresses when it is handed to the sendmail binary OR Net::SMTP, otherwise BCC cases might get an extra <, or wierd stuff might be passed to the exec. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index e4fe8965bb..b602292904 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -449,6 +449,7 @@ sub send_message @cc = (map { sanitize_address_rfc822($_) } @cc); my $to = join (",\n\t", @recipients); @recipients = unique_email_list(@recipients,@cc,@bcclist); + @recipients = (map { extract_valid_address($_) } @recipients); my $date = format_2822_time($time++); my $gitversion = '@@GIT_VERSION@@'; if ($gitversion =~ m/..GIT_VERSION../) { @@ -474,7 +475,7 @@ X-Mailer: git-send-email $gitversion $header .= join("\n", @xh) . "\n"; } - my @sendmail_parameters = ('-i', map { extract_valid_address($_) } @recipients); + my @sendmail_parameters = ('-i', @recipients); if ($dry_run) { # We don't want to send the email. -- cgit v1.2.3 From 2b69bfc23d89d2ec5507bc6906b533e8429b313d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:21 -0700 Subject: Ensure clean addresses are always used with Net::SMTP Always pass in clean addresses to Net::SMTP for the MAIL FROM, and use them on the SMTP non-quiet output as well. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index b602292904..35c4722a15 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -476,6 +476,7 @@ X-Mailer: git-send-email $gitversion } my @sendmail_parameters = ('-i', @recipients); + my $raw_from = extract_valid_address($from); if ($dry_run) { # We don't want to send the email. @@ -490,7 +491,7 @@ X-Mailer: git-send-email $gitversion } else { require Net::SMTP; $smtp ||= Net::SMTP->new( $smtp_server ); - $smtp->mail( $from ) or die $smtp->message; + $smtp->mail( $raw_from ) or die $smtp->message; $smtp->to( @recipients ) or die $smtp->message; $smtp->data or die $smtp->message; $smtp->datasend("$header\n$message") or die $smtp->message; @@ -501,10 +502,10 @@ X-Mailer: git-send-email $gitversion printf (($dry_run ? "Dry-" : "")."Sent %s\n", $subject); } else { print (($dry_run ? "Dry-" : "")."OK. Log says:\nDate: $date\n"); - if ($smtp) { + if ($smtp_server !~ m#^/#) { print "Server: $smtp_server\n"; - print "MAIL FROM: $from\n"; - print "RCPT TO: ".join(',',@recipients)."\n"; + print "MAIL FROM:<$raw_from>\n"; + print "RCPT TO:".join(',',(map { "<$_>" } @recipients))."\n"; } else { print "Sendmail: $smtp_server ".join(' ',@sendmail_parameters)."\n"; } -- cgit v1.2.3 From f073a592d6400b3aa653ce02943535bf917078b5 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:22 -0700 Subject: Allow users to optionally specify their envelope sender. If your normal user is not the same user you are subscribed to a list with, then the default envelope sender used will cause your messages to bounce or silently vanish into the ether. This patch provides an optional parameter to set the envelope sender. To use it with the sendmail binary, you must have privileges to use the -f parameter! Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index 35c4722a15..56c2936f27 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -79,6 +79,8 @@ Options: --dry-run Do everything except actually send the emails. + --envelope-sender Specify the envelope sender used to send the emails. + EOT exit(1); } @@ -139,6 +141,7 @@ my (@to,@cc,@initial_cc,@bcclist,@xh, my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc, $dry_run) = (1, 0, 0, 0, 0); my $smtp_server; +my $envelope_sender; # Example reply to: #$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>'; @@ -177,6 +180,7 @@ my $rc = GetOptions("from=s" => \$from, "suppress-from" => \$suppress_from, "no-signed-off-cc|no-signed-off-by-cc" => \$no_signed_off_cc, "dry-run" => \$dry_run, + "envelope-sender=s" => \$envelope_sender, ); unless ($rc) { @@ -476,7 +480,11 @@ X-Mailer: git-send-email $gitversion } my @sendmail_parameters = ('-i', @recipients); - my $raw_from = extract_valid_address($from); + my $raw_from = $from; + $raw_from = $envelope_sender if (defined $envelope_sender); + $raw_from = extract_valid_address($raw_from); + unshift (@sendmail_parameters, + '-f', $raw_from) if(defined $envelope_sender); if ($dry_run) { # We don't want to send the email. -- cgit v1.2.3 From 03044a9854b006a64c5117d971b01c1d1586edd9 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:23 -0700 Subject: Document --dry-run and envelope-sender for git-send-email. Catch the documentation up with the rest of this patchset. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- Documentation/git-send-email.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 682313e95d..795db873fc 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -85,6 +85,15 @@ The --cc option must be repeated for each user you want on the cc list. Do not add the From: address to the cc: list, if it shows up in a From: line. +--dry-run:: + Do everything except actually send the emails. + +--envelope-sender:: + Specify the envelope sender used to send the emails. + This is useful if your default address is not the address that is + subscribed to a list. If you use the sendmail binary, you must have + suitable privileges for the -f parameter. + --to:: Specify the primary recipient of the emails generated. Generally, this will be the upstream maintainer of the -- cgit v1.2.3 From 56973d20c181abdc5cc13eab976733feec0c590b Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Wed, 25 Apr 2007 12:42:58 -0700 Subject: git-svn: Ignore usernames in URLs in find_by_url Usernames don't matter for the purposes of find_by_url, so always remove them before doing any comparisons. Signed-off-by: Adam Roben Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- git-svn.perl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-svn.perl b/git-svn.perl index 90f3bc18b9..7b5f8ab3be 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1064,7 +1064,10 @@ sub init_remote_config { sub find_by_url { # repos_root and, path are optional my ($class, $full_url, $repos_root, $path) = @_; + return undef unless defined $full_url; + remove_username($full_url); + remove_username($repos_root) if defined $repos_root; my $remotes = read_all_remotes(); if (defined $full_url && defined $repos_root && !defined $path) { $path = $full_url; @@ -1072,6 +1075,7 @@ sub find_by_url { # repos_root and, path are optional } foreach my $repo_id (keys %$remotes) { my $u = $remotes->{$repo_id}->{url} or next; + remove_username($u); next if defined $repos_root && $repos_root ne $u; my $fetch = $remotes->{$repo_id}->{fetch} || {}; -- cgit v1.2.3 From bf7af1167411cbdd5ade7587a64b18d1b7b2ea69 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 21:53:22 -0700 Subject: Sanitize @to recipients. We need to sanitize @to as well to ensure that names are properly quoted. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 1 + 1 file changed, 1 insertion(+) diff --git a/git-send-email.perl b/git-send-email.perl index 56c2936f27..12ced28885 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -274,6 +274,7 @@ sub expand_aliases { } @to = expand_aliases(@to); +@to = (map { sanitize_address_rfc822($_) } @to); @initial_cc = expand_aliases(@initial_cc); @bcclist = expand_aliases(@bcclist); -- cgit v1.2.3 From 8abe88a29c0789276c6d028b76b1190630b101c6 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 25 Apr 2007 23:27:07 -0700 Subject: Start preparing for 1.5.1.3 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.1.3.txt | 38 ++++++++++++++++++++++++++++++++++++++ RelNotes | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Documentation/RelNotes-1.5.1.3.txt diff --git a/Documentation/RelNotes-1.5.1.3.txt b/Documentation/RelNotes-1.5.1.3.txt new file mode 100644 index 0000000000..9a4b069ccc --- /dev/null +++ b/Documentation/RelNotes-1.5.1.3.txt @@ -0,0 +1,38 @@ +GIT v1.5.1.3 Release Notes (draft) +========================== + +Fixes since v1.5.1.2 +-------------------- + +* Bugfixes + + - git-add tried to optimize by finding common leading + directories across its arguments but botched, causing very + confused behaviour. + + - unofficial rpm.spec file shipped with git was letting + ETC_GITCONFIG set to /usr/etc/gitconfig. Tweak the official + Makefile to make it harder for distro people to make the + same mistake, by setting the variable to /etc/gitconfig if + prefix is set to /usr. + + - git-svn inconsistently stripped away username from the URL + only when svnsync_props was in use. + + - git-send-email was not quoting recipient names that have + period '.' in them. Also it did not allow overriding + envelope sender, which made it impossible to send patches to + certain subscriber-only lists. + + - built-in write_tree() routine had a sequence that renamed a + file that is still open, which some systems did not like. + + - when memory is very tight, sliding mmap code to read + packfiles incorrectly closed the fd that was still being + used to read the pack. + +--- +exec >/var/tmp/1 +O=v1.5.1.2-23-gbf7af11 +echo O=`git describe refs/heads/maint` +git shortlog --no-merges $O..refs/heads/maint diff --git a/RelNotes b/RelNotes index 09f5a7413c..b630faa0c0 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.5.1.2.txt \ No newline at end of file +Documentation/RelNotes-1.5.1.3.txt \ No newline at end of file -- cgit v1.2.3 From 4551d05fe44c6d87ff8a24cfba7a79bba0179d5e Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:58:55 -0500 Subject: Removing -n option from git-diff-files documentation -n is not a short form of --no-index as the documentation suggests. Removing it from the documentation and command usage string. Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/git-diff-files.txt | 4 ++-- builtin-diff-files.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt index b78c4c64f1..2e1e29ef5a 100644 --- a/Documentation/git-diff-files.txt +++ b/Documentation/git-diff-files.txt @@ -8,7 +8,7 @@ git-diff-files - Compares files in the working tree and the index SYNOPSIS -------- -'git-diff-files' [-q] [-0|-1|-2|-3|-c|--cc|-n|--no-index] [] [...] +'git-diff-files' [-q] [-0|-1|-2|-3|-c|--cc|--no-index] [] [...] DESCRIPTION ----------- @@ -36,7 +36,7 @@ omit diff output for unmerged entries and just show "Unmerged". diff, similar to the way 'diff-tree' shows a merge commit with these flags. -\-n,\--no-index:: +--no-index:: Compare the two given files / directories. -q:: diff --git a/builtin-diff-files.c b/builtin-diff-files.c index 6ba5077a2b..6cb30c8e12 100644 --- a/builtin-diff-files.c +++ b/builtin-diff-files.c @@ -10,7 +10,7 @@ #include "builtin.h" static const char diff_files_usage[] = -"git-diff-files [-q] [-0/-1/2/3 |-c|--cc|-n|--no-index] [] [...]" +"git-diff-files [-q] [-0/-1/2/3 |-c|--cc|--no-index] [] [...]" COMMON_DIFF_OPTIONS_HELP; int cmd_diff_files(int argc, const char **argv, const char *prefix) -- cgit v1.2.3 From 42905294de0c1885f5636319c4790f184d767875 Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:58:56 -0500 Subject: Document additional options for git-fetch Document --quiet/-q and --verbose/-v Add -n as an alternate for --no-tags Fix some whitespace issues Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 5b4d184a73..bdc7332c7b 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -1,13 +1,20 @@ +-q, \--quiet:: + Pass --quiet to git-fetch-pack and silence any other internally + used programs. + +-v, \--verbose:: + Be verbose. + -a, \--append:: Append ref names and object names of fetched refs to the existing contents of `.git/FETCH_HEAD`. Without this option old data in `.git/FETCH_HEAD` will be overwritten. \--upload-pack :: - When given, and the repository to fetch from is handled - by 'git-fetch-pack', '--exec=' is passed to - the command to specify non-default path for the command - run on the other end. + When given, and the repository to fetch from is handled + by 'git-fetch-pack', '--exec=' is passed to + the command to specify non-default path for the command + run on the other end. -f, \--force:: When `git-fetch` is used with `:` @@ -16,7 +23,7 @@ fetches is a descendant of ``. This option overrides that check. -\--no-tags:: +-n, \--no-tags:: By default, `git-fetch` fetches tags that point at objects that are downloaded from the remote repository and stores them locally. This option disables this -- cgit v1.2.3 From 2bc060cc6fce9f51240bf35803a5690dd1813c7c Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:58:57 -0500 Subject: Update git-fmt-merge documentation Documentation/git-fmt-merge-msg.txt: --summary to list commit summaries on merge --no-summary --file to take merged objects from a file. Configuration option merge.summary Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/git-fmt-merge-msg.txt | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt index a70eb3994a..e560b30c57 100644 --- a/Documentation/git-fmt-merge-msg.txt +++ b/Documentation/git-fmt-merge-msg.txt @@ -8,7 +8,8 @@ git-fmt-merge-msg - Produce a merge commit message SYNOPSIS -------- -'git-fmt-merge-msg' <$GIT_DIR/FETCH_HEAD +git-fmt-merge-msg [--summary | --no-summary] <$GIT_DIR/FETCH_HEAD +git-fmt-merge-msg [--summary | --no-summray] -F DESCRIPTION ----------- @@ -19,6 +20,28 @@ passed as the '' argument of `git-merge`. This script is intended mostly for internal use by scripts automatically invoking `git-merge`. +OPTIONS +------- + +--summary:: + In addition to branch names, populate the log message with + one-line descriptions from the actual commits that are being + merged. + +--no-summary:: + Do not list one-line descriptions from the actual commits being + merged. + +--file , -F :: + Take the list of merged objects from instead of + stdin. + +CONFIGURATION +------------- + +merge.summary:: + Whether to include summaries of merged commits in newly + merge commit messages. False by default. SEE ALSO -------- -- cgit v1.2.3 From cf0d720b7f861e90b9cadfc989d5b57c4b1ff531 Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:58:58 -0500 Subject: Update git-grep documentation Documentation/git-grep.txt: Document -F/--fixed-strings to search for non-regexp patterns. Document -I to not search binary files. Document - as a shortcut for -C. Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/git-grep.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 0140c8e358..c5a5dad1ce 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -12,12 +12,13 @@ SYNOPSIS 'git-grep' [--cached] [-a | --text] [-I] [-i | --ignore-case] [-w | --word-regexp] [-v | --invert-match] [-h|-H] [--full-name] - [-E | --extended-regexp] [-G | --basic-regexp] [-F | --fixed-strings] - [-n] [-l | --files-with-matches] [-L | --files-without-match] + [-E | --extended-regexp] [-G | --basic-regexp] + [-F | --fixed-strings] [-n] + [-l | --files-with-matches] [-L | --files-without-match] [-c | --count] [--all-match] [-A ] [-B ] [-C ] - [-f ] [-e] [--and|--or|--not|(|)|-e ...] - [...] + [-f ] [-e] + [--and|--or|--not|(|)|-e ...] [...] [--] [...] DESCRIPTION @@ -39,6 +40,9 @@ OPTIONS Ignore case differences between the patterns and the files. +-I:: + Don't match the pattern in binary files. + -w | --word-regexp:: Match the pattern only at word boundary (either begin at the beginning of a line, or preceded by a non-word character; end at @@ -64,6 +68,10 @@ OPTIONS Use POSIX extended/basic regexp for patterns. Default is to use basic regexp. +-F | --fixed-strings:: + Use fixed strings for patterns (don't interpret pattern + as a regex). + -n:: Prefix the line number to matching lines. @@ -81,6 +89,9 @@ OPTIONS line containing `--` between contiguous groups of matches. +-:: + A shortcut for specifying -C. + -f :: Read patterns from , one per line. -- cgit v1.2.3 From a44f88e251a82c32dcc4715f063e3e3e39562a8d Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:58:59 -0500 Subject: Update -L documentation for git-blame/git-annotate Documenting alternate ways to use -L: -L /regex/,end -L start,+offset Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/blame-options.txt | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index 331f161c77..a46bf6ce70 100644 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@ -9,8 +9,28 @@ --show-stats:: Include additional statistics at the end of blame output. --L n,m:: - Annotate only the specified line range (lines count from 1). +-L ,:: + Annotate only the given line range. and can take + one of these forms: + + - number ++ +If or is a number, it specifies an +absolute line number (lines count from 1). ++ + +- /regex/ ++ +This form will use the first line matching the given +POSIX regex. If is a regex, it will search +starting at the line given by . ++ + +- +offset or -offset ++ +This is only valid for and will specify a number +of lines before or after the line given by . ++ -l:: Show long rev (Default: off). -- cgit v1.2.3 From d8190a8ec86bc9c75cd85352b0a186991c70a5bb Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:59:00 -0500 Subject: Update git-http-push documentation Documentation/git-http-push.txt: Changing --complete to --all. Added documentation for -d and -D to remote remote refs. Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/git-http-push.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/git-http-push.txt b/Documentation/git-http-push.txt index 4b4a46169c..a15cf5b2a3 100644 --- a/Documentation/git-http-push.txt +++ b/Documentation/git-http-push.txt @@ -8,7 +8,7 @@ git-http-push - Push objects over HTTP/DAV to another repository SYNOPSIS -------- -'git-http-push' [--complete] [--force] [--verbose] [...] +'git-http-push' [--all] [--force] [--verbose] [...] DESCRIPTION ----------- @@ -18,7 +18,7 @@ remote branch. OPTIONS ------- ---complete:: +--all:: Do not assume that the remote repository is complete in its current state, and verify all objects in the entire local ref's history exist in the remote repository. @@ -34,6 +34,15 @@ OPTIONS Report the list of objects being walked locally and the list of objects successfully sent to the remote repository. +-d, -D:: + Remove from remote repository. The specified branch + cannot be the remote HEAD. If -d is specified the following + other conditions must also be met: + + - Remote HEAD must resolve to an object that exists locally + - Specified branch resolves to an object that exists locally + - Specified branch is an ancestor of the remote HEAD + ...:: The remote refs to update. -- cgit v1.2.3 From f5158a07d26b957f700dc6cc4fdb5a693a1314b3 Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:59:01 -0500 Subject: Update git-local-fetch documentation Documentation/git-local-fetch.txt: -s to use symbolic links instead of file-to-file copy, -l to use hardlinks, -n to never use file-to-file copies, --recover to resume a failed fetch. Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/git-local-fetch.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/git-local-fetch.txt b/Documentation/git-local-fetch.txt index 22048d82bd..dd9e2387fc 100644 --- a/Documentation/git-local-fetch.txt +++ b/Documentation/git-local-fetch.txt @@ -24,6 +24,16 @@ OPTIONS Get all the objects. -v:: Report what is downloaded. +-s:: + Instead of regular file-to-file copying use symbolic links to the objects + in the remote repository. +-l:: + Before attempting symlinks (if -s is specified) or file-to-file copying the + remote objects, try to hardlink the remote objects into the local + repository. +-n:: + Never attempt to file-to-file copy remote objects. Only useful with + -s or -l command-line options. -w :: Writes the commit-id into the filename under $GIT_DIR/refs/ on @@ -35,6 +45,10 @@ OPTIONS ['\t'] +--recover:: + Verify that everything reachable from target is fetched. Used after + an earlier fetch is interrupted. + Author ------ Written by Junio C Hamano -- cgit v1.2.3 From 71e2e5993b6f2afdfda0cc92e0d55e84c9f876b0 Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 26 Apr 2007 23:59:02 -0500 Subject: Update git-http-fetch documentation Documentation/git-http-fetch.txt: --recover to resume a failed fetch operation. Signed-off-by: Andrew Ruder Signed-off-by: Junio C Hamano --- Documentation/git-http-fetch.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/git-http-fetch.txt b/Documentation/git-http-fetch.txt index 7dc2df3044..4deabc376c 100644 --- a/Documentation/git-http-fetch.txt +++ b/Documentation/git-http-fetch.txt @@ -39,6 +39,10 @@ commit-id:: ['\t'] +--recover:: + Verify that everything reachable from target is fetched. Used after + an earlier fetch is interrupted. + Author ------ Written by Linus Torvalds -- cgit v1.2.3