Quoting Junio C Hamano <gitster@xxxxxxxxx>:
Actually, we do not even _need_ a sharedness for this ephemeral
file. The additional "adjust-shared-perm" is merely a workaround
for the fact the next person cannot write into it when it is left
behind, and because we do not want to remove it when we are done.
Do we really want to keep such a file after we are done?
From all the cases where $GIT_EDITOR is run as part of an operation
to edit a temporary file, that temporary file is deleted on success
most of the time, except the already mentioned COMMIT_EDITMSG,
REPLACE_EDITOBJ for 'git replace --edit', and BRANCH_DESCRIPTION for
'git branch --edit-description'. I don't see why these files should
be handled differently than the others and why should they be kept
after the operation finished, since at that point the contents is
already stored in its proper place (in the commit object, in the
replacement object, or in the config file), making these files
redundant and unnecessary.
If the operation fails for whatever reason, then that's a different
matter, of course. In that case we definitely want to keep these
files to avoid losing whatever the user has written.
Gábor
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html