git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git rev-list with --name-status?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 25, 2008, 18:59 UTC
Message-ID
<7vr63w84iy.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<2729632a0812241453x4ae50362g4bcd3317e5be0429@mail.gmail.com>
skillzero@gmail.com writes:
Show 6 quoted lines
> 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.

Previous: demerphqNext: skillzero@gmail.com
Message 4 of 5 in “git rev-list with --name-status?”
  1. skillzero@gmail.comDec 24, 2008
  2. Junio C HamanoDec 25, 2008
  3. demerphqDec 25, 2008
  4. Junio C HamanoDec 25, 2008
  5. skillzero@gmail.comDec 25, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.