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

Re: unexpected behavior with `git log --skip filename`

From
AMAndrew McNabb <amcnabb@mcnabbs.org>
Date
Oct 8, 2011, 02:36 UTC
Message-ID
<20111008023637.GA18136@mcnabbs.org>
In-Reply-To
<CAG+J_DwnUOeDTiUW-UUJGLLg8jJ4EhXN21B7o_hOMnyowM9a8g@mail.gmail.com>
On Fri, Oct 07, 2011 at 05:54:36PM -0400, Jay Soffian wrote:
Show 9 quoted lines
> 
> Hmm:
> 
> $ git log --oneline GIT-VERSION-GEN | head -2
> 7f41b6bbe3 Post 1.7.7 first wave
> 703f05ad58 Git 1.7.7
> 
> $ git log --oneline --skip=1 -n 1 GIT-VERSION-GEN
> 703f05ad58 Git 1.7.7

I went back to reproduce this, and I think I may have been using the --follow option earlier. In my private repository, git log gives identical output for the last two commits when I don't specify --skip:

$ git log -n 2 --oneline httpd.conf.orig f0026e9 updated many of the *.orig files to the latest version e57e840 moved the .orig files into place, too $ git log --follow -n 2 --oneline httpd.conf.orig f0026e9 updated many of the *.orig files to the latest version e57e840 moved the .orig files into place, too $

But when I specify --skip=1, the output is different:

$ git log -n 1 --skip=1 --oneline httpd.conf.orig e57e840 moved the .orig files into place, too $ git log --follow -n 1 --skip=1 --oneline httpd.conf.orig f0026e9 updated many of the *.orig files to the latest version $

GIT-VERSION-GEN example that you shared, I don't notice this difference. It's not immediately obvious to me what's different between the two examples.

-- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868

Previous: Jay SoffianNext: Jay Soffian
Message 3 of 4 in “unexpected behavior with `git log --skip filename`”
  1. Andrew McNabbOct 7, 2011
  2. Jay SoffianOct 7, 2011
  3. Andrew McNabbOct 8, 2011
  4. Jay SoffianOct 8, 2011

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.