Skip to content

Commit e92810e

Browse files
committed
enhance: do not ignore lines start with # in commit message while rebasing (#2491)
Signed-off-by: leo <longshuang@msn.cn>
1 parent 3c6e539 commit e92810e

4 files changed

Lines changed: 9 additions & 7 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("rebase -i --autosquash ");
14+
builder.Append("-c core.commentChar=± rebase -i --autosquash ");
1515
if (autoStash)
1616
builder.Append("--autostash ");
1717
if (noVerify)

‎src/Commands/Merge.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public Merge(string repo, string source, string mode, bool edit)
99
{
1010
WorkingDirectory = repo;
1111
Context = repo;
12-
Editor = EditorType.CoreEditor;
1312

1413
var builder = new StringBuilder();
1514
builder.Append("merge --progress ");

‎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("rebase ");
13+
builder.Append("-c core.commentChar=± rebase ");
1414
if (autoStash)
1515
builder.Append("--autostash ");
1616
if (noVerify)

‎src/ViewModels/InProgressContexts.cs‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public CherryPickInProgress(Repository repo)
6060
{
6161
WorkingDirectory = repo.FullPath,
6262
Context = repo.FullPath,
63-
Args = "cherry-pick --continue",
63+
Editor = Commands.Command.EditorType.None,
64+
Args = "-c core.commentChar=± cherry-pick --continue",
6465
};
6566

6667
_skipCmd = new Commands.Command
@@ -115,7 +116,7 @@ public RebaseInProgress(Repository repo)
115116
WorkingDirectory = repo.FullPath,
116117
Context = repo.FullPath,
117118
Editor = Commands.Command.EditorType.RebaseEditor,
118-
Args = "rebase --continue",
119+
Args = "-c core.commentChar=± rebase --continue",
119120
};
120121

121122
_skipCmd = new Commands.Command
@@ -185,7 +186,8 @@ public RevertInProgress(Repository repo)
185186
{
186187
WorkingDirectory = repo.FullPath,
187188
Context = repo.FullPath,
188-
Args = "revert --continue",
189+
Editor = Commands.Command.EditorType.None,
190+
Args = "-c core.commentChar=± revert --continue",
189191
};
190192

191193
_skipCmd = new Commands.Command
@@ -232,7 +234,8 @@ public MergeInProgress(Repository repo)
232234
{
233235
WorkingDirectory = repo.FullPath,
234236
Context = repo.FullPath,
235-
Args = "merge --continue",
237+
Editor = Commands.Command.EditorType.None,
238+
Args = "-c core.commentChar=± merge --continue",
236239
};
237240

238241
_abortCmd = new Commands.Command

0 commit comments

Comments
 (0)