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

Re: [PATCH] pack-objects: Print a message describing the number of threads for packing

From
Jeff King <peff@peff.net>
Date
Feb 26, 2008, 21:21 UTC
Message-ID
<20080226212118.GA32530@sigill.intra.peff.net>
In-Reply-To
<47C435DC.2070508@nrlssc.navy.mil>
On Tue, Feb 26, 2008 at 09:53:00AM -0600, Brandon Casey wrote:
Show 5 quoted lines
> 	git config pack.thread 4
> 	git repack
> 
> The user would immediately know something was wrong when they saw the
> message "Using 1 pack threads" instead of the "4" they thought they

There are hundreds of ways the user can fail to configure git correctly; I don't think it's worth printing output so verbose that the user can manually check that every config option was respected.

At any rate, I think your reasoning is not a good guideline for user output. You are making output to notice a mistake that happens one time (the time of config), but you are showing the output to the reader many times (every time they repack from here to eternity). But there are also mistakes that could be made in the "many times" case, and you are taking their attention away from that.

In the case of repack, it is probably not a big deal. But in the case of 'push', for example, I think we want as little output as possible taking attention away from the useful information: which refs were pushed, which were rejected, and so forth. That's why Nicolas made the pack-objects output considerably more terse last November.

> configured. Also, since it's only printed in the THREADED_DELTA_SEARCH
> case, it's also a confirmation that this option was indeed used for a
> particular build of git.

Same reasoning as above. You configure THREADED_DELTA_SEARCH once; you don't need to check that it was enabled every time you repack.

> I'd also say that if the message is too noisy in the "user explicitly
> assigned number of threads" case, then it's just as noisy in the "auto assign"
> case, so just remove the message completely.

I am not opposed to that; the "auto assign" case is nice to see the first time you repack ("did it find all of my CPUs?"), but yes, it probably will be the same every time after.

-Peff
Previous: Jeff KingNext: Brandon Casey
Message 20 of 22 in “pack-objects: Add runtime detection of online CPU's”
  1. pack-objects: Add runtime detection of online CPU'sAndreas Ericsson, Feb 12, 2008
  2. Shawn O. PearceFeb 12, 2008
  3. Johannes SixtFeb 12, 2008
  4. Bert WesargFeb 12, 2008
  5. Andreas EricssonFeb 12, 2008
  6. Michael HendricksFeb 12, 2008
  7. Brandon CaseyFeb 12, 2008
  8. pack-objects: Add runtime detection of online CPU'sBrandon Casey, Feb 23, 2008
  9. Andreas EricssonFeb 23, 2008
  10. pack-objects: Print a message describing the number of threads for packingBrandon Casey, Feb 23, 2008
  11. Jeff KingFeb 26, 2008
  12. Junio C HamanoFeb 26, 2008
  13. Jeff KingFeb 26, 2008
  14. Junio C HamanoFeb 26, 2008
  15. Jeff KingFeb 26, 2008
  16. Andreas EricssonFeb 26, 2008
  17. Brandon CaseyFeb 26, 2008
  18. Nicolas PitreFeb 26, 2008
  19. Jeff KingFeb 26, 2008
  20. Jeff KingFeb 26, 2008
  21. Brandon CaseyFeb 26, 2008
  22. Jeff KingFeb 26, 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.