Re: [StGit PATCH] Add import -p option
- From
- Catalin Marinas <catalin.marinas@gmail.com>
- Date
- Sep 9, 2009, 22:09 UTC
- Message-ID
- <b0943d9e0909091509i16b556f0x9dd3aa6788054298@mail.gmail.com>
- In-Reply-To
- <20090908223714.GA6364@diana.vm.bytemark.co.uk>
2009/9/8 Karl Wiberg <kha@treskal.com>:
Show 8 quoted lines
> On 2009-09-08 22:43:39 +0100, Catalin Marinas wrote: > >> This patch renames some of the existing import options and adds the >> -p (--strip) option which allows stripping the leading slashes of >> the diff paths. > > Looks good (and the intent is very good). The import test should > probably be augmented with a test case for -pN, though.
Yes. I'll try to add one. As you noticed, not all options are tested.
Show 5 quoted lines
>> + if strip: >> + cmd += ['-p', strip] > > This test should probably be "if strip != None". It doesn't _really_ > matter, technically, since -p0 is the default, but still ...
I modified it after posting the patch. The git default is -p1, so we would miss the -p0 case.
-- Catalin