specify explicit "--pretty=medium" with `git log/show/whatchanged`
The following patch will introduce a new configuration variable, "format.pretty", from then on the pretty format without specifying "--pretty" might not be the default "--pretty=medium", it depends on the user's config. So all kinds of Shell/Perl/Emacs scripts that needs the default medium pretty format must specify it explicitly. Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denis Cheng committed
Mar 2, 2008 at 17:05 UTC
9225d7be0abab0c3b1325a733aea127b45a18625
4 files changed
+4
-4
contrib/emacs/git.el
+1
-1
@@ -1299,7 +1299,7 @@ Return the list of files that haven't been handled."
1299
(let (author-name author-email subject date msg)
1300
(with-temp-buffer
1301
(let ((coding-system (git-get-logoutput-coding-system)))
1302
- (git-call-process-env t nil "log" "-1" commit)
1302
+ (git-call-process-env t nil "log" "-1" "--pretty=medium" commit)
1303
(goto-char (point-min))
1304
(when (re-search-forward "^Author: *\\(.*\\) <\\(.*\\)>$" nil t)
1305
(setq author-name (match-string 1))
contrib/hooks/post-receive-email
+1
-1
@@ -567,7 +567,7 @@ generate_general_email()
567
echo ""
568
if [ "$newrev_type" = "commit" ]; then
569
echo $LOGBEGIN
570
- git show --no-color --root -s $newrev
570
+ git show --no-color --root -s --pretty=medium $newrev
571
echo $LOGEND
572
else
573
# What can we do here? The tag marks an object that is not
git-cvsserver.perl
+1
-1
@@ -2556,7 +2556,7 @@ sub update
2556
if ($base) {
2557
my @merged;
2558
# print "want to log between $base $parent \n";
2559
- open(GITLOG, '-|', 'git-log', "$base..$parent")
2559
+ open(GITLOG, '-|', 'git-log', '--pretty=medium', "$base..$parent")
2560
or die "Cannot call git-log: $!";
2561
my $mergedhash;
2562
while (<GITLOG>) {
git-merge.sh
+1
-1
@@ -71,7 +71,7 @@ finish_up_to_date () {
71
squash_message () {
72
echo Squashed commit of the following:
73
echo
74
- git log --no-merges ^"$head" $remoteheads
74
+ git log --no-merges --pretty=medium ^"$head" $remoteheads
75
}
76
77
finish () {