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

Re: [PATCH v12 3/5] bugreport: gather git version and build info

From
Emily Shaffer <emilyshaffer@google.com>
Date
Apr 7, 2020, 18:42 UTC
Message-ID
<20200407184240.GB137962@google.com>
In-Reply-To
<xmqqeet0urts.fsf@gitster.c.googlers.com>
On Mon, Apr 06, 2020 at 04:17:51PM -0700, Junio C Hamano wrote:
Show 35 quoted lines
> Emily Shaffer <emilyshaffer@google.com> writes:
> 
> > It's not ideal to directly call 'git version --build-options' because
> > that output goes to stdout. Instead, wrap the version string in a helper
> > within help.[ch] library, and call that helper from within the bugreport
> > library.
> 
> This means that "git-bugreport" that can be a different binary from
> say "git-remote-curl" (or "git-version" for that matter) would still
> report whatever version string that was compiled into "bugreport".
> 
> Reporting the version of "bugreport" is *not* useless, and what this
> step adds to the report is good.  
> 
> But the version number of "bugreport" may not have much to do with
> the binary the end user is having trouble with, so we'd also want
> the version of the main part of "git", and other standalone "git"
> subprograms like "git-remote-curl", reported separately, probably
> together with $PATH, $GIT_EXEC_PATH and what appears in the
> directories listed on these environment variables.
> 
> If "git version --build-options" writes to its standard output
> stream, that is a good thing, as it makes it easy to spawn and read
> what it says via the run_command() API, and there is one less thing
> to worry about (it would be a bit more cumbersome if the output goes
> to the standard error stream).
> 
> As "git-remote-curl" would also be a separate binary, we'd have to
> use the same technique to report version number (and perhaps curl's
> library version and its configuration?), perhaps by teaching the
> subcommand a new option to dump such details to its standard output.
> 
> Using the same technique to report the version about the "git"
> itself would be consistent thing to do, as a preparation for future
> steps that reports the details about "git-remote-curl".

Sure. I will include a run_command() call to "git version --build-options" (or is it --build-info?) in the same series where I re-introduce the call to "git-remote-curl", since they will look pretty similar; around that time I will clean up what "git-bugreport" reports about its own version/build info, too.

To be clear, do you want me to include the output of get_compiler_info() in "git version --build-options" when I do that change, too?

 - Emily
Previous: Junio C HamanoNext: Junio C Hamano
Message 22 of 32 in “add git-bugreport tool”
  1. 0/5 add git-bugreport toolEmily Shaffer, Mar 23, 2020
  2. 1/5 help: move list_config_help to builtin/helpEmily Shaffer, Mar 23, 2020
  3. 2/5 bugreport: add tool to generate debugging infoEmily Shaffer, Mar 23, 2020
  4. 3/5 bugreport: gather git version and build infoEmily Shaffer, Mar 23, 2020
  5. 4/5 bugreport: add uname infoEmily Shaffer, Mar 23, 2020
  6. 5/5 bugreport: add compiler infoEmily Shaffer, Mar 23, 2020
  7. Junio C HamanoMar 23, 2020
  8. Emily ShafferMar 25, 2020
  9. 0/5 add git-bugreport toolEmily Shaffer, Mar 25, 2020
  10. 1/5 help: move list_config_help to builtin/helpEmily Shaffer, Mar 25, 2020
  11. 2/5 bugreport: add tool to generate debugging infoEmily Shaffer, Mar 25, 2020
  12. SZEDER GáborApr 1, 2020
  13. 3/5 bugreport: gather git version and build infoEmily Shaffer, Mar 25, 2020
  14. 4/5 bugreport: add uname infoEmily Shaffer, Mar 25, 2020
  15. 5/5 bugreport: add compiler infoEmily Shaffer, Mar 25, 2020
  16. 0/5 bugreport: add tool to generate debugging infoEmily Shaffer, Apr 6, 2020
  17. 1/5 help: move list_config_help to builtin/helpEmily Shaffer, Apr 6, 2020
  18. Junio C HamanoApr 6, 2020
  19. 2/5 bugreport: add tool to generate debugging infoEmily Shaffer, Apr 6, 2020
  20. 3/5 bugreport: gather git version and build infoEmily Shaffer, Apr 6, 2020
  21. Junio C HamanoApr 6, 2020
  22. Emily ShafferApr 7, 2020
  23. Junio C HamanoApr 7, 2020
  24. Emily ShafferApr 7, 2020
  25. 4/5 bugreport: add uname infoEmily Shaffer, Apr 6, 2020
  26. Junio C HamanoApr 6, 2020
  27. 5/5 bugreport: add compiler infoEmily Shaffer, Apr 6, 2020
  28. Junio C HamanoApr 6, 2020
  29. Danh DoanApr 6, 2020
  30. Junio C HamanoApr 7, 2020
  31. Emily ShafferApr 7, 2020
  32. Junio C HamanoApr 7, 2020

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.