* skipping commits via commit-msg contents
@ 2010-07-12 18:21 Jim Cromie
2010-07-12 18:35 ` Ramkumar Ramachandra
2010-07-12 19:02 ` Jonathan Nieder
0 siblings, 2 replies; 4+ messages in thread
From: Jim Cromie @ 2010-07-12 18:21 UTC (permalink / raw)
To: git
sometimes its desirable to commit incomplete work separately,
for example a struct change thats intended to get compiler to report
where changes are needed.
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.
This would also allow rebasing a patchset to markup crappy commits
which need further work.
worth having ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: skipping commits via commit-msg contents
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
1 sibling, 0 replies; 4+ messages in thread
From: Ramkumar Ramachandra @ 2010-07-12 18:35 UTC (permalink / raw)
To: Jim Cromie; +Cc: git
Hi Jim,
Jim Cromie writes:
> sometimes its desirable to commit incomplete work separately,
> for example a struct change thats intended to get compiler to report
> where changes are needed.
>
> 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.
>
> This would also allow rebasing a patchset to markup crappy commits
> which need further work.
This is perhaps not exactly what you want, but I thought I'd mention
it anyway: I usually prefix commit messages of temporary commits with
a "fixup! " or "squash! " and then use the `--autosquash` feature of
`git rebase --interactive` in a new branch before running `git
bisect`.
-- Ram
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: skipping commits via commit-msg contents
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
2010-07-12 19:56 ` Jim Cromie
1 sibling, 1 reply; 4+ messages in thread
From: Jonathan Nieder @ 2010-07-12 19:02 UTC (permalink / raw)
To: Jim Cromie; +Cc: git, Christian Couder, Ramkumar Ramachandra
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: skipping commits via commit-msg contents
2010-07-12 19:02 ` Jonathan Nieder
@ 2010-07-12 19:56 ` Jim Cromie
0 siblings, 0 replies; 4+ messages in thread
From: Jim Cromie @ 2010-07-12 19:56 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Christian Couder, Ramkumar Ramachandra
thanks guys,
Ram, not what I want, but good to know..
Jonathan, replace feels like a big hammer for a newbie..
I havent published these, since they need bisection amongst other reasons :-O
and the BUGS also require more -fu to understand than I possess
On Mon, Jul 12, 2010 at 1:02 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> 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.
This sounds nice.
Notionally, extending it further would be cool -
[jimc@groucho perl-git]$ git notes show 2de9db42d3e578becacbd237bf4f59b432cc82f0
good make test
with this note, Ive told myself that it passes (good), and what it
passes (make test)
I could imagine bisect knowing enough to take that as an implicit start,
unless overridden on a command line, or by a similar note on a later commit.
a note like:
skip-bisect until <tag|commit|branch>
could be cool too, though there may be deeper problems with skipping
entire subranges.
thanks again,
Jim
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-12 19:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-07-12 19:56 ` Jim Cromie
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).