summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec57976)
raw | patch | inline | side by side (parent: ec57976)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 2 Mar 2006 09:50:09 +0000 (01:50 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 2 Mar 2006 09:50:09 +0000 (01:50 -0800) |
For scripted use this is quite useful.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-annotate.perl | patch | blob | history |
diff --git a/git-annotate.perl b/git-annotate.perl
index cd476c76297daa9ce99718b429835debd2d76ed1..08d479f4b9b0d4911543ce35714bef13adbb8d20 100755 (executable)
--- a/git-annotate.perl
+++ b/git-annotate.perl
print STDERR 'Usage: ${\basename $0} [-s] [-S revs-file] file [ revision ]
-l, --long
Show long rev (Defaults off)
+ -t, --time
+ Show raw timestamp (Defaults off)
-r, --rename
Follow renames (Defaults on).
-S, --rev-file revs-file
exit(1);
}
-our ($help, $longrev, $rename, $starting_rev, $rev_file) = (0, 0, 1);
+our ($help, $longrev, $rename, $rawtime, $starting_rev, $rev_file) = (0, 0, 1);
my $rc = GetOptions( "long|l" => \$longrev,
+ "time|t" => \$rawtime,
"help|h" => \$help,
"rename|r" => \$rename,
"rev-file|S=s" => \$rev_file);
}
sub format_date {
+ if ($rawtime) {
+ return $_[0];
+ }
my ($timestamp, $timezone) = split(' ', $_[0]);
-
return strftime("%Y-%m-%d %H:%M:%S " . $timezone, gmtime($timestamp));
}