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

Re: [TopGit PATCH] tg-create.sh: Introduce --add option to add a dependency.

From
JNJan Nieuwenhuizen <janneke-list@xs4all.nl>
Date
Aug 18, 2008, 09:18 UTC
Message-ID
<1219051103.8816.29.camel@heerbeest>
In-Reply-To
<Pine.GSO.4.62.0808150913180.9955@harper.uchicago.edu>
On vr, 2008-08-15 at 10:25 -0500, Jonathan Nieder wrote:
Hi,
> 1) How should the tree of B' be determined?
> 2) What should the parents of B' be?
> 3) How should the tree of P' be determined from P, B, and B'?
> 4) What should the parents of P' be?
> So all this trouble is there when we try to come up with the topic 
> base
> for a new topic, as long as it is possible /in some way/ to weaken
> dependencies.

Which I have just been avoiding... Thanks, that clarifies things for me.

Show 6 quoted lines
> or, if we make B a parent of B',
> 
> 	$ git checkout P
> 	$ git merge B'
> 
> which might be preferrable.
> I tried this out, and it seems here I was worrying needlessly.
Ok, good to know.
Show 6 quoted lines
> > Ouch, I'm feeling so git-unitiated here; what is read-tree doing 
> > differently from merge?  Isn't here a -m missing?
> 
> Why?  We want to just blindly take the tree from P' and using it.  The
> point is to make setting the contents of the new branch tip and its
> parentage separate decisions.
Hmm, for one, "git read-tree -u SHA" does not work for me.
Show 6 quoted lines
> > Removing or [re-]adding one dependency using this rebase-by-merging 
> > approch would take ~7 minutes on my machine.
> 
> Can you be more precise here?  What user action causes topgit to do
> so much work (adding one dependency to what topic)?  What other
> approach avoids all this work?

Good question, I was thinking a bit careless here. Creating the master topgit branch, which depends on ~300 single-topic topgit branches, like so

    tg create t/master $(git branch | grep -vE '/|patched|pristine')
takes ~7 minutes; which does not really surprise me.

I realise now that if we make a strict *adding* of dependencies a special case, we can just checkout our old B, and add (merge) the additional dependencies on top of that.

However, when *removing* a dependency, I see no easy way to do that cheaply.

Greetings, Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org
Previous: Jonathan Nieder
Message 5 of 5 in “tg-create.sh: Introduce --add option to add a dependency.”
  1. tg-create.sh: Introduce --add option to add a dependency.Jan Nieuwenhuizen, Aug 13, 2008
  2. Jonathan NiederAug 13, 2008
  3. Jan NieuwenhuizenAug 15, 2008
  4. Jonathan NiederAug 15, 2008
  5. Jan NieuwenhuizenAug 18, 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.