Re: [PATCH v8 00/12] Add interpret-trailers builtin

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

 



From: Junio C Hamano <gitster@xxxxxxxxx>

> Christian Couder <chriscool@xxxxxxxxxxxxx> writes:
> 
>> Until now git commit has only supported the well known
>> "Signed-off-by: " trailer, that is used by many projects like
>> the Linux kernel and Git.
>>
>> It is better to implement features for these trailers first in a
>> new command rather than in builtin/commit.c, because this way the
>> prepare-commit-msg and commit-msg hooks can reuse this command.
> 
> The "first" is somewhat questionable.
> 
> It is better to keep builtin/commit.c uncontaminated by any more
> hard-wired logic, like what we have for the signed-off-by line.  Any
> new things can and should be doable in hooks, and this filter would
> help writing these hooks.
> 
> And that is why the design goal of the filter is to make it at least
> as powerful as the built-in logic we have for signed-off-by lines;
> that would allow us to later eject the hard-wired logic for
> signed-off-by line from the main codepath, if/when we wanted to.
> 
> Alternatively, we could build a library-ish API around this filter
> code and replace the hard-wired logic for signed-off-by line with a
> call into that API, if/when we wanted to, but that requires (in
> addition to the "at least as powerful as the built-in logic") that
> the implementation of this stand-alone filter can be cleanly made
> into a reusable library, so that is a bit higher bar to cross than
> "everything can be doable with hooks" alternative.

Ok, I will try to improve this part of the Rationale section.

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]