Re: [Git 1.7.6.557.gcee4] git stash
- From
- Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
- Date
- Aug 22, 2011, 19:58 UTC
- Message-ID
- <fbFntd6r8tmN4NcET9Ya3OWDfsrxz1tfPv7GaddGfwwdirG8AgjrG8ARoR2-ZhadzpRI2DU2ZtTGdWAUGJeUZuBXmxWX5eSmT16u5cBjtec@cipher.nrlssc.navy.mil>
- In-Reply-To
- <CAE1pOi2OnHpu+kBj8Z47nb7C-MHFpUMAc8ArG3haWpncEDQ-jA@mail.gmail.com>
On 08/22/2011 01:43 PM, Hilco Wijbenga wrote:
Show 10 quoted lines
> On 22 August 2011 10:15, Brandon Casey > <brandon.casey.ctr@nrlssc.navy.mil> wrote: >> On 08/22/2011 01:01 AM, Hilco Wijbenga wrote: >>> Hi David, >>> >>> I noticed your very timely change to git stash in the current master >>> branch. I tried it but it doesn't behave as I was expecting/hoping. >> >> It looks like it is actually creating the stash correctly, but it's >> just not deleting the ignored directory.
Show 20 quoted lines
>> Something like this is probably the appropriate fix:
>>
>> diff --git a/git-stash.sh b/git-stash.sh
>> index f4e6f05..a2d4b4d 100755
>> --- a/git-stash.sh
>> +++ b/git-stash.sh
>> @@ -240,7 +240,7 @@ save_stash () {
>> test "$untracked" = "all" && CLEAN_X_OPTION=-x || CLEAN_X_OPTION
>> if test -n "$untracked"
>> then
>> - git clean --force --quiet $CLEAN_X_OPTION
>> + git clean --force --quiet -d $CLEAN_X_OPTION
>> fi
>>
>> if test "$keep_index" = "t" && test -n $i_tree
>>
>> Needs tests.
>
> I just tried it with the extra -d and it all seems to work
> beautifully. Should your patch be sent anywhere?It needs a couple of tests added to t/t3905-stash-include-untracked.sh to demonstrate that this functionality works correctly and to ensure that it doesn't break in the future.
Need tests at least for:
--all stashes untracked / ignored in subdirectory --include-untracked stashes untracked in subdirectory, leaves ignored alone
Do we currently test that stash leaves untracked / ignored alone when --all or --include-untracked are not supplied?
And it needs a commit message following the guidelines in Documentation/SubmittingPatches. Then it can be submitted to this list using format-patch and send-email. Interested??? :) otherwise I'll try to get to it later tonight.
-Brandon