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

Re: git-fetch remote tag to local branch fails

From
KLKlas Lindberg <klas.lindberg@gmail.com>
Date
Jun 25, 2008, 08:50 UTC
Message-ID
<33f4f4d70806250150q41f09764m4ae0cc1cd6e15e30@mail.gmail.com>
In-Reply-To
<8aa486160806240911p49d7bcb8q82a8d68c51206543@mail.gmail.com>
>> I am looking into the possibility of writing a tool that handles
>> configurations of trees.
>
> Maybe you should be using the plumbing commands.
Yes. It looks like it.
Show 5 quoted lines
>> For instance, I want the tool to be able to
>> consume some version of a configuration and create, update or reset
>> branches in other trees accordingly.
>
> What are the "other trees"?

One tree tracks a configuration file that just contains specs for other trees. The idea is something like this: Given a refspec on the configuration tree, git-view the configuration file and use the contained refspecs to clone/pull/fetch/reset/whatever a bunch of other trees.

Note that I'm not trying to solve the problem addressed by the submodules system in git; I need configuration management.

> Maybe you want to keep your local branches up to date with respect
> their tracking branch?

Well yes, but that is only half of it. One of the scenarios I'm pondering is this: A user wants to take an old configuration based on tags and try some use case that breaks a newer configuration. After the checkout, the working trees will not be "on" any branches (what's the word for that?). Unfortunately, most people seem to think that everything in a VCS happens on a branch. A lot of people will incorrectly assume that they are still on their "working branch" because they didn't check out a different branch! They checked out a tag and, like myself, have muddy ideas about what that actually means in relation to branches. I'd prefer to not have to tell them to try git-lost-found on a 40 different trees to recover commits that they made on non-branches.

I'll have to think more about this. It's not a functionality shortcoming, but a UI one.

> I don't see the point updating a branch with a tag, but you can make a
> tool to update a branch with a tag, see for example
> contrib/examples/git-fetch.sh.

Thank you. I'll have a look at that, but after our conversation I think I was mentally stuck in the land of some other VCS. I know perfectly well that a tag is not just a marker along some branch, but I realize now that I was thinking of it as if it was.

/Klas
Previous: Santi BéjarNext: Jakub Narebski
Message 8 of 10 in “git-fetch remote tag to local branch fails”
  1. Klas LindbergJun 24, 2008
  2. Santi BéjarJun 24, 2008
  3. Klas LindbergJun 24, 2008
  4. Santi BéjarJun 24, 2008
  5. Klas LindbergJun 24, 2008
  6. Klas LindbergJun 24, 2008
  7. Santi BéjarJun 24, 2008
  8. Klas LindbergJun 25, 2008
  9. Jakub NarebskiJun 25, 2008
  10. Michael J GruberJun 24, 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.