{"thread":{"id":"24377","subject":"skipping commits via commit-msg contents","startedAt":"2010-07-12T18:21:20Z","lastAt":"2010-07-12T19:56:20Z","messageCount":4,"participants":["Jim Cromie","Ramkumar Ramachandra","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"145384","messageId":"AANLkTikYcODU96J-cVYCIad1yrd5zGklVj2OV4UT2PxC@mail.gmail.com","threadId":"24377","inReplyTo":null,"subject":"skipping commits via commit-msg contents","fromName":"Jim Cromie","fromEmail":"jim.cromie@gmail.com","sentAt":"2010-07-12T18:21:20Z","receivedAt":"2010-07-12T18:21:20Z","isPatch":false,"sender":{"key":"jim.cromie@gmail.com","avatar":null},"body":"sometimes its desirable to commit incomplete work separately,\nfor example a struct change thats intended to get compiler to report\nwhere changes are needed.\n\nif git bisect were to recognize  --skip-bisect  in the subject line\n(or in commit-message somewhere, say top or bottom),\nthen bisection could proceed silently past such commits.\n\nThis would also allow rebasing a patchset to markup crappy commits\nwhich need further work.\n\nworth having ?\n"},{"id":"145389","messageId":"20100712183518.GE17630@debian","threadId":"24377","inReplyTo":"AANLkTikYcODU96J-cVYCIad1yrd5zGklVj2OV4UT2PxC@mail.gmail.com","subject":"Re: skipping commits via commit-msg contents","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-07-12T18:35:18Z","receivedAt":"2010-07-12T18:35:18Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Jim,\n\nJim Cromie writes:\n> sometimes its desirable to commit incomplete work separately,\n> for example a struct change thats intended to get compiler to report\n> where changes are needed.\n> \n> if git bisect were to recognize  --skip-bisect  in the subject line\n> (or in commit-message somewhere, say top or bottom),\n> then bisection could proceed silently past such commits.\n> \n> This would also allow rebasing a patchset to markup crappy commits\n> which need further work.\n\nThis is perhaps not exactly what you want, but I thought I'd mention\nit anyway: I usually prefix commit messages of temporary commits with\na \"fixup! \" or \"squash! \" and then use the `--autosquash` feature of\n`git rebase --interactive` in a new branch before running `git\nbisect`.\n\n-- Ram\n"},{"id":"145393","messageId":"20100712190203.GA9365@dert.cs.uchicago.edu","threadId":"24377","inReplyTo":"AANLkTikYcODU96J-cVYCIad1yrd5zGklVj2OV4UT2PxC@mail.gmail.com","subject":"Re: skipping commits via commit-msg contents","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-07-12T19:02:03Z","receivedAt":"2010-07-12T19:02:03Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Jim,\n\nJim Cromie wrote:\n\n> if git bisect were to recognize  --skip-bisect  in the subject line\n> (or in commit-message somewhere, say top or bottom),\n> then bisection could proceed silently past such commits.\n\nIn addition to Ram’s suggestion, you might want to look into\n‘git replace’[1].  It can be useful when the broken commits\nhave already been published.  It works like this:\n\n git replace <bad commit> <bad commit>^\n\nand then ‘git bisect’ and lower-level commands like git show and\ncheckout will silently substitute the parent of the broken commit\nwhen ever you refer to it.\n\nYou can publish the resulting “replace refs” in the refs/replace/*\nnamespace and anyone who explicitly chooses to fetch them will be\nable to see the same effect.\n\nTwo problems:\n\n - bisect skip is a bit more sophisticated (read: better) than just\n   substituting a parent, especially when the commit to be skipped\n   is a merge.  So it might still make sense to teach bisect to\n   respect a refs/notes/skip-bisect note that requests for it\n   to skip a specific ref.\n\n   One can try this out by making an appropriate wrapper script\n   for ‘git bisect next’ (using ‘git notes’).\n\n - replace refs are a little too powerful.  It would be nicer to\n   by able to use ‘git replace --refs=refs/replace/bisect/’\n   and ‘GIT_REPLACE_REFS=refs/replace/bisect/ git bisect’ to\n   make them take effect only when needed.  In other words,\n   it would be nicer if “git replace” were configurable in the\n   same way as “git notes” is.\n\n   One can get something like that effect by using git for-each-ref\n   and git update-ref to rename replace refs into place only when\n   needed.\n\n[1] http://www.kernel.org/pub/software/scm/git/docs/git-bisect-lk2009.html#_git_replace\n"},{"id":"145394","messageId":"AANLkTikVNpFPBMO_SDIfn-5np42ALI-qGAHTOvlmONxo@mail.gmail.com","threadId":"24377","inReplyTo":"20100712190203.GA9365@dert.cs.uchicago.edu","subject":"Re: skipping commits via commit-msg contents","fromName":"Jim Cromie","fromEmail":"jim.cromie@gmail.com","sentAt":"2010-07-12T19:56:20Z","receivedAt":"2010-07-12T19:56:20Z","isPatch":false,"sender":{"key":"jim.cromie@gmail.com","avatar":null},"body":"thanks guys,\n\nRam, not what I want, but good to know..\n\nJonathan, replace feels like a big hammer for a newbie..\nI havent published these, since they need bisection amongst other reasons :-O\nand the BUGS also require more -fu to understand than I possess\n\n\nOn Mon, Jul 12, 2010 at 1:02 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Hi Jim,\n>\n> Jim Cromie wrote:\n>\n>> if git bisect were to recognize  --skip-bisect  in the subject line\n>> (or in commit-message somewhere, say top or bottom),\n>> then bisection could proceed silently past such commits.\n>\n> In addition to Ram’s suggestion, you might want to look into\n> ‘git replace’[1].  It can be useful when the broken commits\n> have already been published.  It works like this:\n>\n>  git replace <bad commit> <bad commit>^\n>\n> and then ‘git bisect’ and lower-level commands like git show and\n> checkout will silently substitute the parent of the broken commit\n> when ever you refer to it.\n>\n> You can publish the resulting “replace refs” in the refs/replace/*\n> namespace and anyone who explicitly chooses to fetch them will be\n> able to see the same effect.\n>\n> Two problems:\n>\n>  - bisect skip is a bit more sophisticated (read: better) than just\n>   substituting a parent, especially when the commit to be skipped\n>   is a merge.  So it might still make sense to teach bisect to\n>   respect a refs/notes/skip-bisect note that requests for it\n>   to skip a specific ref.\n\nThis sounds nice.\nNotionally, extending it further would be cool -\n\n[jimc@groucho perl-git]$ git notes show 2de9db42d3e578becacbd237bf4f59b432cc82f0\ngood make test\n\nwith this note, Ive told myself that it passes (good), and what it\npasses (make test)\n\nI could imagine bisect knowing enough to take that as an implicit start,\nunless overridden on a command line, or by a similar note on a later commit.\n\na note like:\nskip-bisect until <tag|commit|branch>\ncould be cool too, though there may be deeper problems with skipping\nentire subranges.\n\nthanks again,\nJim\n"}]}