Re: [PATCH] Introduce a hook to run after formatting patches

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

 



On Fri, Nov 21, 2014 at 12:33 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Stefan Beller <sbeller@xxxxxxxxxx> writes:
>
>> So I have read the man page on the trailers and it seems like the solution
>> to my problem in removing parts from the commit message.
>> However I did not find out, if it can be run automatically, whenever
>> calling format-patch
>>
>> Maybe all that is missing here is an option
>>
>>       git config format.enable_trailers
>> ?

Yeah, we could use config variables or command options or both to make
it easier to enable it and pass it arguments.

For example we could add:

1) an "--interpret-trailers" option to "git commit", "git
format-patch", "git am" and maybe others too, so that "git
interpret-trailers" is called (without arguments),
2) an "--trailer <trailer>" option (that can be repeated) to the same
commands, so that "git interpret-trailers" is called with the
"--trailer <trailer>" arguments,
3) a "trailer.enable_commands =  'format-patch, commit'" config
variable, so that "git interpret-trailers" is called (without
arguments) every time one of the specified command is used,
4) your suggested "format.enable_trailers" and maybe
"commit.enable_trailers" and others like that,
5) a "trailer" command for rebase -i todo lists.

My preference would be for 1), 2), 3) and 5).

> The idea has been to first give a standalone text transmonger as a
> filter for let people to try out, so that we know what kind of
> changes are useful (e.g. "insert s-o-b at the very end") and make
> sure the configuration language to specify the changes is easy and
> expressive enough, which is more or less what we have in 'master'.
>
> Once we gain experience (and that may result in updates to what is
> in 'master'), in the second phase, we would figure out what code
> paths can make use of this text transmonger (e.g. your configuration
> variable "format.trailers" to affect the format-patch code path) and
> integrate it more tightly to the codebase.
>
> We are not there yet.

Yeah, "interpret-trailers" will be in Git 2.2 without the above
suggested features, but maybe, if we can get  some feedback from users
about which features they would use, we can aim to have some in Git
2.3.

Thanks,
Christian.
--
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]