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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



skillzero@xxxxxxxxx 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@xxxxxxxxxxxxxxxxxx
            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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux