Skip to content

Commit 47e6819

Browse files
committed
cmd/git(fix[Git.rebase]): Fix whitespace options
why: The whitespace parameter emitted --whitespace without the required value, and no_whitespace was invalid (git has no such flag). The correct options are --whitespace=<option> and --ignore-whitespace. what: - Fix whitespace to emit --whitespace=<value> with the option value - Replace no_whitespace with ignore_whitespace parameter - Emit --ignore-whitespace for the new boolean parameter
1 parent ff51b4f commit 47e6819

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/libvcs/cmd/git.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ def rebase(
602602
fork_point: bool | None = None,
603603
no_fork_point: bool | None = None,
604604
whitespace: str | None = None,
605-
no_whitespace: bool | None = None,
605+
ignore_whitespace: bool | None = None,
606606
commit_date_is_author_date: bool | None = None,
607607
ignore_date: bool | None = None,
608608
root: bool | None = None,
@@ -712,10 +712,10 @@ def rebase(
712712
if no_stat:
713713
local_flags.append("--no-stat")
714714

715-
if whitespace:
716-
local_flags.append("--whitespace")
717-
if no_whitespace:
718-
local_flags.append("--no-whitespace")
715+
if whitespace is not None:
716+
local_flags.append(f"--whitespace={whitespace}")
717+
if ignore_whitespace:
718+
local_flags.append("--ignore-whitespace")
719719

720720
if rerere_autoupdate:
721721
local_flags.append("--rerere-autoupdate")

0 commit comments

Comments
 (0)