Re: [RFC PATCH v2 2/3] Introduce git-discard

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

 



On Fri, Jul 24, 2009 at 20:02, Elijah Newren<newren@xxxxxxxxx> wrote:
> On Fri, Jul 24, 2009 at 10:24 AM, Thomas Rast<trast@xxxxxxxxxxxxxxx> wrote:
>> The new command 'git discard' is precisely the same as 'git checkout --'.
>> +(This is the same as `git checkout \-- <paths>`.)
>
> Actually, there's an important difference:
>
>> +       exec git checkout "$@"
>
> $ git branch foo HEAD~20
> $ touch foo && git add foo
> $ echo hi >> foo
> $ git discard foo
> A     foo
> Switched to branch "foo"
>
> You really do need that "--".
You fall into the same trap as me for patch 1/3. He does not shift
away the '--', so it is still in "$@".

Bert.
--
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]