Re: [PATCH 1/8] git-rebase.sh: Fix --merge --abort failures when path contains whitespace
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Apr 9, 2008, 14:51 UTC
- Message-ID
- <47FCD7E8.40004@viscovery.net>
- In-Reply-To
- <20080409143702.GD24402@shion.is.fushizen.net>
Bryan Donlan schrieb:
Show 13 quoted lines
> On Wed, Apr 09, 2008 at 08:55:31AM +0200, Johannes Sixt wrote: >> Bryan Donlan schrieb: >>> +### Test that we handle strange characters properly >>> +work_dir="$(pwd)/test \" ' \$ \\ dir" >> In effect, you modify only this test to stress-test strange characters, >> but other tests in the test suite still run in a "sane" environment. IOW, >> I don't think you should go to this extreme for this one test only. The >> better approach would be to rename 'trash' in test-lib.sh to this strange >> name so that all tests suffer from a challenging environment. > > I can do that, but it'd have to come as the last patch in the patchset, > or it would obviously cause test failures. My goal here was to ensure > that the bug I fixed in the patch would be tested in an isolated manner.
I for my taste could live without a test because the fix is so obvious. Given that you have to prepend 'cd "$work_dir"' to *all* the tests, this really just highlights that for the purpose of this test the name 'trash' of the regular test directory is just too simple ;)
Of course, it's Junio's draw, and he likes to have tests for fixes that are submitted.
> If you like I can add a change to the trash directory to the next rev of > the patchset.
Yes, why not?
Show 9 quoted lines
>>> - git reset --hard pre-rebase >>> - test_must_fail git rebase'"$type"' master && >>> - test -d '$dotest' && >>> + git reset --hard pre-rebase && >>> + test_must_fail git rebase$type master && >>> + test -d \"\$dotest\" && >> I could imagine that the missing && after the git reset is deliberate. Mike? > > I assumed that if git reset failed here we'd probably want to know :)
On second sight, this indeed looks just like an omission and your change is good.
-- Hannes