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

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

From
Jay Soffian <jaysoffian@gmail.com>
Date
Oct 7, 2011, 21:54 UTC
Message-ID
<CAG+J_DwnUOeDTiUW-UUJGLLg8jJ4EhXN21B7o_hOMnyowM9a8g@mail.gmail.com>
In-Reply-To
<20111007171503.GB16607@mcnabbs.org>
On Fri, Oct 7, 2011 at 1:15 PM, Andrew McNabb <amcnabb@mcnabbs.org> wrote:
Show 14 quoted lines
> The "--skip" option to "git log" did not behave as I expected, but I'm
> not sure whether this was user error, unclear documentation, or a bug.
> Specifically, I ran the following, intending to find the previous
> revision of a given file:
>
> git log --skip=1 -n 1 --oneline some-filename
>
> My expectation was that this would behave the same as:
>
> git log -n 2 --oneline some-filename |tail -n 1
>
> Instead, the --skip=1 parameter seemed to be ignored.  After I tried
> several different values, it appears that the commits are skipped before
> path matching with "some-filename".
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

j.
Previous: Andrew McNabbNext: Andrew McNabb
Message 2 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.