From: Al Viro <viro@ftp.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "Brown, Len" <len.brown@intel.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
akpm@osdl.org, git@vger.kernel.org
Subject: Re: git pull on Linux/ACPI release tree
Date: Mon, 9 Jan 2006 00:48:44 +0000 [thread overview]
Message-ID: <20060109004844.GG27946@ftp.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0601081100220.3169@g5.osdl.org>
On Sun, Jan 08, 2006 at 11:10:20AM -0800, Linus Torvalds wrote:
> That has absolutely nothing to do with anything. It's not the comment
> (which admittedly gives absolutely no information - but why should it,
> since the _commit_ itself has no information in it?)
How do you deal with conflict resolution? That's a genuine question -
I'm not talking about deliberate misuse to hide an attack, just a normal
situation when you have to resolve something like
A:
if (foo)
bar
B:
if (foo & baz)
bar
A':
#ifdef X
if (foo)
bar
...
#endif
merge of A' and B: trivial conflict
and have git pull fail. The obvious way (edit file in question, update-index,
commit) will not only leave zero information about said conflict and actions
needed to deal with it, but will lead to situation when git whatchanged will
not show anything useful. I.e. if conflict turns out to be non-trivial and
ends up being resolved wrong, everyone will have very nasty time trying to
figure out where the breakage had come from when looking at history 6 months
down the road.
Is there any SOP I'm missing here?
Worse (for my use), format-patch on such tree will not give a useful patchset.
You get a series of patches that won't apply to _any_ tree. Even if all
conflicts had been resolved correctly, they still remain there for everyone
trying to apply the patch series, unless you manually rebase it before
format-patch.
And that's a fundamental problem behind all that rebase activity, AFAICS.
It definitely is in my case, and yes, it's fscking inconvenient in a lot
of respects. E.g. I'm using git for resync between build trees on several
boxen. There's a repository holding patchset, plus one clone per build
box. Fixes for build breakage, etc., get done in those clones; after they
are committed there, I pull into master and then pull from other clones
to spread them to other build trees. Works fine, but... Any rebase in
master => instant hell for all clones. I've ended up with the following
layout that kinda-sorta avoids mess:
master:origin: matches upstream
master:topic branch: _not_ rebased until there is a conflict, never get
a pull from anywhere
master:master: gets pulls from topic branches and origin _and_ _nothing_ _else_
master:work: where interaction with build boxen and any edits done in master
repository go. Edits, commits, pulls from master:master, pulls from
build boxen.
buildN:origin == master:work
buildN:work: where work on buildN goes.
When I want to get new stuff (== difference between master:master and
master:work) into the patchset, I cherry-pick from work to topic branches
and re-pull them into master:master until it matches master:work. Then
I pull master:master into master:work to create a point in work history
that marks beginning of new portion of pending stuff. New stuff upstream
is pulled to master:origin -> master:master -> master:work -> build trees.
That works, and gives me merge-free topic branches I can safely format-patch
while keeping master in sync with mainline _and_ also safe for format-patch.
The price is in rather convoluted SOP. And the following piece of fun:
when cherry-pick work->topic, pull topic->master or pull origin->master
gives a conflict, it's time to rebase. Which I do by renaming topic branches
(direct mv in .git/refs/heads), then starting new ones at current origin
and applying old ones to them (cherry + cherry-pick if possible, format-patch
+ applymbox if things get hairy). Then master is recreated as branch from
origin that gets pulls from topic branches, work is branched from it and
build trees get killed and cloned from scratch. It's tolerable since I'm
using ccache on build boxen, so it's _not_ that much of rebuild.
However, that clearly is a killer if any poor sucker (me included) ever
clones from master for any other purpose. And that, BTW, is the main
reason that stops me from moving master to kernel.org right now.
> And yes, you can always work around it, but there's just no point. And
> none of the other developers seem to need to do it. They do their
> development, and then they say "please pull". At that point the two
> histories are tied together, but now they are tied together for a
> _reason_. It was an intentional synchronization point.
>
> An "automated pull" by definition has no reason. If it works automated,
> then the merge has zero semantic meaning.
I'm afraid you are missing a part of picture. There is a bunch of git
uses that handle a heap of foam rather than a long-term branching. I.e.
the tree is tied to mainline closely and most of the stuff in it is
supposed to get flushed into mainline soon after it appears. I.e. the
situation when we have a mergepoint for fixes that _has_ to follow
mainline closely.
I wonder what life would be without merge nodes and with equality nodes
instead. I.e. to merge
O -> A1 -> ..... -> An (=A)
-> B1 -> ..... -> Bm (=B)
would be to create a new branch (C) at Bm, have entire A1...An replayed there,
have B1...Bm replayed in A and then create a node certifying that new head
of A and head of C refer to the same tree. Plus have a way to see which
commits are claimed to be replays of each other. At least that way rebase
would be simply saying that old history is superceded by new one, with
equality node proving that it's OK to do. We would have
O -> M1 -> .... ->Mn for mainline
O -> B1 -> .... -> B for branch post-pull
Mn -> P1 -> ... -> P for merge branch
and B == P as equality node. Old branch would have a bunch of changesets
of its own plus ones from mainline that got there by pulls (including the
last one). And new branch would contain the ports of not-yet-merged ones
to new mainline head, with the same tree as the result and all further
development going on there rather than in the old branch. Oh, well...
next prev parent reply other threads:[~2006-01-09 0:50 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-08 7:47 git pull on Linux/ACPI release tree Brown, Len
2006-01-08 8:16 ` David S. Miller
2006-01-08 8:44 ` Junio C Hamano
2006-01-08 8:16 ` Catalin Marinas
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B3005A13489-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-08 19:10 ` Linus Torvalds
2006-01-09 0:48 ` Al Viro [this message]
[not found] ` <20060109004844.GG27946-rfM+Q5joDG/XmaaqVzeoHQ@public.gmane.org>
2006-01-09 3:50 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2006-01-08 18:28 Brown, Len
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B3005A13505-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-08 19:19 ` Martin Langhoff
[not found] ` <46a038f90601081119r39014fbi995cc8b6e95774da-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-01-08 19:33 ` Junio C Hamano
2006-01-08 19:57 ` Linus Torvalds
2006-01-08 20:50 ` Tony Luck
2006-01-08 19:56 ` Linus Torvalds
2006-01-08 20:35 ` David S. Miller
2006-01-08 21:20 ` Luben Tuikov
2006-01-09 1:13 ` Linus Torvalds
2006-01-08 19:41 ` Linus Torvalds
[not found] ` <Pine.LNX.4.64.0601081111190.3169-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-08 23:06 ` Adrian Bunk
[not found] ` <20060108230611.GP3774-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
2006-01-08 23:53 ` Willy Tarreau
2006-01-09 3:26 ` Linus Torvalds
[not found] ` <Pine.LNX.4.64.0601081909250.3169-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-09 4:34 ` Martin Langhoff
2006-01-10 20:19 ` Adrian Bunk
[not found] ` <20060110201909.GB3911-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
2006-01-10 20:31 ` Linus Torvalds
2006-01-10 20:33 ` Martin Langhoff
2006-01-11 0:26 ` Andreas Ericsson
2006-01-12 1:37 ` Greg KH
[not found] ` <20060112013706.GA3339-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2006-01-12 16:10 ` Catalin Marinas
2006-01-13 14:50 ` Adrian Bunk
2006-01-09 5:53 Brown, Len
2006-01-09 6:08 ` Martin Langhoff
2006-01-09 6:13 ` Linus Torvalds
2006-01-09 6:46 ` Junio C Hamano
2006-01-09 5:55 linux
2006-01-09 6:13 Brown, Len
2006-01-09 6:27 Brown, Len
2006-01-09 7:34 Brown, Len
[not found] ` <F7DC2337C7631D4386A2DF6E8FB22B3005A136FE-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-09 10:11 ` Martin Langhoff
2006-01-09 12:31 ` Johannes Schindelin
2006-01-09 8:05 Brown, Len
2006-01-09 16:47 ` Linus Torvalds
2006-01-09 16:57 ` Linus Torvalds
2006-01-09 22:51 ` Luben Tuikov
2006-01-09 23:07 ` Linus Torvalds
2006-01-09 23:34 ` Martin Langhoff
2006-01-10 2:50 ` Linus Torvalds
2006-01-10 3:04 ` Junio C Hamano
[not found] ` <Pine.LNX.4.64.0601091845160.5588-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-10 6:33 ` Kyle Moffett
[not found] ` <99D82C29-4F19-4DD3-A961-698C3FC0631D-ee4meeAH724@public.gmane.org>
2006-01-10 6:38 ` Martin Langhoff
2006-01-10 18:05 ` Kyle Moffett
2006-01-10 18:27 ` Linus Torvalds
[not found] ` <Pine.LNX.4.64.0601101015260.4939-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-10 18:45 ` Johannes Schindelin
2006-01-10 19:01 ` Linus Torvalds
2006-01-10 19:28 ` Linus Torvalds
2006-01-10 19:38 ` Johannes Schindelin
2006-01-10 20:11 ` Linus Torvalds
2006-01-10 20:28 ` Linus Torvalds
2006-01-10 20:47 ` Johannes Schindelin
2006-01-13 23:35 ` Matthias Urlichs
[not found] ` <252A408D-0B42-49F3-92BC-B80F94F19F40-ee4meeAH724@public.gmane.org>
2006-01-11 3:32 ` Luben Tuikov
2006-01-09 20:06 ` Junio C Hamano
[not found] ` <7vu0cdjhd1.fsf-u5dp/1a/izZijMVVUgEtmwqrb7wDvxM8@public.gmane.org>
2006-01-10 15:31 ` Alex Riesen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060109004844.GG27946@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=akpm@osdl.org \
--cc=git@vger.kernel.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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.
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 NNTP newsgroup(s).