mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-25 03:12:21 +08:00
refactor(Repository): using temp file to store commit message instead of file in .git folder
This commit is contained in:
@@ -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}\"";
|
||||
|
||||
Reference in New Issue
Block a user