diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-06 14:42:08 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-06 14:42:59 -0700 |
commit | c66b6c067e49c5ec80f1254daef79aa1c7f5ffce (patch) | |
tree | 48367903de59ddef7aea7c8f20da4e07243e8d44 /git-annotate.perl | |
parent | Teach fmt-patch about --keep-subject (diff) | |
parent | t1300-repo-config: two new config parsing tests. (diff) | |
download | tgif-c66b6c067e49c5ec80f1254daef79aa1c7f5ffce.tar.xz |
Merge branch 'master' into js/fmt-patch
* master: (109 commits)
t1300-repo-config: two new config parsing tests.
Another config file parsing fix.
update-index: plug memory leak from prefix_path()
checkout-index: plug memory leak from prefix_path()
update-index --unresolve: work from a subdirectory.
pack-object: squelch eye-candy on non-tty
core.prefersymlinkrefs: use symlinks for .git/HEAD
repo-config: trim white-space before comment
Fix for config file section parsing.
Clarify git-cherry documentation.
Update git-unpack-objects documentation.
Fix up docs where "--" isn't displayed correctly.
Several trivial documentation touch ups.
git-svn 1.0.0
git-svn: documentation updates
delta: stricter constness
Makefile: do not link rev-list any specially.
builtin-push: --all and --tags _are_ explicit refspecs
builtin-log/whatchanged/show: make them official.
show-branch: omit uninteresting merges.
...
Diffstat (limited to 'git-annotate.perl')
-rwxr-xr-x | git-annotate.perl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/git-annotate.perl b/git-annotate.perl index 9df72a1662..a6a7a482cd 100755 --- a/git-annotate.perl +++ b/git-annotate.perl @@ -10,9 +10,10 @@ use warnings; use strict; use Getopt::Long; use POSIX qw(strftime gmtime); +use File::Basename qw(basename dirname); sub usage() { - print STDERR 'Usage: ${\basename $0} [-s] [-S revs-file] file [ revision ] + print STDERR "Usage: ${\basename $0} [-s] [-S revs-file] file [ revision ] -l, --long Show long rev (Defaults off) -t, --time @@ -23,7 +24,7 @@ sub usage() { Use revs from revs-file instead of calling git-rev-list -h, --help This message. -'; +"; exit(1); } @@ -35,7 +36,7 @@ my $rc = GetOptions( "long|l" => \$longrev, "help|h" => \$help, "rename|r" => \$rename, "rev-file|S=s" => \$rev_file); -if (!$rc or $help) { +if (!$rc or $help or !@ARGV) { usage(); } @@ -208,6 +209,9 @@ sub find_parent_renames { while (my $change = <$patch>) { chomp $change; my $filename = <$patch>; + if (!defined $filename) { + next; + } chomp $filename; if ($change =~ m/^[AMD]$/ ) { |