Re: [PATCH v1 2/3] cvsexportcommit: do not run git programs in dashed form

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

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> On Tue, Aug 25, 2020 at 9:17 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> This ancient script runs "git-foo" all over the place.  A strange
>> thing is that it has t9200 tests successfully running, even though
>> it does not seem to futz with PATH to prepend $(git --exec-path)
>> output.
>
> t/test-lib.sh takes care of that for us, doesn't it?

Actually, it is "git" itself.  

The tests spawn "git cvsexportcommit" via the "git" dispatcher.  The
dispatcher adds GIT_EXEC_PATH to PATH in exec-cmd.c::setup_path()
and that is used to (1) locate "git-foo" from /usr/libexec/git-core/
that are not builtin and (2) passed to any processes we invoke.  I
think the latter was originally done primarily for not breaking
hooks, but that is what allows this script going in this particular
case.

If this were only a fluke in the test that kept otherwise unrunnable
script passing, I'd say it is an evidence enough that lets us drop
the cvsexportcommit immediately, but now I rediscovered how it was
supposed to work and saw how it actually does work as designed, I
would not be surprised if it is still used in the wild.

Thanks.






[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