From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>
Subject: Re: Opinions on bug fix organisation
Date: Wed, 16 May 2007 22:20:13 +0100 [thread overview]
Message-ID: <200705162220.15417.andyparkins@gmail.com> (raw)
In-Reply-To: <7v1whgfybe.fsf@assigned-by-dhcp.cox.net>
On Wednesday 2007, May 16, Junio C Hamano wrote:
> I think that largely depends on your taste and what other things
> you have between B and the tip when you contemplate on the fix.
As always, thank you for the detailed response. I appreciate the
thought that goes into answering these questions that flit into my
mind :-)
> is fixed as close to the introduction of bug as practical (so I
> would _not_ fork a fix on top of B itself, but apply fix to the
> tip of 'maint'), and then all newer development track that
> contain breakage B merges the fix from that branch (i.e. 'maint'
> is then merged into 'master' to propagate the fix forward).
The above method is almost a necessity when using git. If the bug fix
is committed to master, there is no way to apply that same commit to
the maint branch without also grabbing commits you don't want in maint.
> The way 'next' and 'master' works in git.git looks a bit
> different from it, but you will realize that the idea is the
> same if you look at individual topic branches. Each topic is
> forked from 'master', gain its own commits and merged to 'next'.
I've noticed flows like that when looking at git history. I always
think that it demonstrates the power of git's strong-on-branches stance
because you can almost feel the story of the development without having
to read any of the commits themselves. I wonder if other DVCSs
encourage creation of such a strong narrative?
> Its bugs may be discovered later while it still hasn't been
> merged to 'master'. I'd _never_ commit a fix to 'next'
> directly, but a fix goes to the tip of the topic branch that
> introduces the bug, and then merged to 'next'. When the topic
> is reasonably bug-free, it then is merged to 'master' -- at that
> point, the history of the topic has all the relevant fixes.
What is your preference when, for example, you have already merged a
topic to next but then a bug fix appears?
* -- * -- * -- M -- F * -- * -- * -- M -- m (next)
/ or / /
B -- * -- * B -- * -- * -- F (topic)
F is certainly most appropriate to be on the topic branch, but we create
a perhaps excessively verbose extra merge, m.
> just a random set of development), I think your latter approach
> to have only the fix as a separate (temporary) topic and merge
> that to the tip is inconsistent with your current practice to
> begin with, and I do not see much merit in it by itself. If you
> prefer the latter solution (and I obviously do, as that is the
I'm not sure I've understood what you mean here. Which "latter" are you
talking about - you've said that you find the latter inconsistent but
also that you prefer the latter solution. I'm lost :-)
> way git.git repository is maintained), you would also want to
> have topic branches, where all the enhancements, advances _and_
> fixes related to a single theme go to and then merged to the
> mainline. That's the history of a theme. Having branch and
> merge only for fixes but not for advancement may be "the history
> of a bug", but it probably would not buy you much by itself.
It's not so much a matter of it buying you something, it is more that
when you find that bug fix commit in history you can see, by following
the fix-branch back to its source, all the revisions that contained
that bug at a glance; if you just commit on the end, you have to do the
digging yourself, and hope that someone mentioned in the commit message
which commit introduced the bug that that commit fixes.
The fact that git makes it so easy to branch and merge from a previous
point is the thing that even makes this a possibility. Perhaps I'm
spoilt now :-)
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
next prev parent reply other threads:[~2007-05-16 21:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-16 10:38 Opinions on bug fix organisation Andy Parkins
2007-05-16 14:46 ` Brian Gernhardt
2007-05-16 17:55 ` Junio C Hamano
2007-05-16 21:20 ` Andy Parkins [this message]
2007-05-16 21:38 ` Shawn O. Pearce
2007-05-18 8:11 ` Johannes Sixt
2007-05-16 21:51 ` Martin Langhoff
2007-05-18 19:50 ` Jan Hudec
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=200705162220.15417.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--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.
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).