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

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 7, 2008, 18:38 UTC
Message-ID
<200811071938.11170.jnareb@gmail.com>

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: <054F21930D24A0428E5B4588462C7AED0149B4B8@ednex512.dsto.defence.gov.au>
  http://permalink.gmane.org/gmane.comp.version-control.git/99199
-- 
Jakub Narebski
Poland
Message 1 of 1 in “[BUG] git-log --follow incompatibile with --max-count”
  1. Jakub NarebskiNov 7, 2008

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.