Re: [PATCH RFC 1/2] builtin/history: abort reword on unchanged message
- From
Pablo Sabater <pabloosabaterr@gmail.com>
- Date
- Jun 9, 2026, 09:59 UTC
- Message-ID
- <CAN5EUNRcMO-ZB9_4kdSb-ddhDdU1t6C_moAdg3NM7D26xKV7+Q@mail.gmail.com>
- In-Reply-To
- <9A2F74F1-66D0-4015-B387-35B107ED6F7A@gmail.com>
El lun, 8 jun 2026 a las 18:37, Ben Knoble (<ben.knoble@gmail.com>) escribió: [snip]
Show 20 quoted lines
> > +test_expect_success 'aborts if the commit message is the same' ' > > + test_when_finished "rm -rf repo" && > > + git init repo && > > + ( > > + cd repo && > > + test_commit first && > > + test_commit second && > > + > > + git rev-parse HEAD >oid-before && > > + write_script fake-editor.sh <<-\EOF && > > + true > > + EOF > > + test_set_editor "$(pwd)"/fake-editor.sh && > > + git history reword HEAD 2>err && > > + git rev-parse HEAD >oid-after && > > + test_cmp oid-before oid-after && > > + test_grep "Message unchanged" err > > + ) > > …but I think this test case could do something like "GIT_EDITOR=true git history reword HEAD" and avoid the script?
It does work, thanks.
Show 10 quoted lines
> > > +' > > + > > test_done > > > > -- > > 2.54.0 > > Best, > Ben
-- Pablo