Re: [PATCH] stash: disable literal treatment when passing top pathspec

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

 



Junio C Hamano writes:

> Kyle Meyer <kyle@xxxxxxxxxx> writes:
[...]
>>  * the 'git clean' call, triggered by --include-untracked, does not
>>    remove untracked files from the working tree
>>
>>  * the 'git checkout' call, triggered by --keep-index, fails with a
>>    message about ":/" not matching any known files, and the main
>>    command exits with a non-zero status
>>
>> Fix both of these spots by passing --no-literal-pathspecs to the
>> subprocess commands.
>
> Yuck (to the original problem, not to the proposed solution).
>
> I wonder if stopping to use ":/" (or using "." instead, if we need
> to give _some_ pathspec) is a better approach.  Don't we move to the
> top of the working tree by the time cmd_stash() is called and whatever
> subprocess we spawn via run_command() interface will start at the
> top anyway, no?

For the --keep-index/checkout case, yes, it looks like the command
starts from the top-level.  Passing "." as the pathspec to checkout
works fine, as far as I can tell.

However, for --include-untracked/clean case, the subprocess directory is
set to startup_info->original_cwd since 0fce211ccc (stash: do not
attempt to remove startup_info->original_cwd, 2021-12-09).



[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