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

Re: StGit: kha/{safe,experimental} updated

From
Karl Hasselström <kha@treskal.com>
Date
May 21, 2008, 14:58 UTC
Message-ID
<20080521145834.GB31982@diana.vm.bytemark.co.uk>
In-Reply-To
<b0943d9e0805210707s5af76462wc92a4cf55e5d4a9d@mail.gmail.com>
On 2008-05-21 15:07:44 +0100, Catalin Marinas wrote:
Show 11 quoted lines
> 2008/5/20 Karl Hasselström <kha@treskal.com>:
>
> > Nah, easier to just change the order of the checks (try r2 before
> > r1) as I outlined. I'll whip up a patch.
> [...]
> > If you're exactly on a tagged commit, git-describe will return
> > just the name of that tag, so you don't need to do anything extra.
>
> Now that you mentioned this (I didn't know), is there a need to
> reverse steps r2 and r1? I always build the release from the current
> tag and the version should be clean.

The advantage is that step r1 involves running git-describe, which is relatively expensive. With the patch I just posted, we only have to pay that cost when it's really necessary (which is when running stg directly from a git tree).

Show 6 quoted lines
> > Both git and we call git-describe with --abbrev=4, which I think
> > means "describe the commit uniquely with as few digits as
> > possible, but no less than four". So we'll get upgraded
> > automatically when it becomes necessary.
>
> OK, I didn't know this either.
I only found out when I wrote the first version patch.
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Catalin Marinas
Message 16 of 16 in “StGit: kha/{safe,experimental} updated”
  1. Karl HasselströmMay 14, 2008
  2. 1/2 Import version to a separate namespaceKarl Hasselström, May 14, 2008
  3. 2/2 Better StGit version trackingKarl Hasselström, May 14, 2008
  4. Emacs mode: automatically cd up to root of worktreeKarl Hasselström, May 14, 2008
  5. David KågedalMay 14, 2008
  6. Karl HasselströmMay 14, 2008
  7. New command: stg redoKarl Hasselström, May 14, 2008
  8. Catalin MarinasMay 19, 2008
  9. Karl HasselströmMay 20, 2008
  10. Catalin MarinasMay 20, 2008
  11. Karl HasselströmMay 20, 2008
  12. Try the built-in version string before git-describeKarl Hasselström, May 20, 2008
  13. Catalin MarinasMay 21, 2008
  14. Karl HasselströmMay 21, 2008
  15. Catalin MarinasMay 21, 2008
  16. Karl HasselströmMay 21, 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.