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

Re: How can I automatically create a GIT branch that represents a sequence of tags?

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Aug 10, 2013, 23:20 UTC
Message-ID
<20130810232026.GF25779@paksenarrion.iveqy.com>
In-Reply-To
<CAFw3YtRLgUGGn9JV5K3P9XtMBcBeO7=VSM7PekSxtW6xCsfZ1Q@mail.gmail.com>
On Sat, Aug 10, 2013 at 11:29:45PM +0100, Kristian Freed wrote:
Show 12 quoted lines
> In our current setup, we have automatic tagging in git of all
> successful release builds. This makes it easy to go back to stable
> points in history and compare functionality, check when bugs were
> introduced etc.
> 
> To help with this process further, it would be useful to be able to
> use git bisect, but as these are just a sequence of tags, not commits
> on a branch, git bisect will not work as is.
> 
> Is there any tooling for automatically recreating a branch from a
> sequence of tags, where each generated commit is the calculated delta
> between each two neighbouring tags?

I don't understand, why is it better to find between which tags a error was found and not in what commit. It's much easier to find a bug introduced in a commit than in a tag/release. It sounds like you're doing the bug hunting harder. Could you explain this further?

It would be very hard to do a tool such as you describe, the reason is that there's no sane way to order your tags. Git today show tags alphabetically, all versions does not have a alphabtic order. You could argue that it should be in the order of the tagged commits commit date, however the commits are not ordered by date, an older commit can have a younger commit as a parent. You could say that the tag order is the order you find the tags if you go from a branch and backwards in the history, however how do you then choose which path to take when you find a merge?

My suggestion if you want to do this, is to have your buildtool to checkout a special branch (let's call it tag_branch) do a git reset to get the worktree from the newly tagged commit and commit on that branch once for each tag it's creating, when it creates the tag.

It would be quite easy to make a script that create such branch for you, if you only can sort the tags somehow.

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com
Previous: Kristian FreedNext: Michael Haggerty
Message 2 of 9 in “How can I automatically create a GIT branch that represents a sequence of tags?”
  1. Kristian FreedAug 10, 2013
  2. Fredrik GustafssonAug 10, 2013
  3. Michael HaggertyAug 11, 2013
  4. Fredrik GustafssonAug 11, 2013
  5. Philip OakleyAug 11, 2013
  6. Kristian FreedAug 11, 2013
  7. Fredrik GustafssonAug 11, 2013
  8. Andreas SchwabAug 11, 2013
  9. Felipe ContrerasAug 11, 2013

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.