git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Olliver Schinagl <oliver@schinagl.nl>
To: git@vger.kernel.org
Subject: Allow git bisect to auto-skip
Date: Fri, 22 Mar 2024 23:18:47 +0100	[thread overview]
Message-ID: <3d835c4b-d026-4c6a-b68e-6989a7a2065f@schinagl.nl> (raw)

In some cases, we know a commit will always break bisect. This is bad 
and evil but sometimes needed.

An example, in my particular case, when OpenWRT does a kernel bump, 
patches and config files get copied to the new version. This is fine, 
but there is not git copy (one could also see that as an individual 
feature request which would solve the actual issue for now :p). Since 
the files are copied, git treats them as new files, without history. 
This makes tracking history almost impossible (config-4.14 -> config 
5.15 -> config 6.6 etc). People have found out, there's some tricks to 
apply where we can make git not see the copy as such, and we'll have our 
history of both files [0]. In short, this hack is used to create two 
commits.

git checkout -b _tmp
git mv old new
git commit -m 'copy old to new' -m 'GIT_SKIP_BISECT'
git checkout HEAD~ old
git commit -m 'restore old'
git switch _tmp
git merge _tmp

and to remove the ugly merge commit

git rebase HEAD~1

which surely is a hack :p

But, it's a `git cp` if you will.

Now this does break git bisect, when the commit with the move comes in, 
things are broken until the next commit. It would be very nice if we can 
have a special marker keyword (GIT_SKIP_BISECT) in the commit message 
for example, to force git bisect to just skip this commit. It will fail, 
it is designed to fail.

There's probably also other very useful cases, but this is just one example.

And hey, if this leads to two patches, where a second one introduces 
`git cp` I'd be even more happy :)

Olliver

[0]: https://github.com/openwrt/openwrt/blob/main/scripts/kernel_bump.sh


             reply	other threads:[~2024-03-22 22:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 22:18 Olliver Schinagl [this message]
2024-03-22 22:31 ` Allow git bisect to auto-skip Junio C Hamano
2024-03-23  1:59   ` Olliver Schinagl
2024-03-23 13:51   ` Stefan Haller
2024-03-23 18:43     ` Junio C Hamano
2024-03-23 20:51       ` Olliver Schinagl
2024-03-24  7:47         ` Olliver Schinagl
2024-03-24 10:16       ` Stefan Haller
2024-03-24 14:29         ` Christian Couder
2024-03-24 16:04           ` rsbecker
2024-03-24 18:34           ` Junio C Hamano
2024-03-27 18:33             ` Olliver Schinagl
2024-03-27 19:24               ` Junio C Hamano
2024-03-28  8:01                 ` Olliver Schinagl

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d835c4b-d026-4c6a-b68e-6989a7a2065f@schinagl.nl \
    --to=oliver@schinagl.nl \
    --cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).