git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sam Vilain <sam@vilain.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: n-heads and patch dependency chains
Date: Tue, 04 Apr 2006 11:55:58 +1200	[thread overview]
Message-ID: <4431B60E.3030008@vilain.net> (raw)
In-Reply-To: <7vsloucuxk.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:

>I suspect people have hard time grasping _why_ you are jumping
>through hoops.  At least I do.  What problem are you trying to
>solve?  You perhaps described your mechanism well enough, but it
>is not quite clear to me what kind of operations are made easier
>with this exercise, against which possible downside of it, if
>any, would be judged.
>[...]
>So can you step back a bit and start from describing what
>problem you are trying to solve, before describing the
>mechanisms you think would help?
>  
>

As a research exercise the principle purpose was first to see if there
is a natural fit with git's data model, and secondly to investigate what
benefits were possible from it. In a sense it was "bottom-up" investigation.

>>  - the current tools make this style of development difficult.
>>    
>>
>Git was born from necessity, and we have been aiming to have
>tools to do what are commonly needed.  It is not surprising to
>see existing tools do not support modes of operations that are
>"unusual" (meaning, things we have not done with git so far).
>Also we do not tend to do things only because we can.
>  
>

And a good principle that is, too.

>For example, the point jdl raised during the discussion is far
>easier to understand.  When working on multiple topics, he often
>needs to test them as a whole, so he pulls them into a test
>branch (can be a throwaway branch).  When he needs to do fixups,
>it is most efficient to do compile/run test while still in the
>test branch, but after things test out, in order to keep
>logically different things separate, he needs to go back to
>relevant topic branches and make a commit.  This is painful --
>are there ways to make this easier [*2*]?
>
>Would patch commutation calculus help with his problem?
>  
>

I'd provisionally say "yes, that's the fit". It's just like having
multiple topic branches all checked out at once, with commits going to
the appropriate branch as necessary.

In my experiment, when a commit touched files on more than one head,
then the heads would be collapsed to a single one, like a merge. As the
nature of the setup was such that you didn't explicitly name heads, this
was a natural thing to do. But if you're naming them, you probably would
want some way to choose between applying the commit to just one head,
both heads, or collapsing the two heads into one.

That approach actually offers the most flexibility - a porcelain could
do full darcs-like patch calculus if it wanted, or saner explicit topic
branching.

>One thing I can think of that could potentially come out of your
>approach would be an alternative implementation of what StGIT
>does.  Inside a local developer repository, being able to
>reorder patches and rewrite them flexibly is very useful.
>  
>

Oh, I didn't think of that. Were you thinking of an extra head for each
"uncommitted" chain of related patches? That's an interesting idea.

I think it might really help use cases like the -mm Linux tree, where
bunches of related commits are typically applied in a series, but you
especially want to track inter-set dependencies. Currently stgit takes a
very long time to import the split -mm series :-)

>Another obvious strategy would be to make commits on top of
>"test" and then cherry-pick them back on top of the relevant
>topics later.
>    
>        topicA                  You have three topics
>         o---o                  you need to test together...
>        /
>  [...]
>        \         /
>         o---o---2'
>        topicC
>  
>

That's a nice illustration of it, yes.

Sam.

  reply	other threads:[~2006-04-03 23:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-03  7:48 n-heads and patch dependency chains Sam Vilain
2006-04-03 14:29 ` Linus Torvalds
2006-04-03 15:38   ` Sam Vilain
2006-04-03 19:37 ` Junio C Hamano
2006-04-03 23:55   ` Sam Vilain [this message]
2006-04-04  9:28     ` Andreas Ericsson
2006-04-04  9:51       ` Junio C Hamano
2006-04-04 10:44         ` Andreas Ericsson
2006-04-04 11:03       ` Jakub Narebski
2006-04-04 11:47         ` Andreas Ericsson
2006-04-20 18:08           ` Jon Loeliger
2006-04-20 18:55             ` Junio C Hamano
2006-04-21  8:50               ` Andreas Ericsson
2006-04-04 19:00     ` Junio C Hamano
2006-04-04 20:18       ` Jakub Narebski
2006-04-05  6:34       ` Sam Vilain
2006-04-05  7:11         ` Jakub Narebski
2006-04-05  7:31           ` Sam Vilain
2006-04-05  7:59             ` Jakub Narebski
2006-04-04  0:51 ` Jakub Narebski
2006-04-04 11:05 ` Catalin Marinas
  -- strict thread matches above, loose matches on Subject: below --
2006-04-03 22:13 linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4431B60E.3030008@vilain.net \
    --to=sam@vilain.net \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).