git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Feature request: 'git bisect run' option to redundantly check start and end commits
@ 2020-12-18 12:22 Ed Avis
  2020-12-18 15:35 ` Felipe Contreras
  0 siblings, 1 reply; 7+ messages in thread
From: Ed Avis @ 2020-12-18 12:22 UTC (permalink / raw)
  To: git@vger.kernel.org

When kicking off a 'git bisect run', I have manually chosen good and bad commits, but I would like to double check that the command given to run really does succeed for the good commit and fail for the bad one.  Of course I can switch to those commits and run it manually, but mistakes can happen.  It's frustrating to set up a bisection and then find at the end that the first bad commit is the one immediately after 'good', because the command string just failed every time.  An optional startup check of the two endpoints would only be a small slowdown in most cases, but could save a lot of time.

% git bisect start
% git bisect good abcde
% git bisect bad bcdef
% git bisect run --check-endpoints my gnarly command
Checking initial 'bad' commit bcdef
running my gnarly command
command fails, as expected
Checking initial 'good' commit abcde
running my gnarly command
Error: the command fails for the initial 'good' commit

I think that it should check the 'bad' commit first, on the assumption that a failing command usually finishes quicker than a successful one.

(In my case, what went wrong is that I had put quotation marks around 'my gnarly command' when passing it on the command line.  I was thinking of git rebase --exec, which requires a single quoted argument for the command to run, whereas git bisect run takes it as separate words.  I think that an option to recheck the two endpoints before starting the bisection would be a useful idiot-proofing and make git bisect a nicer tool.  If nothing else, it's good to be reassured that the command you gave works, since when debugging an unexplained problem, you can start to doubt these things...)

--
Ed Avis <ed.avis@qmaw.com>
Please ignore any confidentiality stuff below this point.

This email and any files transmitted with it are CONFIDENTIAL and are intended solely for the use of the individual(s) or entity to whom they are addressed. Any unauthorized copying, disclosure or distribution of the material within this email is strictly forbidden. Any views or opinions presented within this email are solely those of the author and do not necessarily represent those of QMA Wadhwani LLP (QMAW) unless otherwise specifically stated. An electronic message is not binding on its sender. Any message referring to a binding agreement must be confirmed in writing and duly signed. If you have received this email in error, please notify the sender immediately and delete the original. Telephone, electronic and other communications and conversations with QMAW and/or its associated persons may be recorded and retained. QMAW is authorized and regulated by the Financial Conduct Authority. QMAW (registered in England No. OC303168) has its registered office at 9th Floor Orion House, 5 Upper St Martin's Lane, London, WC2H 9EA.

Please note that your personal information may be stored and processed in any country where we have facilities or in which we engage service providers. If you provide personal information to us by email or otherwise, you consent to the transfer of that information to countries outside of your country of residence and these countries may have different data protection rules than your country.’

To learn about our privacy policies, please use this link<https://www.pgim.com/disclaimer/privacy-center> to read the PGIM Privacy Notice.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-19 17:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 12:22 Feature request: 'git bisect run' option to redundantly check start and end commits Ed Avis
2020-12-18 15:35 ` Felipe Contreras
2020-12-18 16:16   ` Christian Couder
2020-12-18 17:15     ` Felipe Contreras
2020-12-19  7:46       ` Christian Couder
2020-12-19 11:39         ` Felipe Contreras
2020-12-19 17:31         ` Junio C Hamano

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).