git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* I want to omit the commit log message from the log output
@ 2010-10-27 18:58 layer
  2010-10-27 19:36 ` Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: layer @ 2010-10-27 18:58 UTC (permalink / raw)
  To: git

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

$ git merge origin/master
Updating f682676..b37ad77
Fast-forward
 MODULES                           |    3 +-
 Makefile.patch82                  |    2 +-
 bin/subs.sh                       |   43 +++-
...
 status.sh                         |   14 +-
 whatsnew.sh                       |   15 +
 12 files changed, 636 insertions(+), 26 deletions(-)
 create mode 100755 bin/git-what-branch
 create mode 100644 bin/git-what-branch.readme
 create mode 100755 whatsnew.sh
$ 

That is, I want to run a command that will show me the above output
without doing the merge.  This is close, but not quite:

$ git log --summary --stat origin/master ^HEAD


Are there arguments to git log that can do what I want?

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I want to omit the commit log message from the log output
  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
  2010-10-27 20:26   ` layer
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2010-10-27 19:36 UTC (permalink / raw)
  To: layer; +Cc: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: I want to omit the commit log message from the log output
  2010-10-27 19:36 ` Jonathan Nieder
@ 2010-10-27 20:26   ` layer
  0 siblings, 0 replies; 3+ messages in thread
From: layer @ 2010-10-27 20:26 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git

Looks like 

  git diff-tree --cc --summary --stat --no-commit-id origin/master..HEAD

is what I want.

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-27 20:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-10-27 20:26   ` layer

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).