git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] log: add log.follow config option

From
David Turner <dturner@twopensource.com>
Date
Jul 7, 2015, 22:11 UTC
Message-ID
<1436307106.5521.7.camel@twopensource.com>
In-Reply-To
<vpqlherlk4j.fsf@anie.imag.fr>
On Tue, 2015-07-07 at 23:42 +0200, Matthieu Moy wrote:
Show 5 quoted lines
> Hi,
> 
> Thanks for your patch. Below are some comments. Some of them are just me
> thinking out loudly (don't take it badly if I'm being negative), some
> are more serious, but all are fixable.
Thanks for the feedback!
Show 8 quoted lines
> David Turner <dturner@twopensource.com> writes:
> 
> > From: David Turner <dturner@twitter.com>
> 
> If you configure your commiter id and your From field to the same value,
> you can avoid this distracting "From:" header.
> 
> You're lacking a Signed-off-by trailer.
Oops.  Cherry-picked over from internal repo.  Will fix.
<snip> (suggestions applied)
Show 34 quoted lines
> > +     git log --name-status --pretty="format:%s"  path1 > current'
> 
> Whitespace: here an elsewhere, you have two spaces before path1, and we
> usually stick the > to the filename like >current.
>
> > --- a/t/t4206-log-follow-harder-copies.sh
> > +++ b/t/t4206-log-follow-harder-copies.sh
> > @@ -53,4 +53,39 @@ test_expect_success \
> >      'validate the output.' \
> >      'compare_diff_patch current expected'
> >  
> > +test_expect_success \
> > +    'git config log.follow works like --follow' \
> > +    'test_config log.follow true &&
> > +     git log --name-status --pretty="format:%s"  path1 > current'
> > +
> > +test_expect_success \
> > +    'validate the output.' \
> > +    'compare_diff_patch current expected'
> 
> I would squash these two tests. As-is, the first one doesn't really test
> anything (well, just that git log doesn't crash with log.follow).
> 
> I think you meant test_cmp, not compare_diff_patch, as you don't need
> the "similarity index" and "index ..." filtering that compare_diff_patch
> does before test_cmp.
> 
> That said, I see that you are mimicking surrounding code, which is a
> good thing for consistancy. I think the best would be to write tests in
> t4202-log.sh, which already tests the --follow option, and uses a more
> modern coding style which you can mimick.
> t4206-log-follow-harder-copies.sh is really about finding copies in
> --follow. Another option is to start your series with a patch like
> "t4206: modernize style".

I'm going to move over to t4202. My next re-roll will include fixes for everything you raised.

Previous: Matthieu MoyNext: Junio C Hamano
Message 3 of 7 in “log: add log.follow config option”
  1. log: add log.follow config optionDavid Turner, Jul 7, 2015
  2. Matthieu MoyJul 7, 2015
  3. David TurnerJul 7, 2015
  4. Junio C HamanoJul 7, 2015
  5. David TurnerJul 8, 2015
  6. Junio C HamanoJul 8, 2015
  7. Junio C HamanoJul 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.