git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: layer <layer@known.net>
Cc: git@vger.kernel.org
Subject: Re: I want to omit the commit log message from the log output
Date: Wed, 27 Oct 2010 14:36:50 -0500	[thread overview]
Message-ID: <20101027193650.GA24934@burratino> (raw)
In-Reply-To: <18995.1288205882@relay.known.net>

Hi,

layer wrote:

> I'm trying to simulate the output that comes at the end of the merge:

Cheating answer:

Hmm, I wonder how the scripted version did that.

$ git grep -Oless -eFast-forward -- contrib/examples/git-merge.sh
        msg="Fast-forward"
        if test -n "$have_message"
        then
                msg="$msg (no commit created; -m option ignored)"
        fi
        new_head=$(git rev-parse --verify "$1^0") &&
        git read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
        finish "$new_head" "$msg" || exit
        dropsave
        exit 0
        ;;
[ok, it's the finish function.  press q to exit the pager, and]
$ git grep -Oless -F -e'finish ()' -- contrib/examples/git-merge.sh
finish () {
        if test '' = "$2"
[...]
                if test "$show_diffstat" = t
                then
                        # We want color (if set), but no pager
                        GIT_PAGER='' git diff --stat --summary -M "$head" "$1"
[...]

So apparently

	git diff --stat --summary -M <before> <after>

will take care of it.

On the other hand, if you want diff output for a single commit (i.e.,
"somewhat like git rev-list --pretty --summary --stat --no-walk but no
commit messages"), then some variation on

	git diff-tree --color --cc --summary --stat --no-commit-id origin/pu

might bring some joy.

Hope that helps,
Jonathan

  reply	other threads:[~2010-10-27 19:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 18:58 I want to omit the commit log message from the log output layer
2010-10-27 19:36 ` Jonathan Nieder [this message]
2010-10-27 20:26   ` layer

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

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

  git send-email \
    --in-reply-to=20101027193650.GA24934@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=layer@known.net \
    /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.
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 NNTP newsgroup(s).