Re: [PATCH WIP] git-stash: add new 'drop' subcommand
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 6, 2008, 19:44 UTC
- Message-ID
- <7vfxw5yimp.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <47A9EA4A.60101@gnu.org>
Paolo Bonzini <bonzini@gnu.org> writes:
Show 13 quoted lines
>> Also missing is the ability to drop multiple stash entries at
>> one time. I think reflog delete will have to be modified to
>> accommodate this. What happens is that the deletions are performed
>> in a loop, and each deletion shifts the reflog entries so that they
>> don't necessarily point to the same thing.
>
> You just have to sort them backwards, either here or in git reflog.
>
>> +drop)
>> + shift
>> + drop_stash "$@"
>
> drop_stash $(echo "$@" | tr ' ' '\n' | sort -runt\{ -k2)Yes, but this makes me suspect that the parameter should be simply "n m" instead of "stash@{n} stash@{m}".