From b1310a5fd0cac870bcc945d27fbcc1800512c6a9 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 21 Jul 2020 13:43:56 +0800 Subject: [PATCH] refactor(Repository): using temp file to store commit message instead of file in .git folder --- SourceGit/Git/Repository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceGit/Git/Repository.cs b/SourceGit/Git/Repository.cs index 223dbdf2..9df6827c 100644 --- a/SourceGit/Git/Repository.cs +++ b/SourceGit/Git/Repository.cs @@ -686,7 +686,7 @@ namespace SourceGit.Git { public bool DoCommit(string message, bool amend) { isWatcherDisabled = true; - var file = System.IO.Path.Combine(Path, ".git", "COMMITMESSAGE"); + var file = System.IO.Path.GetTempFileName(); File.WriteAllText(file, message); var args = $"commit --file=\"{file}\"";