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

Re: [PATCH 06/18] version-gen: remove redundant check

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 14, 2023, 17:47 UTC
Message-ID
<643991c58aef_5ecfe29433@chronos.notmuch>
In-Reply-To
<ZDltLSTxBCWRoMjK@pobox.com>
Todd Zullinger wrote:
Show 6 quoted lines
> Felipe Contreras wrote:
> > If we are not in a git repository `git describe` will fail anyway.
> 
> The parent directory may be a git repository though.  The
> current code ensures that we're running `git describe` in
> the proper repository.
How exactly does it do that?

The current code expects the cwd to be the git repo, run it in any other directory and it will generate GIT-VERSION-FILE in that directory, which is clearly not intended.

> If we drop this, aren't we breaking things for someone
> building a git tarball which is in a subdirectory of a git
> repository?
How exactly would this hypothetical person build such a tarball?
  git init /tmp/foo
  mkdir -p /tmp/foo/bar
  cd /tmp/foo/bar
  make -C ~/dev/git dist
Works fine.
-- 
Felipe Contreras
Previous: Todd ZullingerNext: Todd Zullinger
Message 10 of 24 in “version-gen: complete revamp/rewrite”
  1. 00/18 version-gen: complete revamp/rewriteFelipe Contreras, Apr 14, 2023
  2. 01/18 version-gen: reorganizeFelipe Contreras, Apr 14, 2023
  3. 02/18 version-gen: trivial cleanupFelipe Contreras, Apr 14, 2023
  4. 03/18 version-gen: refactor default versionFelipe Contreras, Apr 14, 2023
  5. 04/18 version-gen: simplify v prefix removalFelipe Contreras, Apr 14, 2023
  6. 05/18 version-gen: simplify update checkFelipe Contreras, Apr 14, 2023
  7. 07/18 version-gen: simplify `git describe` checksFelipe Contreras, Apr 14, 2023
  8. 06/18 version-gen: remove redundant checkFelipe Contreras, Apr 14, 2023
  9. Todd ZullingerApr 14, 2023
  10. Felipe ContrerasApr 14, 2023
  11. Todd ZullingerApr 14, 2023
  12. Felipe ContrerasApr 14, 2023
  13. Todd ZullingerApr 14, 2023
  14. 08/18 version-gen: simplify dirty checkFelipe Contreras, Apr 14, 2023
  15. 09/18 version-gen: move describe fix into functionFelipe Contreras, Apr 14, 2023
  16. 11/18 version-gen: refactor describe functionFelipe Contreras, Apr 14, 2023
  17. 10/18 version-gen: describe and sed in one goFelipe Contreras, Apr 14, 2023
  18. 13/18 version-gen: move v fix into sedFelipe Contreras, Apr 14, 2023
  19. 15/18 version-gen: remove default versionFelipe Contreras, Apr 14, 2023
  20. 12/18 version-gen: do v fix only when necessaryFelipe Contreras, Apr 14, 2023
  21. 14/18 version-gen: refactor main functionalityFelipe Contreras, Apr 14, 2023
  22. 17/18 version-gen: get rid of GVF variableFelipe Contreras, Apr 14, 2023
  23. 16/18 version-gen: refactor GIT_VERSION stringFelipe Contreras, Apr 14, 2023
  24. 18/18 version-gen: generate proper interim versionsFelipe Contreras, Apr 14, 2023

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.