Re: [PATCH] blame: use different author name for fake commit generated by --contents
- From
Jacob Keller <jacob.e.keller@intel.com>
- Date
- Apr 22, 2023, 00:11 UTC
- Message-ID
- <019057ab-c917-80cd-063b-4871e47dc382@intel.com>
- In-Reply-To
- <xmqqbkjgizcv.fsf@gitster.g>
On 4/21/2023 4:34 PM, Junio C Hamano wrote:
Show 10 quoted lines
> Jacob Keller <jacob.e.keller@intel.com> writes: > >> +test_expect_success 'blame working copy' ' >> + test_when_finished "git restore file" && >> + echo "1A quick brown fox jumps over" >file && >> + echo "another lazy dog" >> file && > > Lose the SP between ">>" redirection operator and its operand > "file". >
Yep.
Show 13 quoted lines
> So, we have "1A quick brown fox jumps over the" and "lazy dog" > in :file and HEAD:file, and both of these lines are different > in the working tree files as shown above. > >> + check_count A 1 "Not Committed Yet" 1 > > So why do we expect one is attributed to A while the other is > attributed to the working tree file? Shouldn't we be expecting both > to be attributed to "Not Committed Yet"? > > WIth this updated like the attached, 8001, 8002, and 8012 seem to > all pass (and without, they all fail). >
I think I just missed a "the".
Show 15 quoted lines
> t/annotate-tests.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git c/t/annotate-tests.sh w/t/annotate-tests.sh > index 859693949b..4238ce45f8 100644 > --- c/t/annotate-tests.sh > +++ w/t/annotate-tests.sh > @@ -74,8 +74,8 @@ test_expect_success 'blame 1 author' ' > > test_expect_success 'blame working copy' ' > test_when_finished "git restore file" && > - echo "1A quick brown fox jumps over" >file && > - echo "another lazy dog" >> file && > + echo "11A quick brown fox jumps over the" >file && > + echo "lazy dog" >>file &&
I think the right fix for this test is to keep the first line (1A) the same, and include the missing "the" I had removed before, and keep the 2nd line as the changed line with "another lazy dog".
Will fix in v2, and double check the tests. I had run them but my local system sometimes fails the following test:
Show 7 quoted lines
> not ok 46 - passing hostname resolution information works > # > # BOGUS_HOST=gitbogusexamplehost.invalid && > # BOGUS_HTTPD_URL=$HTTPD_PROTO://$BOGUS_HOST:$LIB_HTTPD_PORT && > # test_must_fail git ls-remote "$BOGUS_HTTPD_URL/smart/repo.git" >/dev/null && > # git -c "http.curloptResolve=$BOGUS_HOST:$LIB_HTTPD_PORT:127.0.0.1" ls-remote "$BOGUS_HTTPD_URL/smart/repo.git" >/dev/null > #
I had thought this was the only failure, and that it has something to do with my system configuration (possibly proxy settings) which affect this.. I checked the firewall configuration and it doesn't appear to be that...
It would be nice to figure out what makes it so the tests fail so that I can make sure tests properly pass on my submissions before sending them in the future.
Thanks, Jake
Show 5 quoted lines
> check_count A 1 "Not Committed Yet" 1 > ' > > >