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

Re: [PATCH 1/4] list-object: add get_commit_count function

From
Jeff King <peff@peff.net>
Date
Jul 3, 2015, 18:36 UTC
Message-ID
<20150703183653.GA11183@peff.net>
In-Reply-To
<xmqqtwtl3zd7.fsf@gitster.dls.corp.google.com>
On Fri, Jul 03, 2015 at 10:49:40AM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Lawrence Siebert <lawrencesiebert@gmail.com> writes:
> 
> > Moving commit counting from rev-list into list-object which is a step
> > toward letting git log do counting as well.
> >
> > Signed-off-by: Lawrence Siebert <lawrencesiebert@gmail.com>
> > ---
> 
> No way.  Look at the things provided by list-objects.c API.  They
> are not about formatting outputs.  printf() calls do not belong
> there.

Moreover, if we are going to provide an abstracted function to show the commit count, we would also need to provide one to _create_ the count. IOW, this get_commit_count, wherever it goes, should be accompanied by the matching code that is put into "show_commit" in patch 2.

-Peff
Previous: Junio C Hamano
Message 10 of 10 in “list-object: add get_commit_count function”
  1. 1/4 list-object: add get_commit_count functionLawrence Siebert, Jul 2, 2015
  2. 2/4 log: add --count option to git logLawrence Siebert, Jul 2, 2015
  3. Remi Galan AlfonsoJul 2, 2015
  4. Lawrence SiebertJul 2, 2015
  5. 3/4 log --count: added testLawrence Siebert, Jul 2, 2015
  6. Remi Galan AlfonsoJul 2, 2015
  7. 4/4 git-log: update man documentation for --countLawrence Siebert, Jul 2, 2015
  8. Remi Galan AlfonsoJul 2, 2015
  9. Junio C HamanoJul 3, 2015
  10. Jeff KingJul 3, 2015

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.