Re: [PATCH v3 0/4] run-command.c: print env vars when GIT_TRACE is set

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

 



On Sat, Jan 13, 2018 at 12:19 AM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
>> Oh.. before anybody asks, I'm not adding git prefix to the "cd" part.
>> You're supposed to know that git moves back to worktree top dir when
>> you read $GIT_TRACE (or are welcome to improve the print out).
>
> Heh. Would appending  "; cd -" solve the issue? (Though I would argue
> we don't need or want to add that actually, as you'd want to copy and run
> the command and surely want to run more tests in that directory afterwards.
> I mean you're debugging, right?)

The problem is if you are tracing in a subdir foo/bar and the trace
output says "cd xyz". You can' just copy and execute that command and
have to do "cd ../../xyz". I don't see how "cd -" would solve that.
Printing "cd $(git rev-parse --show-cdup)/xyz" could solve it without
passing the prefix down to this trace function. I guess. But then that
command depends on $GIT_DIR. If your $GIT_DIR is being changed (i.e.
submodules), it gets ugly again.
-- 
Duy



[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