git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
	Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: skipping commits via commit-msg contents
Date: Mon, 12 Jul 2010 14:02:03 -0500	[thread overview]
Message-ID: <20100712190203.GA9365@dert.cs.uchicago.edu> (raw)
In-Reply-To: <AANLkTikYcODU96J-cVYCIad1yrd5zGklVj2OV4UT2PxC@mail.gmail.com>

Hi Jim,

Jim Cromie wrote:

> if git bisect were to recognize  --skip-bisect  in the subject line
> (or in commit-message somewhere, say top or bottom),
> then bisection could proceed silently past such commits.

In addition to Ram’s suggestion, you might want to look into
‘git replace’[1].  It can be useful when the broken commits
have already been published.  It works like this:

 git replace <bad commit> <bad commit>^

and then ‘git bisect’ and lower-level commands like git show and
checkout will silently substitute the parent of the broken commit
when ever you refer to it.

You can publish the resulting “replace refs” in the refs/replace/*
namespace and anyone who explicitly chooses to fetch them will be
able to see the same effect.

Two problems:

 - bisect skip is a bit more sophisticated (read: better) than just
   substituting a parent, especially when the commit to be skipped
   is a merge.  So it might still make sense to teach bisect to
   respect a refs/notes/skip-bisect note that requests for it
   to skip a specific ref.

   One can try this out by making an appropriate wrapper script
   for ‘git bisect next’ (using ‘git notes’).

 - replace refs are a little too powerful.  It would be nicer to
   by able to use ‘git replace --refs=refs/replace/bisect/’
   and ‘GIT_REPLACE_REFS=refs/replace/bisect/ git bisect’ to
   make them take effect only when needed.  In other words,
   it would be nicer if “git replace” were configurable in the
   same way as “git notes” is.

   One can get something like that effect by using git for-each-ref
   and git update-ref to rename replace refs into place only when
   needed.

[1] http://www.kernel.org/pub/software/scm/git/docs/git-bisect-lk2009.html#_git_replace

  parent reply	other threads:[~2010-07-12 19:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-12 18:21 skipping commits via commit-msg contents Jim Cromie
2010-07-12 18:35 ` Ramkumar Ramachandra
2010-07-12 19:02 ` Jonathan Nieder [this message]
2010-07-12 19:56   ` Jim Cromie

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=20100712190203.GA9365@dert.cs.uchicago.edu \
    --to=jrnieder@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=jim.cromie@gmail.com \
    /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).