Re: [PATCH] stash: Don't fail if work dir contains file named 'HEAD'
- From
Jonathon Mah <me@jonathonmah.com>
- Date
- Dec 31, 2011, 00:01 UTC
- Message-ID
- <117AA87B-FDCA-48B3-B5A3-02AF392332E9@JonathonMah.com>
- In-Reply-To
- <8739c28iwh.fsf@thomas.inf.ethz.ch>
Thanks for the feedback, Thomas. I should note, this bug initially came up on #git several days ago.
I've tried to take on all your suggestions; patch v2 imminent.
On 2011-12-30, at 02:15, Thomas Rast wrote:
Show 15 quoted lines
> Jonathon Mah <me@JonathonMah.com> writes:
>> diff --git a/t/t3904-stash-patch.sh b/t/t3904-stash-patch.sh
> [...]
>
> Other reviewers may want to read these hunks in word diff mode, where it
> is far easier to verify that the functionality tested is a superset:
>
> test_expect_success PERL 'saying "n" does nothing' '
> {+set_state HEAD HEADfile_work HEADfile_index &&+}
> set_state dir/foo work index &&
> (echo n; echo {+n; echo+} n) | test_must_fail git stash save -p &&
> verify_state [-dir/foo work index-]{+HEAD HEADfile_work HEADfile_index+} &&
> verify_saved_state bar {+&&+}
> {+ verify_state dir/foo work index+}
> 'I added a note to the message: In t3904, checks and operations on each file are in the order they'll appear when interactively staging.
That is, "echo y/n; echo y/n; ..." for the three files corresponds to the surrounding checks.
Jonathon Mah me@JonathonMah.com