From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Left-over COMMIT_EDITMSG file in gitdir
Date: Thu, 08 Feb 2018 14:18:34 -0800 [thread overview]
Message-ID: <xmqqpo5fp1l1.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CA+55aFzaxTrki92C8ih3M3BtYHU3BG8P2SWwvdWiTXZWFDH=1Q@mail.gmail.com> (Linus Torvalds's message of "Thu, 8 Feb 2018 14:09:25 -0800")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> In that rewrite, removing some temporary files seems to have been left
> out. At least one: .git/COMMIT_EDITMSG.
>
> In the original commit.sh shell script, we can find this:
>
> rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG"
>
> after creating the commit. In the C implementation, we do have a
> number of "unlink(...)" calls:
> ...
>
> but no
>
> unlink(git_path_commit_editmsg());
>
> and that *seems* to be an oversight.
>
> Similarly, builtin/tag,c leaves a stale TAG_EDITMSG file behind.
> Again, that actually did exist in the original shell script, which
> used to do
>
> trap 'rm -f "$GIT_DIR"/TAG_TMP* "$GIT_DIR"/TAG_FINALMSG
> "$GIT_DIR"/TAG_EDITMSG' 0
>
> which caused that file to be removed at exit.
I do not think it was intentional---just a bug in the rewrite.
prev parent reply other threads:[~2018-02-08 22:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 22:09 Left-over COMMIT_EDITMSG file in gitdir Linus Torvalds
2018-02-08 22:18 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqpo5fp1l1.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.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.
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 NNTP newsgroup(s).