1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-12 22:16:13 +02:00

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>
This commit is contained in:
Denis Cheng 2008-03-02 17:05:52 +08:00 committed by Junio C Hamano
parent 5348337a34
commit 9225d7be0a
4 changed files with 4 additions and 4 deletions

View File

@ -1299,7 +1299,7 @@ Return the list of files that haven't been handled."
(let (author-name author-email subject date msg)
(with-temp-buffer
(let ((coding-system (git-get-logoutput-coding-system)))
(git-call-process-env t nil "log" "-1" commit)
(git-call-process-env t nil "log" "-1" "--pretty=medium" commit)
(goto-char (point-min))
(when (re-search-forward "^Author: *\\(.*\\) <\\(.*\\)>$" nil t)
(setq author-name (match-string 1))

View File

@ -567,7 +567,7 @@ generate_general_email()
echo ""
if [ "$newrev_type" = "commit" ]; then
echo $LOGBEGIN
git show --no-color --root -s $newrev
git show --no-color --root -s --pretty=medium $newrev
echo $LOGEND
else
# What can we do here? The tag marks an object that is not

View File

@ -2556,7 +2556,7 @@ sub update
if ($base) {
my @merged;
# print "want to log between $base $parent \n";
open(GITLOG, '-|', 'git-log', "$base..$parent")
open(GITLOG, '-|', 'git-log', '--pretty=medium', "$base..$parent")
or die "Cannot call git-log: $!";
my $mergedhash;
while (<GITLOG>) {

View File

@ -71,7 +71,7 @@ finish_up_to_date () {
squash_message () {
echo Squashed commit of the following:
echo
git log --no-merges ^"$head" $remoteheads
git log --no-merges --pretty=medium ^"$head" $remoteheads
}
finish () {