Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15

Re: Patching bad commits

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:49:01

Heya,

On Tue, Jun 29, 2010 at 00:03, Michael Witten [off-list ref] wrote:
How about implementing something SIMILAR to "git notes" (perhaps
even using "git notes") to store and apply patches for such bad
commits?
Definitely use 'git notes' for this, I'd say this is a perfect use
case for it. Just store the patches in their own notes ref and you're
good to go.
For instance, bisecting could transparently apply any patches that
are necessary to make a bad commit actually buildable; such patches
could be distributed as usual for the benefit of others.
Something like that should probably be guarded by a
switch/configuration value, but that sounds very useful.
   * A plain patch file (or maybe a git tree of patches).
I guess in this form 'git bisect' could just call 'git am' on that
tree (regardless of whether it has 1 or more patches), which would
apply them in the usual order? It might be useful to instead stream
the contents of the note to 'git am', but I could imagine it being
useful to have the patches on disk (so that you can edit them, or look
at them when applying fails).
   * A reference to another commit that should be checked
     out instead.
I'm not sure how useful that is, if you're just going to check out
another commit you might as well 'git bisect skip' the current one?
Well, I guess if the other commit is outside the bisect range but is
applied on top of the commit under inspection it makes sense. So makes
sense, only problem I see is that if that commit is on another branch
it might not be available locally.
Is this a worthwhile idea?
I like this idea a lot, it's always bothered me that some commits can
just come up during git bisect as being untestable. The tricky part
will be to ensure that the patches you apply don't affect the bug ;).

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help