[BUG] git-log --follow incompatibile with --max-count

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:45:37

First, it is a bit strange that while "git log" understand '--follow'
option, "git rev-parse" (the plumbing equivalent to be used in scripts)
does not.


Second, somehow "git log --follow <filename>" is incompatible with
'-n' / '--max-count':

 $ git log --max-count=10 --follow --pretty=oneline --abbrev-commit gitweb/gitweb.perl 
 f24dce1... gitweb: Separate features with no project specific override
 61b4606... gitweb: Better processing format string in custom links in navbar

 $ git log --max-count=10 --pretty=oneline --abbrev-commit gitweb/gitweb.perl 
 f24dce1... gitweb: Separate features with no project specific override
 61b4606... gitweb: Better processing format string in custom links in navbar
 8db49a7... gitweb: generate parent..current URLs
 b0be383... gitweb: parse parent..current syntax from PATH_INFO
 3550ea7... gitweb: use_pathinfo filenames start with /
 b02bd7a... gitweb: generate project/action/hash URLs
 d8c2882... gitweb: parse project/action/hash_base:filename PATH_INFO
 1b2d297... gitweb: refactor input parameters parse/validation
 3e3d4ee... Merge branch 'pb/gitweb-tagcloud' into pb/gitweb
 0d1d154... gitweb: Support for simple project search form

 $ git log --max-count=10 --pretty=oneline --abbrev-commit gitweb/gitweb.perl | wc -l
 10

Without '--nax-count' it works correctly:

 $ git log --pretty=oneline --abbrev-commit gitweb/gitweb.perl | wc -l
 446

 $ git log --follow --pretty=oneline --abbrev-commit gitweb/gitweb.perl | wc -l
 485


Both bugs were noticed by Guy Blucher when writing 'historyfollow'
patch for gitweb:
  "[RFC] gitweb: add 'historyfollow' view that follows renames"
  Msg-ID: [ref]
  http://permalink.gmane.org/gmane.comp.version-control.git/99199
-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help