Skip to content

Commit e6b96d9

Browse files
committed
fix: versions of git prior to v2.45.0 will reject a value of commentChar that consists of more than a single ASCII byte (#2500)
1 parent 190b4d9 commit e6b96d9

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Commands/InteractiveRebase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public InteractiveRebase(string repo, string basedOn, bool autoStash, bool noVer
1111
Editor = EditorType.RebaseEditor;
1212

1313
var builder = new StringBuilder(512);
14-
builder.Append("-c core.commentChar=± rebase -i --autosquash ");
14+
builder.Append("-c core.commentChar=\"^\" -c core.commentString=\"±\" rebase -i --autosquash ");
1515
if (autoStash)
1616
builder.Append("--autostash ");
1717
if (noVerify)

src/Commands/Rebase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public Rebase(string repo, string basedOn, bool autoStash, bool noVerify)
1010
Context = repo;
1111

1212
var builder = new StringBuilder(512);
13-
builder.Append("-c core.commentChar=± rebase ");
13+
builder.Append("-c core.commentChar=\"^\" -c core.commentString=\"±\" rebase ");
1414
if (autoStash)
1515
builder.Append("--autostash ");
1616
if (noVerify)

src/ViewModels/InProgressContexts.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public CherryPickInProgress(Repository repo)
6161
WorkingDirectory = repo.FullPath,
6262
Context = repo.FullPath,
6363
Editor = Commands.Command.EditorType.None,
64-
Args = "-c core.commentChar=± cherry-pick --continue",
64+
Args = "-c core.commentChar=\"^\" -c core.commentString=\"±\" cherry-pick --continue",
6565
};
6666

6767
_skipCmd = new Commands.Command
@@ -116,7 +116,7 @@ public RebaseInProgress(Repository repo)
116116
WorkingDirectory = repo.FullPath,
117117
Context = repo.FullPath,
118118
Editor = Commands.Command.EditorType.RebaseEditor,
119-
Args = "-c core.commentChar=± rebase --continue",
119+
Args = "-c core.commentChar=\"^\" -c core.commentString=\"±\" rebase --continue",
120120
};
121121

122122
_skipCmd = new Commands.Command
@@ -187,7 +187,7 @@ public RevertInProgress(Repository repo)
187187
WorkingDirectory = repo.FullPath,
188188
Context = repo.FullPath,
189189
Editor = Commands.Command.EditorType.None,
190-
Args = "-c core.commentChar=± revert --continue",
190+
Args = "-c core.commentChar=\"^\" -c core.commentString=\"±\" revert --continue",
191191
};
192192

193193
_skipCmd = new Commands.Command
@@ -235,7 +235,7 @@ public MergeInProgress(Repository repo)
235235
WorkingDirectory = repo.FullPath,
236236
Context = repo.FullPath,
237237
Editor = Commands.Command.EditorType.None,
238-
Args = "-c core.commentChar=± merge --continue",
238+
Args = "-c core.commentChar=\"^\" -c core.commentString=\"±\" merge --continue",
239239
};
240240

241241
_abortCmd = new Commands.Command

0 commit comments

Comments
 (0)