From bbe60241ae9f16c9356592e3fbaa709b6b848c4a Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 8 Mar 2006 17:56:07 -0800 Subject: [PATCH 01/13] git-fmt-merge-msg cleanup Since I've started using the "merge.summary" flag in my repo, my merge messages look nicer, but I dislike how I get notifications of merges within merges. So I'd suggest this trivial change.. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- git-fmt-merge-msg.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl index dae383f231..afe80e6321 100755 --- a/git-fmt-merge-msg.perl +++ b/git-fmt-merge-msg.perl @@ -47,7 +47,7 @@ sub current_branch { sub shortlog { my ($tip) = @_; my @result; - foreach ( qx{git-log --topo-order --pretty=oneline $tip ^HEAD} ) { + foreach ( qx{git-log --no-merges --topo-order --pretty=oneline $tip ^HEAD} ) { s/^[0-9a-f]{40}\s+//; push @result, $_; } From 3d99a7f4fab41bb057d62c87cb596069a5aba106 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Wed, 8 Mar 2006 13:19:19 -0500 Subject: [PATCH 02/13] test-delta needs zlib to compile Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1c555daa43..cd2c2db19d 100644 --- a/Makefile +++ b/Makefile @@ -564,7 +564,7 @@ test-date$X: 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 $@ $(ALL_LDFLAGS) $^ + $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^ -lz check: for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done From c13c6bf758457a3e7293b2adf63cc47aec8d83ef Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Wed, 8 Mar 2006 14:32:50 -0500 Subject: [PATCH 03/13] diff-delta: bound hash list length to avoid O(m*n) behavior The diff-delta code can exhibit O(m*n) behavior with some patological data set where most hash entries end up in the same hash bucket. To prevent this, a limit is imposed to the number of entries that can exist in the same hash bucket. Because of the above the code is a tiny bit more expensive on average, even if some small optimizations were added as well to atenuate the overhead. But the problematic samples used to diagnoze the issue are now orders of magnitude less expensive to process with only a slight loss in compression. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- diff-delta.c | 101 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 71 insertions(+), 30 deletions(-) diff --git a/diff-delta.c b/diff-delta.c index 2ed5984b1c..aaee7be4d2 100644 --- a/diff-delta.c +++ b/diff-delta.c @@ -40,17 +40,18 @@ struct index { static struct index ** delta_index(const unsigned char *buf, unsigned long bufsize, + unsigned long trg_bufsize, unsigned int *hash_shift) { - unsigned int hsize, hshift, entries, blksize, i; + unsigned int i, hsize, hshift, hlimit, entries, *hash_count; const unsigned char *data; struct index *entry, **hash; void *mem; /* determine index hash size */ - entries = (bufsize + BLK_SIZE - 1) / BLK_SIZE; + entries = bufsize / BLK_SIZE; hsize = entries / 4; - for (i = 4; (1 << i) < hsize && i < 16; i++); + for (i = 4; (1 << i) < hsize && i < 31; i++); hsize = 1 << i; hshift = 32 - i; *hash_shift = hshift; @@ -63,20 +64,62 @@ static struct index ** delta_index(const unsigned char *buf, entry = mem + hsize * sizeof(*hash); memset(hash, 0, hsize * sizeof(*hash)); - /* then populate it */ + /* allocate an array to count hash entries */ + hash_count = calloc(hsize, sizeof(*hash_count)); + if (!hash_count) { + free(hash); + return NULL; + } + + /* then populate the index */ data = buf + entries * BLK_SIZE - BLK_SIZE; - blksize = bufsize - (data - buf); while (data >= buf) { - unsigned int val = adler32(0, data, blksize); + unsigned int val = adler32(0, data, BLK_SIZE); i = HASH(val, hshift); entry->ptr = data; entry->val = val; entry->next = hash[i]; hash[i] = entry++; - blksize = BLK_SIZE; + hash_count[i]++; data -= BLK_SIZE; } + /* + * Determine a limit on the number of entries in the same hash + * bucket. This guard us against patological data sets causing + * really bad hash distribution with most entries in the same hash + * bucket that would bring us to O(m*n) computing costs (m and n + * corresponding to reference and target buffer sizes). + * + * The more the target buffer is large, the more it is important to + * have small entry lists for each hash buckets. With such a limit + * the cost is bounded to something more like O(m+n). + */ + hlimit = (1 << 26) / trg_bufsize; + if (hlimit < 4*BLK_SIZE) + hlimit = 4*BLK_SIZE; + + /* + * Now make sure none of the hash buckets has more entries than + * we're willing to test. Otherwise we cull the entry list + * uniformly to still preserve a good repartition across + * the reference buffer. + */ + for (i = 0; i < hsize; i++) { + if (hash_count[i] < hlimit) + continue; + entry = hash[i]; + do { + struct index *keep = entry; + int skip = hash_count[i] / hlimit / 2; + do { + entry = entry->next; + } while(--skip && entry); + keep->next = entry; + } while(entry); + } + free(hash_count); + return hash; } @@ -100,7 +143,7 @@ void *diff_delta(void *from_buf, unsigned long from_size, if (!from_size || !to_size) return NULL; - hash = delta_index(from_buf, from_size, &hash_shift); + hash = delta_index(from_buf, from_size, to_size, &hash_shift); if (!hash) return NULL; @@ -141,29 +184,27 @@ void *diff_delta(void *from_buf, unsigned long from_size, while (data < top) { unsigned int moff = 0, msize = 0; - unsigned int blksize = MIN(top - data, BLK_SIZE); - unsigned int val = adler32(0, data, blksize); - i = HASH(val, hash_shift); - for (entry = hash[i]; entry; entry = entry->next) { - const unsigned char *ref = entry->ptr; - const unsigned char *src = data; - unsigned int ref_size = ref_top - ref; - if (entry->val != val) - continue; - if (ref_size > top - src) - ref_size = top - src; - while (ref_size && *src++ == *ref) { - ref++; - ref_size--; - } - ref_size = ref - entry->ptr; - if (ref_size > msize) { - /* this is our best match so far */ - moff = entry->ptr - ref_data; - msize = ref_size; - if (msize >= 0x10000) { - msize = 0x10000; + if (data + BLK_SIZE <= top) { + unsigned int val = adler32(0, data, BLK_SIZE); + i = HASH(val, hash_shift); + for (entry = hash[i]; entry; entry = entry->next) { + const unsigned char *ref = entry->ptr; + const unsigned char *src = data; + unsigned int ref_size = ref_top - ref; + if (entry->val != val) + continue; + if (ref_size > top - src) + ref_size = top - src; + if (ref_size > 0x10000) + ref_size = 0x10000; + if (ref_size <= msize) break; + while (ref_size-- && *src++ == *ref) + ref++; + if (msize < ref - entry->ptr) { + /* this is our best match so far */ + msize = ref - entry->ptr; + moff = entry->ptr - ref_data; } } } From d2c4af73738229e2b7c640f818f56f17d1d9edf8 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Thu, 9 Mar 2006 05:04:36 +0100 Subject: [PATCH 04/13] Don't recurse into parents marked uninteresting. revision.c:make_parents_uninteresting() is exponential with the number of merges in the tree. That's fine -- unless some other part of git already has pulled the whole commit tree into memory ... Signed-off-by: Junio C Hamano --- revision.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/revision.c b/revision.c index 2a33637f62..713f27e3ce 100644 --- a/revision.c +++ b/revision.c @@ -82,18 +82,20 @@ void mark_parents_uninteresting(struct commit *commit) while (parents) { struct commit *commit = parents->item; - commit->object.flags |= UNINTERESTING; + if (!(commit->object.flags & UNINTERESTING)) { + commit->object.flags |= UNINTERESTING; - /* - * Normally we haven't parsed the parent - * yet, so we won't have a parent of a parent - * here. However, it may turn out that we've - * reached this commit some other way (where it - * wasn't uninteresting), in which case we need - * to mark its parents recursively too.. - */ - if (commit->parents) - mark_parents_uninteresting(commit); + /* + * Normally we haven't parsed the parent + * yet, so we won't have a parent of a parent + * here. However, it may turn out that we've + * reached this commit some other way (where it + * wasn't uninteresting), in which case we need + * to mark its parents recursively too.. + */ + if (commit->parents) + mark_parents_uninteresting(commit); + } /* * A missing commit is ok iff its parent is marked From 1d52aba8397723235e6007d0ee38126714af113e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 9 Mar 2006 03:48:47 -0800 Subject: [PATCH 05/13] contrib/git-svn: fix svn compat and fetch args 'svn info' doesn't work with URLs in svn <= 1.1. Now we only run svn info in local directories. As a side effect, this should also work better for 'init' off directories that are no longer in the latest revision of the repository. svn checkout -r arguments are fixed. Newer versions of svn (1.2.x) seem to need URL@REV as well as -rREV to checkout a particular revision... Add an example in the manpage of how to track directory that has been moved since its initial revision. A huge thanks to Yann Dirson for the bug reporting and testing my original patch. Thanks also to Junio C Hamano for suggesting a safer way to use git-rev-parse. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- contrib/git-svn/git-svn.perl | 63 +++++++++++++++++++++++++----------- contrib/git-svn/git-svn.txt | 32 ++++++++++++++++-- 2 files changed, 75 insertions(+), 20 deletions(-) diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl index 3c860e458c..dca4e5c412 100755 --- a/contrib/git-svn/git-svn.perl +++ b/contrib/git-svn/git-svn.perl @@ -30,6 +30,7 @@ my $sha1_short = qr/[a-f\d]{4,40}/; my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit, $_find_copies_harder, $_l, $_version, $_upgrade, $_authors); my (@_branch_from, %tree_map, %users); +my $_svn_co_url_revs; my %fc_opts = ( 'no-ignore-externals' => \$_no_ignore_ext, 'branch|b=s' => \@_branch_from, @@ -77,7 +78,7 @@ usage(0) if $_help; version() if $_version; usage(1) unless defined $cmd; load_authors() if $_authors; -svn_check_ignore_externals(); +svn_compat_check(); $cmd{$cmd}->[0]->(@ARGV); exit 0; @@ -162,7 +163,8 @@ sub rebuild { croak "SVN repository location required: $url\n"; } $SVN_URL ||= $url; - $SVN_UUID ||= setup_git_svn(); + $SVN_UUID ||= $uuid; + setup_git_svn(); $latest = $rev; } assert_revision_eq_or_unknown($rev, $c); @@ -171,9 +173,7 @@ sub rebuild { } close $rev_list or croak $?; if (!chdir $SVN_WC) { - my @svn_co = ('svn','co',"-r$latest"); - push @svn_co, '--ignore-externals' unless $_no_ignore_ext; - sys(@svn_co, $SVN_URL, $SVN_WC); + svn_cmd_checkout($SVN_URL, $latest, $SVN_WC); chdir $SVN_WC or croak $!; } @@ -222,14 +222,14 @@ sub fetch { my $base = shift @$svn_log or croak "No base revision!\n"; my $last_commit = undef; unless (-d $SVN_WC) { - my @svn_co = ('svn','co',"-r$base->{revision}"); - push @svn_co,'--ignore-externals' unless $_no_ignore_ext; - sys(@svn_co, $SVN_URL, $SVN_WC); + svn_cmd_checkout($SVN_URL,$base->{revision},$SVN_WC); chdir $SVN_WC or croak $!; + read_uuid(); $last_commit = git_commit($base, @parents); assert_svn_wc_clean($base->{revision}, $last_commit); } else { chdir $SVN_WC or croak $!; + read_uuid(); $last_commit = file_to_s("$REV_DIR/$base->{revision}"); } my @svn_up = qw(svn up); @@ -275,7 +275,9 @@ sub commit { fetch(); chdir $SVN_WC or croak $!; - my $svn_current_rev = svn_info('.')->{'Last Changed Rev'}; + my $info = svn_info('.'); + read_uuid($info); + my $svn_current_rev = $info->{'Last Changed Rev'}; foreach my $c (@revs) { my $mods = svn_checkout_tree($svn_current_rev, $c); if (scalar @$mods == 0) { @@ -314,6 +316,14 @@ sub show_ignore { ########################### utility functions ######################### +sub read_uuid { + return if $SVN_UUID; + my $info = shift || svn_info('.'); + $SVN_UUID = $info->{'Repository UUID'} or + croak "Repository UUID unreadable\n"; + s_to_file($SVN_UUID,"$GIT_DIR/$GIT_SVN/info/uuid"); +} + sub setup_git_svn { defined $SVN_URL or croak "SVN repository location required\n"; unless (-d $GIT_DIR) { @@ -323,14 +333,10 @@ sub setup_git_svn { mkpath(["$GIT_DIR/$GIT_SVN/info"]); mkpath([$REV_DIR]); s_to_file($SVN_URL,"$GIT_DIR/$GIT_SVN/info/url"); - $SVN_UUID = svn_info($SVN_URL)->{'Repository UUID'} or - croak "Repository UUID unreadable\n"; - s_to_file($SVN_UUID,"$GIT_DIR/$GIT_SVN/info/uuid"); open my $fd, '>>', "$GIT_DIR/$GIT_SVN/info/exclude" or croak $!; print $fd '.svn',"\n"; close $fd or croak $!; - return $SVN_UUID; } sub assert_svn_wc_clean { @@ -860,7 +866,6 @@ sub git_commit { my ($log_msg, @parents) = @_; assert_revision_unknown($log_msg->{revision}); my $out_fh = IO::File->new_tmpfile or croak $!; - $SVN_UUID ||= svn_info('.')->{'Repository UUID'}; map_tree_joins() if (@_branch_from && !%tree_map); @@ -922,7 +927,16 @@ sub git_commit { } my @update_ref = ('git-update-ref',"refs/remotes/$GIT_SVN",$commit); if (my $primary_parent = shift @exec_parents) { - push @update_ref, $primary_parent; + $pid = fork; + defined $pid or croak $!; + if (!$pid) { + close STDERR; + close STDOUT; + exec 'git-rev-parse','--verify', + "refs/remotes/$GIT_SVN^0"; + } + waitpid $pid, 0; + push @update_ref, $primary_parent unless $?; } sys(@update_ref); sys('git-update-ref',"$GIT_SVN/revs/$log_msg->{revision}",$commit); @@ -995,13 +1009,26 @@ sub safe_qx { return wantarray ? @ret : join('',@ret); } -sub svn_check_ignore_externals { - return if $_no_ignore_ext; - unless (grep /ignore-externals/,(safe_qx(qw(svn co -h)))) { +sub svn_compat_check { + my @co_help = safe_qx(qw(svn co -h)); + unless (grep /ignore-externals/,@co_help) { print STDERR "W: Installed svn version does not support ", "--ignore-externals\n"; $_no_ignore_ext = 1; } + if (grep /usage: checkout URL\[\@REV\]/,@co_help) { + $_svn_co_url_revs = 1; + } +} + +# *sigh*, new versions of svn won't honor -r without URL@, +# (and they won't honor URL@ without -r, too!) +sub svn_cmd_checkout { + my ($url, $rev, $dir) = @_; + my @cmd = ('svn','co', "-r$rev"); + push @cmd, '--ignore-externals' unless $_no_ignore_ext; + $url .= "\@$rev" if $_svn_co_url_revs; + sys(@cmd, $url, $dir); } sub check_upgrade_needed { diff --git a/contrib/git-svn/git-svn.txt b/contrib/git-svn/git-svn.txt index 8e9a971a85..5fb5b7c88c 100644 --- a/contrib/git-svn/git-svn.txt +++ b/contrib/git-svn/git-svn.txt @@ -175,8 +175,8 @@ COMPATIBILITY OPTIONS Do not use this flag unless you know exactly what you're getting yourself into. You have been warned. -Examples -~~~~~~~~ +Basic Examples +~~~~~~~~~~~~~~ Tracking and contributing to an Subversion managed-project: @@ -234,6 +234,34 @@ This allows you to tie unfetched SVN revision 375 to your current HEAD:: git-svn fetch 375=$(git-rev-parse HEAD) +Advanced Example: Tracking a Reorganized Repository +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If you're tracking a directory that has moved, or otherwise been +branched or tagged off of another directory in the repository and you +care about the full history of the project, then you can read this +section. + +This is how Yann Dirson tracked the trunk of the ufoai directory when +the /trunk directory of his repository was moved to /ufoai/trunk and +he needed to continue tracking /ufoai/trunk where /trunk left off. + + # This log message shows when the repository was reorganized:: + r166 | ydirson | 2006-03-02 01:36:55 +0100 (Thu, 02 Mar 2006) | 1 line + Changed paths: + D /trunk + A /ufoai/trunk (from /trunk:165) + + # First we start tracking the old revisions:: + GIT_SVN_ID=git-oldsvn git-svn init \ + https://svn.sourceforge.net/svnroot/ufoai/trunk + GIT_SVN_ID=git-oldsvn git-svn fetch -r1:165 + + # And now, we continue tracking the new revisions:: + GIT_SVN_ID=git-newsvn git-svn init \ + https://svn.sourceforge.net/svnroot/ufoai/ufoai/trunk + GIT_SVN_ID=git-newsvn git-svn fetch \ + 166=`git-rev-parse refs/remotes/git-oldsvn` + BUGS ---- If somebody commits a conflicting changeset to SVN at a bad moment From 7317ed906a17c91593f38831412379d4429528db Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 9 Mar 2006 03:50:34 -0800 Subject: [PATCH 06/13] contrib/git-svn: remove the --no-stop-on-copy flag Output a big warning if somebody actually has a pre-1.0 version of svn that doesn't support it. Thanks to Yann Dirson for reminding me it still existed and attempting to re-enable it :) I think I subconciously removed support for it earlier... Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- contrib/git-svn/git-svn.perl | 11 +++++++++++ contrib/git-svn/git-svn.txt | 13 ------------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl index dca4e5c412..43b50ecfb7 100755 --- a/contrib/git-svn/git-svn.perl +++ b/contrib/git-svn/git-svn.perl @@ -1019,6 +1019,17 @@ sub svn_compat_check { if (grep /usage: checkout URL\[\@REV\]/,@co_help) { $_svn_co_url_revs = 1; } + + # I really, really hope nobody hits this... + unless (grep /stop-on-copy/, (safe_qx(qw(svn log -h)))) { + print STDERR <<''; +W: The installed svn version does not support the --stop-on-copy flag in + the log command. + Lets hope the directory you're tracking is not a branch or tag + and was never moved within the repository... + + $_no_stop_copy = 1; + } } # *sigh*, new versions of svn won't honor -r without URL@, diff --git a/contrib/git-svn/git-svn.txt b/contrib/git-svn/git-svn.txt index 5fb5b7c88c..7a6e0c4a4a 100644 --- a/contrib/git-svn/git-svn.txt +++ b/contrib/git-svn/git-svn.txt @@ -162,19 +162,6 @@ COMPATIBILITY OPTIONS Otherwise, do not enable this flag unless you know what you're doing. ---no-stop-on-copy:: - Only used with the 'fetch' command. - - By default, git-svn passes --stop-on-copy to avoid dealing with - the copied/renamed branch directory problem entirely. A - copied/renamed branch is the result of a being created - in the past from a different source. These are problematic to - deal with even when working purely with svn if you work inside - subdirectories. - - Do not use this flag unless you know exactly what you're getting - yourself into. You have been warned. - Basic Examples ~~~~~~~~~~~~~~ From 779b14462523616cf84ea96690a983605fec2cdc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 9 Mar 2006 03:52:48 -0800 Subject: [PATCH 07/13] contrib/git-svn: fix a harmless warning on rebuild (with old repos) It's only for repositories that were imported with very early versions of git-svn. Unfortunately, some of those repos are out in the wild already, so fix this warning. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- contrib/git-svn/git-svn.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl index 43b50ecfb7..cf233ef6ed 100755 --- a/contrib/git-svn/git-svn.perl +++ b/contrib/git-svn/git-svn.perl @@ -155,7 +155,7 @@ sub rebuild { # if we merged or otherwise started elsewhere, this is # how we break out of it next if (defined $SVN_UUID && ($uuid ne $SVN_UUID)); - next if (defined $SVN_URL && ($url ne $SVN_URL)); + next if (defined $SVN_URL && defined $url && ($url ne $SVN_URL)); print "r$rev = $c\n"; unless (defined $latest) { From 5001422d30109b3c4471fd2d744e0a78a103c9d8 Mon Sep 17 00:00:00 2001 From: Fredrik Kuivinen Date: Thu, 9 Mar 2006 17:24:37 +0100 Subject: [PATCH 08/13] Fix some inconsistencies in the docs Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- Documentation/git-grep.txt | 2 +- Documentation/git-mv.txt | 2 +- Documentation/git-tag.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index bf4b592f48..fbd2394481 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -3,7 +3,7 @@ git-grep(1) NAME ---- -git-grep - print lines matching a pattern +git-grep - Print lines matching a pattern SYNOPSIS diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt index d242b39654..21a8664247 100644 --- a/Documentation/git-mv.txt +++ b/Documentation/git-mv.txt @@ -3,7 +3,7 @@ git-mv(1) NAME ---- -git-mv - Script used to move or rename a file, directory or symlink. +git-mv - Move or rename a file, directory or symlink. SYNOPSIS diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index e1c76c600d..45476c2e41 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -3,7 +3,7 @@ git-tag(1) NAME ---- -git-tag - Create a tag object signed with GPG +git-tag - Create a tag object signed with GPG SYNOPSIS From 7bd7f2804d84258a5cd1e76c610496f6beaa4cdf Mon Sep 17 00:00:00 2001 From: Fredrik Kuivinen Date: Thu, 9 Mar 2006 17:24:50 +0100 Subject: [PATCH 09/13] Remove trailing dot after short description Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- Documentation/git-add.txt | 2 +- Documentation/git-applypatch.txt | 2 +- Documentation/git-branch.txt | 2 +- Documentation/git-check-ref-format.txt | 2 +- Documentation/git-checkout.txt | 2 +- Documentation/git-cherry-pick.txt | 2 +- Documentation/git-cherry.txt | 2 +- Documentation/git-clone-pack.txt | 2 +- Documentation/git-clone.txt | 2 +- Documentation/git-count-objects.txt | 2 +- Documentation/git-daemon.txt | 2 +- Documentation/git-describe.txt | 2 +- Documentation/git-diff-stages.txt | 2 +- Documentation/git-diff.txt | 2 +- Documentation/git-fetch-pack.txt | 2 +- Documentation/git-fetch.txt | 2 +- Documentation/git-format-patch.txt | 2 +- Documentation/git-get-tar-commit-id.txt | 2 +- Documentation/git-hash-object.txt | 2 +- Documentation/git-http-push.txt | 2 +- Documentation/git-lost-found.txt | 2 +- Documentation/git-ls-remote.txt | 2 +- Documentation/git-ls-tree.txt | 2 +- Documentation/git-mailinfo.txt | 2 +- Documentation/git-mailsplit.txt | 2 +- Documentation/git-mv.txt | 2 +- Documentation/git-name-rev.txt | 2 +- Documentation/git-pack-objects.txt | 2 +- Documentation/git-pack-redundant.txt | 2 +- Documentation/git-patch-id.txt | 2 +- Documentation/git-peek-remote.txt | 2 +- Documentation/git-pull.txt | 2 +- Documentation/git-push.txt | 2 +- Documentation/git-rebase.txt | 2 +- Documentation/git-relink.txt | 2 +- Documentation/git-repo-config.txt | 2 +- Documentation/git-request-pull.txt | 2 +- Documentation/git-reset.txt | 2 +- Documentation/git-rev-parse.txt | 2 +- Documentation/git-revert.txt | 2 +- Documentation/git-rm.txt | 2 +- Documentation/git-send-pack.txt | 2 +- Documentation/git-sh-setup.txt | 2 +- Documentation/git-shortlog.txt | 2 +- Documentation/git-show-branch.txt | 2 +- Documentation/git-show.txt | 2 +- Documentation/git-status.txt | 2 +- Documentation/git-stripspace.txt | 2 +- Documentation/git-unpack-objects.txt | 2 +- Documentation/git-upload-pack.txt | 2 +- Documentation/git-verify-pack.txt | 2 +- Documentation/git-verify-tag.txt | 2 +- Documentation/git-whatchanged.txt | 2 +- 53 files changed, 53 insertions(+), 53 deletions(-) diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 5b7c354554..ae24547c8a 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -3,7 +3,7 @@ git-add(1) NAME ---- -git-add - Add files to the index file. +git-add - Add files to the index file SYNOPSIS -------- diff --git a/Documentation/git-applypatch.txt b/Documentation/git-applypatch.txt index 5b9037de9f..2b1ff1454b 100644 --- a/Documentation/git-applypatch.txt +++ b/Documentation/git-applypatch.txt @@ -3,7 +3,7 @@ git-applypatch(1) NAME ---- -git-applypatch - Apply one patch extracted from an e-mail. +git-applypatch - Apply one patch extracted from an e-mail SYNOPSIS diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index b1bc8272eb..4cd0cb90ad 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -3,7 +3,7 @@ git-branch(1) NAME ---- -git-branch - Create a new branch, or remove an old one. +git-branch - Create a new branch, or remove an old one SYNOPSIS -------- diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index f7f84c644e..7dc1bdb6ef 100644 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@ -3,7 +3,7 @@ git-check-ref-format(1) NAME ---- -git-check-ref-format - Make sure ref name is well formed. +git-check-ref-format - Make sure ref name is well formed SYNOPSIS -------- diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index df9a618674..556e733c9b 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -3,7 +3,7 @@ git-checkout(1) NAME ---- -git-checkout - Checkout and switch to a branch. +git-checkout - Checkout and switch to a branch SYNOPSIS -------- diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 4f323fa42a..bfa950ca19 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -3,7 +3,7 @@ git-cherry-pick(1) NAME ---- -git-cherry-pick - Apply the change introduced by an existing commit. +git-cherry-pick - Apply the change introduced by an existing commit SYNOPSIS -------- diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt index af87966e51..9a5e37186f 100644 --- a/Documentation/git-cherry.txt +++ b/Documentation/git-cherry.txt @@ -3,7 +3,7 @@ git-cherry(1) NAME ---- -git-cherry - Find commits not merged upstream. +git-cherry - Find commits not merged upstream SYNOPSIS -------- diff --git a/Documentation/git-clone-pack.txt b/Documentation/git-clone-pack.txt index 39906fc450..09f43eefe4 100644 --- a/Documentation/git-clone-pack.txt +++ b/Documentation/git-clone-pack.txt @@ -3,7 +3,7 @@ git-clone-pack(1) NAME ---- -git-clone-pack - Clones a repository by receiving packed objects. +git-clone-pack - Clones a repository by receiving packed objects SYNOPSIS diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 684e4bdf69..9ac54c282c 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -3,7 +3,7 @@ git-clone(1) NAME ---- -git-clone - Clones a repository. +git-clone - Clones a repository SYNOPSIS diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt index 36888d98bf..47216f488b 100644 --- a/Documentation/git-count-objects.txt +++ b/Documentation/git-count-objects.txt @@ -3,7 +3,7 @@ git-count-objects(1) NAME ---- -git-count-objects - Reports on unpacked objects. +git-count-objects - Reports on unpacked objects SYNOPSIS -------- diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 2cc6075fb0..924a676a6a 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -3,7 +3,7 @@ git-daemon(1) NAME ---- -git-daemon - A really simple server for git repositories. +git-daemon - A really simple server for git repositories SYNOPSIS -------- diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 0efe82ae1e..7a253eaf28 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -3,7 +3,7 @@ git-describe(1) NAME ---- -git-describe - Show the most recent tag that is reachable from a commit. +git-describe - Show the most recent tag that is reachable from a commit SYNOPSIS diff --git a/Documentation/git-diff-stages.txt b/Documentation/git-diff-stages.txt index 28c60fc7e4..3273918627 100644 --- a/Documentation/git-diff-stages.txt +++ b/Documentation/git-diff-stages.txt @@ -3,7 +3,7 @@ git-diff-stages(1) NAME ---- -git-diff-stages - Compares content and mode of blobs between stages in an unmerged index file. +git-diff-stages - Compares content and mode of blobs between stages in an unmerged index file SYNOPSIS diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index ca41634022..890931c891 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -3,7 +3,7 @@ git-diff(1) NAME ---- -git-diff - Show changes between commits, commit and working tree, etc. +git-diff - Show changes between commits, commit and working tree, etc SYNOPSIS diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt index 913b75bb8d..bff9aa6939 100644 --- a/Documentation/git-fetch-pack.txt +++ b/Documentation/git-fetch-pack.txt @@ -3,7 +3,7 @@ git-fetch-pack(1) NAME ---- -git-fetch-pack - Receive missing objects from another repository. +git-fetch-pack - Receive missing objects from another repository SYNOPSIS diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index a67dc340fd..a9e86fd26b 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -3,7 +3,7 @@ git-fetch(1) NAME ---- -git-fetch - Download objects and a head from another repository. +git-fetch - Download objects and a head from another repository SYNOPSIS diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 9ac0636850..7c467c56a3 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -3,7 +3,7 @@ git-format-patch(1) NAME ---- -git-format-patch - Prepare patches for e-mail submission. +git-format-patch - Prepare patches for e-mail submission SYNOPSIS diff --git a/Documentation/git-get-tar-commit-id.txt b/Documentation/git-get-tar-commit-id.txt index 30b1fbf6e7..48805b651c 100644 --- a/Documentation/git-get-tar-commit-id.txt +++ b/Documentation/git-get-tar-commit-id.txt @@ -3,7 +3,7 @@ git-get-tar-commit-id(1) NAME ---- -git-get-tar-commit-id - Extract commit ID from an archive created using git-tar-tree. +git-get-tar-commit-id - Extract commit ID from an archive created using git-tar-tree SYNOPSIS diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt index 0924931dc1..04e8d00436 100644 --- a/Documentation/git-hash-object.txt +++ b/Documentation/git-hash-object.txt @@ -3,7 +3,7 @@ git-hash-object(1) NAME ---- -git-hash-object - Computes object ID and optionally creates a blob from a file. +git-hash-object - Computes object ID and optionally creates a blob from a file SYNOPSIS diff --git a/Documentation/git-http-push.txt b/Documentation/git-http-push.txt index c7066d66f3..7e1f894a92 100644 --- a/Documentation/git-http-push.txt +++ b/Documentation/git-http-push.txt @@ -3,7 +3,7 @@ git-http-push(1) NAME ---- -git-http-push - Push missing objects using HTTP/DAV. +git-http-push - Push missing objects using HTTP/DAV SYNOPSIS diff --git a/Documentation/git-lost-found.txt b/Documentation/git-lost-found.txt index 03156f218b..f52a9d7f68 100644 --- a/Documentation/git-lost-found.txt +++ b/Documentation/git-lost-found.txt @@ -3,7 +3,7 @@ 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 -------- diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index 66fe60f998..ae4c1a250e 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -3,7 +3,7 @@ git-ls-remote(1) NAME ---- -git-ls-remote - Look at references other repository has. +git-ls-remote - Look at references other repository has SYNOPSIS diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt index b92a8b2db1..5bf6d8b613 100644 --- a/Documentation/git-ls-tree.txt +++ b/Documentation/git-ls-tree.txt @@ -3,7 +3,7 @@ git-ls-tree(1) NAME ---- -git-ls-tree - Lists the contents of a tree object. +git-ls-tree - Lists the contents of a tree object SYNOPSIS diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index 8890754740..ea0a06557f 100644 --- a/Documentation/git-mailinfo.txt +++ b/Documentation/git-mailinfo.txt @@ -3,7 +3,7 @@ git-mailinfo(1) NAME ---- -git-mailinfo - Extracts patch from a single e-mail message. +git-mailinfo - Extracts patch from a single e-mail message SYNOPSIS diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt index e0703e9dfa..209e36bacb 100644 --- a/Documentation/git-mailsplit.txt +++ b/Documentation/git-mailsplit.txt @@ -3,7 +3,7 @@ git-mailsplit(1) NAME ---- -git-mailsplit - Totally braindamaged mbox splitter program. +git-mailsplit - Totally braindamaged mbox splitter program SYNOPSIS -------- diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt index 21a8664247..207c43a631 100644 --- a/Documentation/git-mv.txt +++ b/Documentation/git-mv.txt @@ -3,7 +3,7 @@ git-mv(1) NAME ---- -git-mv - Move or rename a file, directory or symlink. +git-mv - Move or rename a file, directory or symlink SYNOPSIS diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt index e37b0b8f97..68707083be 100644 --- a/Documentation/git-name-rev.txt +++ b/Documentation/git-name-rev.txt @@ -3,7 +3,7 @@ git-name-rev(1) NAME ---- -git-name-rev - Find symbolic names for given revs. +git-name-rev - Find symbolic names for given revs SYNOPSIS diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 567dabf0f1..4991f88c92 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -3,7 +3,7 @@ git-pack-objects(1) NAME ---- -git-pack-objects - Create a packed archive of objects. +git-pack-objects - Create a packed archive of objects SYNOPSIS diff --git a/Documentation/git-pack-redundant.txt b/Documentation/git-pack-redundant.txt index a81cb97814..8fb0659438 100644 --- a/Documentation/git-pack-redundant.txt +++ b/Documentation/git-pack-redundant.txt @@ -3,7 +3,7 @@ git-pack-redundant(1) NAME ---- -git-pack-redundant - Program used to find redundant pack files. +git-pack-redundant - Program used to find redundant pack files SYNOPSIS diff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt index c8bd197779..723b8ccbf6 100644 --- a/Documentation/git-patch-id.txt +++ b/Documentation/git-patch-id.txt @@ -3,7 +3,7 @@ git-patch-id(1) NAME ---- -git-patch-id - Generate a patch ID. +git-patch-id - Generate a patch ID SYNOPSIS -------- diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt index 915d3f8a06..a00060c507 100644 --- a/Documentation/git-peek-remote.txt +++ b/Documentation/git-peek-remote.txt @@ -3,7 +3,7 @@ git-peek-remote(1) NAME ---- -git-peek-remote - Lists the references in a remote repository. +git-peek-remote - Lists the references in a remote repository SYNOPSIS diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 20175f4b9a..51577fcbe6 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -3,7 +3,7 @@ git-pull(1) NAME ---- -git-pull - Pull and merge from another repository. +git-pull - Pull and merge from another repository SYNOPSIS diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 6f4a48a109..d5b5ca167c 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -3,7 +3,7 @@ git-push(1) NAME ---- -git-push - Update remote refs along with associated objects. +git-push - Update remote refs along with associated objects SYNOPSIS diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f037d1280e..4d5b546db1 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -3,7 +3,7 @@ git-rebase(1) NAME ---- -git-rebase - Rebase local commits to new upstream head. +git-rebase - Rebase local commits to new upstream head SYNOPSIS -------- diff --git a/Documentation/git-relink.txt b/Documentation/git-relink.txt index 62405358fc..aca60120c8 100644 --- a/Documentation/git-relink.txt +++ b/Documentation/git-relink.txt @@ -3,7 +3,7 @@ git-relink(1) NAME ---- -git-relink - Hardlink common objects in local repositories. +git-relink - Hardlink common objects in local repositories SYNOPSIS -------- diff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt index 00efde5f0f..26759a8071 100644 --- a/Documentation/git-repo-config.txt +++ b/Documentation/git-repo-config.txt @@ -3,7 +3,7 @@ git-repo-config(1) NAME ---- -git-repo-config - Get and set options in .git/config. +git-repo-config - Get and set options in .git/config SYNOPSIS diff --git a/Documentation/git-request-pull.txt b/Documentation/git-request-pull.txt index 2463ec91d5..478a5fd6b7 100644 --- a/Documentation/git-request-pull.txt +++ b/Documentation/git-request-pull.txt @@ -3,7 +3,7 @@ git-request-pull(1) NAME ---- -git-request-pull - Generates a summary of pending changes. +git-request-pull - Generates a summary of pending changes SYNOPSIS -------- diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index b4e737e660..b7b9798bf9 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -3,7 +3,7 @@ git-reset(1) NAME ---- -git-reset - Reset current HEAD to the specified state. +git-reset - Reset current HEAD to the specified state SYNOPSIS -------- diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 29b578978a..8b95df0c6e 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -3,7 +3,7 @@ git-rev-parse(1) NAME ---- -git-rev-parse - Pick out and massage parameters. +git-rev-parse - Pick out and massage parameters SYNOPSIS diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index e27c6808b3..71f7815d65 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -3,7 +3,7 @@ git-revert(1) NAME ---- -git-revert - Revert an existing commit. +git-revert - Revert an existing commit SYNOPSIS -------- diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt index d8a5afae03..c9c3088424 100644 --- a/Documentation/git-rm.txt +++ b/Documentation/git-rm.txt @@ -3,7 +3,7 @@ git-rm(1) NAME ---- -git-rm - Remove files from the working tree and from the index. +git-rm - Remove files from the working tree and from the index SYNOPSIS -------- diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt index 577f06a214..08e0705303 100644 --- a/Documentation/git-send-pack.txt +++ b/Documentation/git-send-pack.txt @@ -3,7 +3,7 @@ git-send-pack(1) NAME ---- -git-send-pack - Push missing objects packed. +git-send-pack - Push missing objects packed SYNOPSIS diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt index 6ef59acf50..6742c9bfcf 100644 --- a/Documentation/git-sh-setup.txt +++ b/Documentation/git-sh-setup.txt @@ -3,7 +3,7 @@ git-sh-setup(1) NAME ---- -git-sh-setup - Common git shell script setup code. +git-sh-setup - Common git shell script setup code SYNOPSIS -------- diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index bf8db8bac6..54fb922ba9 100644 --- a/Documentation/git-shortlog.txt +++ b/Documentation/git-shortlog.txt @@ -3,7 +3,7 @@ git-shortlog(1) NAME ---- -git-shortlog - Summarize 'git log' output. +git-shortlog - Summarize 'git log' output SYNOPSIS diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt index e474cd0ba7..d3b6e620a8 100644 --- a/Documentation/git-show-branch.txt +++ b/Documentation/git-show-branch.txt @@ -3,7 +3,7 @@ git-show-branch(1) NAME ---- -git-show-branch - Show branches and their commits. +git-show-branch - Show branches and their commits SYNOPSIS -------- diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt index 9c359a448e..2b4df3f96f 100644 --- a/Documentation/git-show.txt +++ b/Documentation/git-show.txt @@ -3,7 +3,7 @@ git-show(1) NAME ---- -git-show - Show one commit with difference it introduces. +git-show - Show one commit with difference it introduces SYNOPSIS diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index 753fc0866d..e446f4812e 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -3,7 +3,7 @@ git-status(1) NAME ---- -git-status - Show working tree status. +git-status - Show working tree status SYNOPSIS diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt index 528a1b6ce3..3a03dd0410 100644 --- a/Documentation/git-stripspace.txt +++ b/Documentation/git-stripspace.txt @@ -3,7 +3,7 @@ git-stripspace(1) NAME ---- -git-stripspace - Filter out empty lines. +git-stripspace - Filter out empty lines SYNOPSIS diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt index 31ea34d229..18280628a1 100644 --- a/Documentation/git-unpack-objects.txt +++ b/Documentation/git-unpack-objects.txt @@ -3,7 +3,7 @@ git-unpack-objects(1) NAME ---- -git-unpack-objects - Unpack objects from a packed archive. +git-unpack-objects - Unpack objects from a packed archive SYNOPSIS diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt index 3d8f8ef667..4795e98754 100644 --- a/Documentation/git-upload-pack.txt +++ b/Documentation/git-upload-pack.txt @@ -3,7 +3,7 @@ git-upload-pack(1) NAME ---- -git-upload-pack - Send missing objects packed. +git-upload-pack - Send missing objects packed SYNOPSIS diff --git a/Documentation/git-verify-pack.txt b/Documentation/git-verify-pack.txt index d032280e7c..4962d6975f 100644 --- a/Documentation/git-verify-pack.txt +++ b/Documentation/git-verify-pack.txt @@ -3,7 +3,7 @@ git-verify-pack(1) NAME ---- -git-verify-pack - Validate packed git archive files. +git-verify-pack - Validate packed git archive files SYNOPSIS diff --git a/Documentation/git-verify-tag.txt b/Documentation/git-verify-tag.txt index b8a73c47af..0f9bdb58dc 100644 --- a/Documentation/git-verify-tag.txt +++ b/Documentation/git-verify-tag.txt @@ -3,7 +3,7 @@ git-verify-tag(1) NAME ---- -git-verify-tag - Check the GPG signature of tag. +git-verify-tag - Check the GPG signature of tag SYNOPSIS -------- diff --git a/Documentation/git-whatchanged.txt b/Documentation/git-whatchanged.txt index 6c150b0264..f02f939baa 100644 --- a/Documentation/git-whatchanged.txt +++ b/Documentation/git-whatchanged.txt @@ -3,7 +3,7 @@ git-whatchanged(1) NAME ---- -git-whatchanged - Show logs with difference each commit introduces. +git-whatchanged - Show logs with difference each commit introduces SYNOPSIS From b4f2a6ac9263d6e9bf3bf9c8abe607cd6def0ee8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 9 Mar 2006 11:58:05 -0800 Subject: [PATCH 10/13] Use #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) Signed-off-by: Junio C Hamano --- apply.c | 2 +- date.c | 4 +--- exec_cmd.c | 2 +- git-compat-util.h | 2 ++ git.c | 2 -- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apply.c b/apply.c index 849a8b4485..179b3bbd00 100644 --- a/apply.c +++ b/apply.c @@ -651,7 +651,7 @@ static int parse_git_header(char *line, int len, unsigned int size, struct patch len = linelen(line, size); if (!len || line[len-1] != '\n') break; - for (i = 0; i < sizeof(optable) / sizeof(optable[0]); i++) { + for (i = 0; i < ARRAY_SIZE(optable); i++) { const struct opentry *p = optable + i; int oplen = strlen(p->str); if (len < oplen || memcmp(p->str, line, oplen)) diff --git a/date.c b/date.c index 416ea579a3..1c1917b4e8 100644 --- a/date.c +++ b/date.c @@ -123,8 +123,6 @@ static const struct { { "IDLE", +12, 0, }, /* International Date Line East */ }; -#define NR_TZ (sizeof(timezone_names) / sizeof(timezone_names[0])) - static int match_string(const char *date, const char *str) { int i = 0; @@ -173,7 +171,7 @@ static int match_alpha(const char *date, struct tm *tm, int *offset) } } - for (i = 0; i < NR_TZ; i++) { + for (i = 0; i < ARRAY_SIZE(timezone_names); i++) { int match = match_string(date, timezone_names[i].name); if (match >= 3) { int off = timezone_names[i].offset; diff --git a/exec_cmd.c b/exec_cmd.c index 96cc2123b6..590e738969 100644 --- a/exec_cmd.c +++ b/exec_cmd.c @@ -37,7 +37,7 @@ int execv_git_cmd(const char **argv) getenv("GIT_EXEC_PATH"), builtin_exec_path }; - for (i = 0; i < sizeof(paths)/sizeof(paths[0]); ++i) { + for (i = 0; i < ARRAY_SIZE(paths); ++i) { const char *exec_dir = paths[i]; const char *tmp; diff --git a/git-compat-util.h b/git-compat-util.h index f982b8e484..5d543d29f8 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -9,6 +9,8 @@ #endif #endif +#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) + #include #include #include diff --git a/git.c b/git.c index 164d3e9e4f..746e2af684 100644 --- a/git.c +++ b/git.c @@ -323,8 +323,6 @@ static int cmd_log(int argc, const char **argv, char **envp) return 0; } -#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) - static void handle_internal_command(int argc, const char **argv, char **envp) { const char *cmd = argv[0]; From a87cd02ce02e97083eb76eb8b9bfeb2e46800fd7 Mon Sep 17 00:00:00 2001 From: Fredrik Kuivinen Date: Thu, 9 Mar 2006 17:24:19 +0100 Subject: [PATCH 11/13] Nicer output from 'git' [jc: with suggestions by Jan-Benedict Glaw] Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- .gitignore | 1 + Documentation/git.txt | 11 +++++----- Makefile | 7 +++++-- generate-cmdlist.sh | 48 +++++++++++++++++++++++++++++++++++++++++++ git.c | 47 ++++++++++++++++++++++++++++++++---------- 5 files changed, 96 insertions(+), 18 deletions(-) create mode 100755 generate-cmdlist.sh diff --git a/.gitignore b/.gitignore index abbc509e13..8e94cbde67 100644 --- a/.gitignore +++ b/.gitignore @@ -121,6 +121,7 @@ git-write-tree git-core-*/?* test-date test-delta +common-cmds.h *.tar.gz *.dsc *.deb diff --git a/Documentation/git.txt b/Documentation/git.txt index 2d0ca9d8ed..8610d36c49 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -20,15 +20,16 @@ brings your stuff to the plumbing). OPTIONS ------- --version:: - prints the git suite version that the 'git' program came from. + Prints the git suite version that the 'git' program came from. --help:: - prints the synopsis and a list of available commands. - If a git command is named this option will bring up the - man-page for that command. + Prints the synopsis and a list of the most commonly used + commands. If a git command is named this option will bring up + the man-page for that command. If the option '--all' or '-a' is + given then all available commands are printed. --exec-path:: - path to wherever your core git programs are installed. + Path to wherever your core git programs are installed. This can also be controlled by setting the GIT_EXEC_PATH environment variable. If no path is given 'git' will print the current setting and then exit. diff --git a/Makefile b/Makefile index cd2c2db19d..e75a1ab83f 100644 --- a/Makefile +++ b/Makefile @@ -452,10 +452,13 @@ all: strip: $(PROGRAMS) git$X $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X -git$X: git.c $(LIB_FILE) +git$X: git.c common-cmds.h $(LIB_FILE) $(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \ $(ALL_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE) $(LIBS) +common-cmds.h: Documentation/git-*.txt + ./generate-cmdlist.sh > $@ + $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh rm -f $@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ @@ -612,7 +615,7 @@ rpm: dist clean: rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o $(LIB_FILE) rm -f $(ALL_PROGRAMS) git$X - rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo + rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h rm -rf $(GIT_TARNAME) rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz $(MAKE) -C Documentation/ clean diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh new file mode 100755 index 0000000000..6ee85d5a53 --- /dev/null +++ b/generate-cmdlist.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +echo "/* Automatically generated by $0 */ +struct cmdname_help +{ + char name[16]; + char help[64]; +}; + +struct cmdname_help common_cmds[] = {" + +sort <<\EOF | +add +apply +bisect +branch +checkout +cherry-pick +clone +commit +diff +fetch +grep +init-db +log +merge +mv +prune +pull +push +rebase +reset +revert +rm +show +show-branch +status +tag +verify-tag +whatchanged +EOF +while read cmd +do + sed -n "/NAME/,/git-$cmd/H; + \$ {x; s/.*git-$cmd - \\(.*\\)/ {\"$cmd\", \"\1\"},/; p}" \ + "Documentation/git-$cmd.txt" +done +echo "};" diff --git a/git.c b/git.c index 746e2af684..0b40e3060d 100644 --- a/git.c +++ b/git.c @@ -11,6 +11,7 @@ #include #include "git-compat-util.h" #include "exec_cmd.h" +#include "common-cmds.h" #include "cache.h" #include "commit.h" @@ -171,11 +172,29 @@ static void list_commands(const char *exec_path, const char *pattern) putchar('\n'); } +static void list_common_cmds_help() +{ + int i, longest = 0; + + for (i = 0; i < ARRAY_SIZE(common_cmds); i++) { + if (longest < strlen(common_cmds[i].name)) + longest = strlen(common_cmds[i].name); + } + + puts("The most commonly used git commands are:"); + for (i = 0; i < ARRAY_SIZE(common_cmds); i++) { + printf(" %s", common_cmds[i].name); + mput_char(' ', longest - strlen(common_cmds[i].name) + 4); + puts(common_cmds[i].help); + } + puts("(use 'git help -a' to get a list of all installed git commands)"); +} + #ifdef __GNUC__ -static void cmd_usage(const char *exec_path, const char *fmt, ...) - __attribute__((__format__(__printf__, 2, 3), __noreturn__)); +static void cmd_usage(int show_all, const char *exec_path, const char *fmt, ...) + __attribute__((__format__(__printf__, 3, 4), __noreturn__)); #endif -static void cmd_usage(const char *exec_path, const char *fmt, ...) +static void cmd_usage(int show_all, const char *exec_path, const char *fmt, ...) { if (fmt) { va_list ap; @@ -189,10 +208,13 @@ static void cmd_usage(const char *exec_path, const char *fmt, ...) else puts(git_usage); - putchar('\n'); - - if(exec_path) - list_commands(exec_path, "git-*"); + if (exec_path) { + putchar('\n'); + if (show_all) + list_commands(exec_path, "git-*"); + else + list_common_cmds_help(); + } exit(1); } @@ -244,8 +266,11 @@ static int cmd_help(int argc, const char **argv, char **envp) { const char *help_cmd = argv[1]; if (!help_cmd) - cmd_usage(git_exec_path(), NULL); - show_man_page(help_cmd); + cmd_usage(0, git_exec_path(), NULL); + else if (!strcmp(help_cmd, "--all") || !strcmp(help_cmd, "-a")) + cmd_usage(1, git_exec_path(), NULL); + else + show_man_page(help_cmd); return 0; } @@ -418,7 +443,7 @@ int main(int argc, const char **argv, char **envp) puts(git_exec_path()); exit(0); } - cmd_usage(NULL, NULL); + cmd_usage(0, NULL, NULL); } argv[0] = cmd; @@ -441,7 +466,7 @@ int main(int argc, const char **argv, char **envp) execv_git_cmd(argv); if (errno == ENOENT) - cmd_usage(exec_path, "'%s' is not a git-command", cmd); + cmd_usage(0, exec_path, "'%s' is not a git-command", cmd); fprintf(stderr, "Failed to run command '%s': %s\n", git_command, strerror(errno)); From f61c2c970c08653ade940fce678c7591abcfcde4 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 9 Mar 2006 12:59:16 -0800 Subject: [PATCH 12/13] refs.c::do_for_each_ref(): Finish error message lines with "\n" We used fprintf() to show an error message without terminating it with LF; use error() for that. cf. c401cb48e77459a4ccad76888ad31bef252facc5 Signed-off-by: Junio C Hamano --- refs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index 982ebf8ae5..03398ccc53 100644 --- a/refs.c +++ b/refs.c @@ -152,12 +152,12 @@ static int do_for_each_ref(const char *base, int (*fn)(const char *path, const u continue; } if (read_ref(git_path("%s", path), sha1) < 0) { - fprintf(stderr, "%s points nowhere!", path); + error("%s points nowhere!", path); continue; } if (!has_sha1_file(sha1)) { - fprintf(stderr, "%s does not point to a valid " - "commit object!", path); + error("%s does not point to a valid " + "commit object!", path); continue; } retval = fn(path, sha1); From 7aaa715d0abb12067504af08919197a67a68aca7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 9 Mar 2006 01:44:19 -0800 Subject: [PATCH 13/13] fsck-objects: Remove --standalone The fsck-objects command (back then it was called fsck-cache) used to complain if objects referred to by files in .git/refs/ or objects stored in files under .git/objects/??/ were not found as stand-alone SHA1 files (i.e. found in alternate object pools or packed archives stored under .git/objects/pack). Back then, packs and alternates were new curiosity and having everything as loose objects were the norm. When we adjusted the behaviour of fsck-cache to consider objects found in packs are OK, we introduced the --standalone flag as a backward compatibility measure. It still correctly checks if your repository is complete and consists only of loose objects, so in that sense it is doing the "right" thing, but checking that is pointless these days. This commit removes --standalone flag. See also: 23676d407c63a6f67f8ce3ff192199bda03e6a03 8a498a05c3c6b2f53db669b24f36257ab213eb4c Signed-off-by: Junio C Hamano --- Documentation/git-fsck-objects.txt | 15 ++++----------- fsck-objects.c | 20 +++++--------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/Documentation/git-fsck-objects.txt b/Documentation/git-fsck-objects.txt index 387b435484..93ce9dcc92 100644 --- a/Documentation/git-fsck-objects.txt +++ b/Documentation/git-fsck-objects.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git-fsck-objects' [--tags] [--root] [--unreachable] [--cache] - [--standalone | --full] [--strict] [*] + [--full] [--strict] [*] DESCRIPTION ----------- @@ -38,21 +38,14 @@ index file and all SHA1 references in .git/refs/* as heads. Consider any object recorded in the index also as a head node for an unreachability trace. ---standalone:: - Limit checks to the contents of GIT_OBJECT_DIRECTORY - ($GIT_DIR/objects), making sure that it is consistent and - complete without referring to objects found in alternate - object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES, - nor packed git archives found in $GIT_DIR/objects/pack; - cannot be used with --full. - --full:: Check not just objects in GIT_OBJECT_DIRECTORY ($GIT_DIR/objects), but also the ones found in alternate - object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES, + object pools listed in GIT_ALTERNATE_OBJECT_DIRECTORIES + or $GIT_DIR/objects/info/alternates, and in packed git archives found in $GIT_DIR/objects/pack and corresponding pack subdirectories in alternate - object pools; cannot be used with --standalone. + object pools. --strict:: Enable more strict checking, namely to catch a file mode diff --git a/fsck-objects.c b/fsck-objects.c index 4ddd67699c..59b25904cb 100644 --- a/fsck-objects.c +++ b/fsck-objects.c @@ -14,10 +14,9 @@ static int show_root = 0; static int show_tags = 0; static int show_unreachable = 0; -static int standalone = 0; static int check_full = 0; static int check_strict = 0; -static int keep_cache_objects = 0; +static int keep_cache_objects = 0; static unsigned char head_sha1[20]; #ifdef NO_D_INO_IN_DIRENT @@ -68,7 +67,7 @@ static void check_connectivity(void) continue; if (!obj->parsed) { - if (!standalone && has_sha1_file(obj->sha1)) + if (has_sha1_file(obj->sha1)) ; /* it is in pack */ else printf("missing %s %s\n", @@ -82,7 +81,7 @@ static void check_connectivity(void) for (j = 0; j < refs->count; j++) { struct object *ref = refs->ref[j]; if (ref->parsed || - (!standalone && has_sha1_file(ref->sha1))) + (has_sha1_file(ref->sha1))) continue; printf("broken link from %7s %s\n", obj->type, sha1_to_hex(obj->sha1)); @@ -390,7 +389,7 @@ static int fsck_handle_ref(const char *refname, const unsigned char *sha1) obj = lookup_object(sha1); if (!obj) { - if (!standalone && has_sha1_file(sha1)) { + if (has_sha1_file(sha1)) { default_refs++; return 0; /* it is in a pack */ } @@ -464,10 +463,6 @@ int main(int argc, char **argv) keep_cache_objects = 1; continue; } - if (!strcmp(arg, "--standalone")) { - standalone = 1; - continue; - } if (!strcmp(arg, "--full")) { check_full = 1; continue; @@ -477,14 +472,9 @@ int main(int argc, char **argv) continue; } if (*arg == '-') - usage("git-fsck-objects [--tags] [--root] [[--unreachable] [--cache] [--standalone | --full] [--strict] *]"); + usage("git-fsck-objects [--tags] [--root] [[--unreachable] [--cache] [--full] [--strict] *]"); } - if (standalone && check_full) - die("Only one of --standalone or --full can be used."); - if (standalone) - putenv("GIT_ALTERNATE_OBJECT_DIRECTORIES="); - fsck_head_link(); fsck_object_dir(get_object_directory()); if (check_full) {