git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Denis Cheng <crquan@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: [PATCH 2/3] specify explicit "--pretty=medium" with `git log/show/whatchanged`
Date: Sun,  2 Mar 2008 17:05:52 +0800	[thread overview]
Message-ID: <1204448753-4471-2-git-send-email-crquan@gmail.com> (raw)
In-Reply-To: <1204448753-4471-1-git-send-email-crquan@gmail.com>

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>
---
 contrib/emacs/git.el             |    2 +-
 contrib/hooks/post-receive-email |    2 +-
 git-cvsserver.perl               |    2 +-
 git-merge.sh                     |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index c926823..4fa853f 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -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))
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 77c88eb..62a740c 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -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
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index afe3d0b..7f632af 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -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>) {
diff --git a/git-merge.sh b/git-merge.sh
index 1c123a3..39aa5f5 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -70,7 +70,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 () {
-- 
1.5.4.3.368.g2bb0a


  reply	other threads:[~2008-03-02  9:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 19:44 [PATCH] pretty format now configurable Denis Cheng
2008-02-29 20:00 ` Linus Torvalds
2008-03-01  6:07   ` rae l
2008-03-01 17:15   ` [PATCH] add pretty format configuration to git log/show/whatchanged Denis Cheng
2008-03-01 18:22     ` Johannes Schindelin
2008-03-01 19:50       ` Denis Cheng
2008-03-02  3:44         ` Junio C Hamano
2008-03-02  6:20           ` Junio C Hamano
2008-03-02  9:05           ` [PATCH 1/3] whatchanged documentation: share description of --pretty with others Denis Cheng
2008-03-02  9:05             ` Denis Cheng [this message]
2008-03-02  9:05               ` [PATCH 3/3] log/show/whatchanged: introduce format.pretty configuration Denis Cheng
2008-03-02 17:00                 ` Junio C Hamano
2008-03-02 17:12                   ` rae l
2008-03-02 17:00               ` [PATCH 2/3] specify explicit "--pretty=medium" with `git log/show/whatchanged` Junio C Hamano
2008-02-29 21:51 ` [PATCH] pretty format now configurable Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1204448753-4471-2-git-send-email-crquan@gmail.com \
    --to=crquan@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).