diff options
-rw-r--r-- | Documentation/git-shortlog.txt | 8 | ||||
-rw-r--r-- | Documentation/git-svn.txt | 5 | ||||
-rw-r--r-- | builtin-fsck.c | 6 | ||||
-rwxr-xr-x | git-svn.perl | 24 |
4 files changed, 39 insertions, 4 deletions
diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt index 1c8c55ef6e..15cc6f77c1 100644 --- a/Documentation/git-shortlog.txt +++ b/Documentation/git-shortlog.txt @@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] git-log --pretty=short | 'git-shortlog' [-h] [-n] [-s] -git-shortlog [-n|--number] [-s|--summary] [<committish>...] +git-shortlog [-n|--numbered] [-s|--summary] [<committish>...] DESCRIPTION ----------- @@ -22,14 +22,14 @@ Additionally, "[PATCH]" will be stripped from the commit description. OPTIONS ------- --h:: +-h, \--help:: Print a short usage message and exit. --n:: +-n, \--numbered:: Sort output according to the number of commits per author instead of author alphabetic order. --s:: +-s, \--summary:: Suppress commit description and provide a commit count summary only. FILES diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index a0d34e0058..a35b9de3bf 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -159,6 +159,11 @@ New features: Any other arguments are passed directly to `git log' -- +'find-rev':: + When given an SVN revision number of the form 'rN', returns the + corresponding git commit hash. When given a tree-ish, returns the + corresponding SVN revision number. + 'set-tree':: You should consider using 'dcommit' instead of this command. Commit specified commit or tree objects to SVN. This relies on diff --git a/builtin-fsck.c b/builtin-fsck.c index 7c3b0a535f..75e10e25ec 100644 --- a/builtin-fsck.c +++ b/builtin-fsck.c @@ -218,6 +218,7 @@ static int fsck_tree(struct tree *item) { int retval; int has_full_path = 0; + int has_empty_name = 0; int has_zero_pad = 0; int has_bad_modes = 0; int has_dup_entries = 0; @@ -241,6 +242,8 @@ static int fsck_tree(struct tree *item) if (strchr(name, '/')) has_full_path = 1; + if (!*name) + has_empty_name = 1; has_zero_pad |= *(char *)desc.buffer == '0'; update_tree_entry(&desc); @@ -289,6 +292,9 @@ static int fsck_tree(struct tree *item) if (has_full_path) { objwarning(&item->object, "contains full pathnames"); } + if (has_empty_name) { + objwarning(&item->object, "contains empty pathname"); + } if (has_zero_pad) { objwarning(&item->object, "contains zero-padded file modes"); } diff --git a/git-svn.perl b/git-svn.perl index 7b5f8ab3be..4be8576894 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -141,6 +141,8 @@ my %cmd = ( 'color' => \$Git::SVN::Log::color, 'pager=s' => \$Git::SVN::Log::pager, } ], + 'find-rev' => [ \&cmd_find_rev, "Translate between SVN revision numbers and tree-ish", + { } ], 'rebase' => [ \&cmd_rebase, "Fetch and rebase your working directory", { 'merge|m|M' => \$_merge, 'verbose|v' => \$_verbose, @@ -428,6 +430,28 @@ sub cmd_dcommit { command_noisy(@finish, $gs->refname); } +sub cmd_find_rev { + my $revision_or_hash = shift; + my $result; + if ($revision_or_hash =~ /^r\d+$/) { + my $desired_revision = substr($revision_or_hash, 1); + my ($fh, $ctx) = command_output_pipe('rev-list', 'HEAD'); + while (my $hash = <$fh>) { + chomp($hash); + my (undef, $rev, undef) = cmt_metadata($hash); + if ($rev && $rev eq $desired_revision) { + $result = $hash; + last; + } + } + command_close_pipe($fh, $ctx); + } else { + my (undef, $rev, undef) = cmt_metadata($revision_or_hash); + $result = $rev; + } + print "$result\n" if $result; +} + sub cmd_rebase { command_noisy(qw/update-index --refresh/); my ($url, $rev, $uuid, $gs) = working_head_info('HEAD'); |