git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: skillzero@gmail.com
Cc: git@vger.kernel.org
Subject: Re: git rev-list with --name-status?
Date: Thu, 25 Dec 2008 10:59:33 -0800	[thread overview]
Message-ID: <7vr63w84iy.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <2729632a0812241453x4ae50362g4bcd3317e5be0429@mail.gmail.com> (skillzero@gmail.com's message of "Wed, 24 Dec 2008 14:53:00 -0800")

skillzero@gmail.com writes:

> Is there a way to print the equivalent of --name-status with git
> rev-list? The post-receive script that comes with git for sending
> comment emails does this to generate the commit log:
>
> git rev-parse --not --branches | grep -v $(git rev-parse $refname) |
> 	git rev-list --pretty --stdin $oldrev..$newrev

I should have noticed this earlier.

You seem to be referring to contrib/hooks/post-receive-email as "The
script that comes with git".  It does have customization possibility
already implemented and documented:

    hooks.showrev
       The shell command used to format each revision in the email, with
       "%s" replaced with the commit id.  Defaults to "git rev-list -1
       --pretty %s", displaying the commit id, author, date and log
       message.  To list full patches separated by a blank line, you
       could set this to "git show -C %s; echo".

One of my day-job repositories has:

    [hooks]
            mailinglist = some-secret-project@day-job-domain.com
            emailprefix = "[SOME-SECRET-PROJECT GIT] "
            showrev = "git show --stat %s; echo"

I think you can use "git show --name-status %s; echo" instead, if you like
the --name-status output.

  parent reply	other threads:[~2008-12-25 19:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-24 22:53 git rev-list with --name-status? skillzero
2008-12-25  3:24 ` Junio C Hamano
2008-12-25 18:24 ` demerphq
2008-12-25 18:59 ` Junio C Hamano [this message]
2008-12-25 20:13   ` skillzero

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=7vr63w84iy.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=skillzero@gmail.com \
    /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).