Re: [PATCH v4 8/8] t5520: check reflog action in fast-forward merge
- From
Paul Tan <pyokagan@gmail.com>
- Date
- May 21, 2015, 08:07 UTC
- Message-ID
- <CACRoPnRHAA7w8iJ-GQGPt11Hnm29o6wgP5bEG_q531XmcK-P1Q@mail.gmail.com>
- In-Reply-To
- <8e51ff8168d050cb2f8fedd4464b2f7b@www.dscho.org>
Hi,
On Mon, May 18, 2015 at 11:20 PM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
Show 14 quoted lines
> Hi Paul, > > On 2015-05-18 15:32, Paul Tan wrote: > >> @@ -95,7 +94,11 @@ test_expect_success 'test . as a remote' ' >> git checkout copy && >> test "$(cat file)" = file && >> git pull && >> - test "$(cat file)" = updated >> + test "$(cat file)" = updated && >> + git reflog -1 >reflog.actual && >> + sed "s/$_x05[0-9a-f]*/OBJID/g" reflog.actual >reflog.fuzzy && > > Actually, let's use "s/^[0-9a-f]*/OBJID/" instead: you only want to replace the first few characters.
Did you mean "s/^$_x05[0-9a-f]*/OBJID/"? (with "$_x05" expanding to '[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' from test-lib.sh). If not, then it would match even if there was no SHA1 hash.
But yes, without the "^" there will very likely be false positives. Thanks for catching.
Show 11 quoted lines
>> @@ -106,7 +109,11 @@ test_expect_success 'the default remote . should >> not break explicit pull' ' >> git reset --hard HEAD^ && >> test "$(cat file)" = file && >> git pull . second && >> - test "$(cat file)" = modified >> + test "$(cat file)" = modified && >> + git reflog -1 >reflog.actual && >> + sed "s/$_x05[0-9a-f]*/OBJID/g" reflog.actual >reflog.fuzzy && > > Same here.
Regards, Paul