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

Re: Configuring a third-party git hook

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 20, 2014, 16:53 UTC
Message-ID
<xmqqwqfozu9t.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAPTjJmomAnrjjyfSvDJijBP2pUN_kqVCRr+UbZkQHQy295A85A@mail.gmail.com>
Chris Angelico <rosuav@gmail.com> writes:
Show 9 quoted lines
> file. It doesn't really care about the full history, and wants to be
> reasonably fast (as the user is waiting for it). It's just a
> convenience, so correctness isn't a huge issue. The easiest way to
> keep it moving through quickly is to limit the search:
>
> $ git log ...other options... HEAD~100 some-file.pike
>
> The problem with this is that it doesn't work if HEAD doesn't have 100
> great-great-...-grandparents

Did you really mean that you are *not* interested in what happened to the most recent 100 commits? Or is it a typo of "HEAD~100.."?

"git log -100" should traverse from the HEAD and stop after showing at most 100 items, even if you only had 20 in the history.

Previous: Junio C HamanoNext: Chris Angelico
Message 13 of 14 in “Configuring a third-party git hook”
  1. Chris AngelicoMar 19, 2014
  2. KevinMar 20, 2014
  3. Chris AngelicoMar 20, 2014
  4. Jeff KingMar 20, 2014
  5. Chris AngelicoMar 20, 2014
  6. Jeff KingMar 21, 2014
  7. Chris AngelicoMar 21, 2014
  8. Junio C HamanoMar 21, 2014
  9. Chris AngelicoMar 21, 2014
  10. Jeff KingMar 21, 2014
  11. Junio C HamanoMar 21, 2014
  12. Junio C HamanoMar 21, 2014
  13. Junio C HamanoMar 20, 2014
  14. Chris AngelicoMar 20, 2014

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.