Re: Config variables and scripting // was Re: [RFC/PATCH] log: add log.firstparent option

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

 



On Wed, Jul 22, 2015 at 10:48 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Wed, Jul 22, 2015 at 10:14:45PM -0700, Jeff King wrote:
>
>> Script writers should not care here, because they should not be parsing
>> the output of the porcelain "log" command in the first place. It already
>> has many gotchas (e.g., log.date, log.abbrevCommit).
>>
>> I am sympathetic, though. There are some things that git-log can do that
>> rev-list cannot, so people end up using it in scripts. I think you can
>> avoid it with a "rev-list | diff-tree" pipeline, though I'm not 100%
>> sure if that covers all cases. But I would much rather see a solution
>> along the lines of making the plumbing cover more cases, rather than
>> trying to make the porcelain behave in a script.
>
> Ah, I see in a nearby thread that you just recently fixed a problem with
> git-subtree and log.date, so I see now why you are so interested. :)
>
> And I was also reminded by that usage of why rev-list is annoying in
> scripts: even with "--format", it insists on writing the "commit ..."
> header. I wonder if we could fix that...
>
> -Peff
> --
> 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

Agreed. Fix the plumbing instead and document how/why to use it
instead of the porcelain. We might do better to help clearly document
which commands are porcelain and which are plumbing maybe by
referencing which plumbings to use in place of various porcelain
commands. I know, for example, that git status already does this.

Regards,
Jake
--
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]