Re: [PATCH v4 2/4] rebase: support --autosquash without -i

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy

On 11/11/2023 13:27, Andy Koppe wrote:
The --autosquash option prevents preemptive fast-forwarding and triggers
conflicts with amend backend options,

"amend" should be "apply". While this sentence is true I'm not quite sure how it relates to the change in this commit.

yet it only actually performs
auto-squashing when combined with the --interactive (or -i) option.

Remove the latter restriction and tweak the --autosquash description
accordingly.

This seems like a reasonable change to me, thanks for working on it.

Best Wishes

Phillip

Signed-off-by: Andy Koppe <andy.koppe@xxxxxxxxx>
---
  Documentation/git-rebase.txt | 2 +-
  builtin/rebase.c             | 4 +---
  2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index b4526ca246..10548e715c 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -592,7 +592,7 @@ See also INCOMPATIBLE OPTIONS below.
  	When the commit log message begins with "squash! ..." or "fixup! ..."
  	or "amend! ...", and there is already a commit in the todo list that
  	matches the same `...`, automatically modify the todo list of
-	`rebase -i`, so that the commit marked for squashing comes right after
+	`rebase`, so that the commit marked for squashing comes right after
  	the commit to be modified, and change the action of the moved commit
  	from `pick` to `squash` or `fixup` or `fixup -C` respectively. A commit
  	matches the `...` if the commit subject matches, or if the `...` refers
diff --git a/builtin/rebase.c b/builtin/rebase.c
index a73de7892b..9f8192e0a5 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -710,10 +710,8 @@ static int run_specific_rebase(struct rebase_options *opts)
  	if (opts->type == REBASE_MERGE) {
  		/* Run sequencer-based rebase */
  		setenv("GIT_CHERRY_PICK_HELP", resolvemsg, 1);
-		if (!(opts->flags & REBASE_INTERACTIVE_EXPLICIT)) {
+		if (!(opts->flags & REBASE_INTERACTIVE_EXPLICIT))
  			setenv("GIT_SEQUENCE_EDITOR", ":", 1);
-			opts->autosquash = 0;
-		}
  		if (opts->gpg_sign_opt) {
  			/* remove the leading "-S" */
  			char *tmp = xstrdup(opts->gpg_sign_opt + 2);





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux