Re: [PATCH v3 00/16] Add new command 'restore'

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

 



Emily Shaffer <emilyshaffer@xxxxxxxxxx> writes:

> Then, figuring that I only had a few files, I thought I'd type them
> each, with the exception of a .c/.h pair:
>
> g restore --staged builtin/log.c builtin/walken.c revision.*
>
> Because I had build artifacts present, this vomited while trying to
> unstage revision.o, and again left me with all my changes still staged.
> revision.o is validly ignored:
>
> $ g check-ignore revision.o                               
> revision.o

Often a claim "validly ignored" by users needs to be taken with a
grain of salt.  When it is in the index, it is no longer ignored.

Assuming that you do not have revision.o in the index, and if
"restore" is still "checkout -- <pathspec>" in disguise, then I
think you could ask "git" not your shell to expand the asterisk, by
protecting it from the shell, i.e.

	$ git restore --staged revision.\*

and the pathspec should not match untracked revision.o.  And if that
does not work, you found a bug in restore, I think ;-).



[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