Re: [PATCH v2 04/10] ref-filter: modify "%(objectname:short)" to take length
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Oct 11, 2015, 17:44 UTC
- Message-ID
- <CAOLa=ZSQMtW8Kd-B7u=9nJ0d3AtN7f1mtz0k0dS9WKmWSv5CNQ@mail.gmail.com>
- In-Reply-To
- <vpqlhb92xx9.fsf@grenoble-inp.fr>
On Sun, Oct 11, 2015 at 9:35 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 39 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes: > >>>> diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh >>>> index 7c9bec7..6fc569e 100755 >>>> --- a/t/t6300-for-each-ref.sh >>>> +++ b/t/t6300-for-each-ref.sh >>>> @@ -385,6 +385,28 @@ test_expect_success 'Check short objectname format' ' >>>> test_cmp expected actual >>>> ' >>>> >>>> +cat >expected <<EOF >>>> +$(git rev-parse --short=1 HEAD) >>>> +EOF >>> >>> Please write all code within test_expect_success including this >>> (t/README: >>> >>> - Put all code inside test_expect_success and other assertions. >>> >>> Even code that isn't a test per se, but merely some setup code >>> should be inside a test assertion. >>> ). >>> >> >> Was just following the previous syntax, should have read that. fixed it > > The common practice (not necessarily a rule, though) when you write code > next to other code that does not follow the style is: > > * If it's not too disturbing, adopt the new style and keep the old code > as-is. I think we are in this case. > > * If the new and the old style do not mix well, prepend a "modernize > style" patch to the series, and adopt the new style in the patch > itself. > > * If you're too lazy to do a "modernize style", adopt the old style for > consistency. >
Ah thanks, Makes sense :)
-- Regards, Karthik Nayak