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
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2020, 23:17 UTC
Message-ID
<xmqqeet0urts.fsf@gitster.c.googlers.com>
In-Reply-To
<20200406224526.256074-4-emilyshaffer@google.com>
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".

Thanks.
Previous: Emily ShafferNext: Emily Shaffer
Message 21 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.