From: Junio C Hamano Date: Thu, 13 Aug 2026 17:28:44 GMT Subject: Re: [PATCH v13 7/8] history: create squashed commits without editing Message-ID: In-Reply-To: <8b3551d0d4ecb360775ea29507ee262c7bf9cd42.1786088371.git.gitgitgadget@gmail.com> "Harald Nordgren via GitGitGadget" writes: > +test_expect_success '--no-edit uses last "amend!" message without an editor' ' > + git reset --hard three && > + write_script editor <<-\EOF && > + exit 1 > + EOF > + test_set_editor "$(pwd)/editor" && > + echo fix >file && > + git commit --author="Fix Me " --fixup=HEAD -a && > + git commit --allow-empty -F - <<-EOF && > + amend! $(git rev-parse --short HEAD) > + > + The first reword > + > + More detail > + EOF > + > + git commit --allow-empty -F - <<-\EOF && > + amend! three > + > + The second reword > + > + Extra detail > + EOF > + > + test_commit WIP && > + > + cat >msg <<-EOF && > + amend! $(git rev-parse HEAD^ | tr a-f A-F) > + > + The third reword > + > + Excruciating detail > + EOF Care to explain why you need to (1) eat the exit status of the 'git rev-parse' command and (2) munge the commit object name by piping it into "tr"? When another in-flight topic is in effect, this test will break due to "amend!" followed by a string that is *not* an object name, as the other topic declares that uppercase letters are not valid in a hexadecimal string. Thanks.