git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Andy Koppe <andy.koppe@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com, newren@gmail.com
Subject: Re: [PATCH v3 2/2] docs: rewrite rebase --(no-)autosquash description
Date: Mon, 6 Nov 2023 11:07:16 +0000	[thread overview]
Message-ID: <a4679ee0-b36f-441f-9350-b4c9c02f6e2d@gmail.com> (raw)
In-Reply-To: <20231105000808.10171-2-andy.koppe@gmail.com>

Hi Andy

On 05/11/2023 00:08, Andy Koppe wrote:
> Rewrite the description of the rebase --(no-)autosquash options to try
> to make it a bit clearer. Don't use "the '...'" to refer to part of a
> commit message,

Thanks for doing that, it is a definite improvement, I'm a bit concerned 
about the loss of detail in other areas though - see below.

> mention how --interactive can be used to review the
> todo list, and add a bit more detail on commit --squash/amend.
> 
> Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
> ---
>   Documentation/git-rebase.txt | 32 ++++++++++++++++++--------------
>   1 file changed, 18 insertions(+), 14 deletions(-)
> 
> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
> index 102ff91493..594158fcbc 100644
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -589,21 +589,25 @@ See also INCOMPATIBLE OPTIONS below.
>   
>   --autosquash::
>   --no-autosquash::
> -	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`, 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
> -	to the commit's hash. As a fall-back, partial matches of the commit
> -	subject work, too. The recommended way to create fixup/amend/squash
> -	commits is by using the `--fixup`, `--fixup=amend:` or `--fixup=reword:`
> -	and `--squash` options respectively of linkgit:git-commit[1].
> +	Automatically squash commits with specially formatted messages into
> +	previous commits.  If a commit message starts with "squash! ",
> +	"fixup! " or "amend! ", the remainder of the subject line is taken
> +	as a commit specifier,

I like this change as I think saying "remainder of the subject line" is 
clearer than using `...`

> which matches a previous commit if it matches
> +	the start of the subject line or the hash of that commit.

This simplification glosses over some details, in particular it is no 
longer clear we prefer an exact subject match to a prefix match so that

	pick 123 foo
	pick 456 foo bar
	pick 789 fixup! foo

will be re-arranged to
	
	pick 123 foo
	fixup 789 fixup! foo
	pick 456 foo bar

and not

	pick 123 foo
	pick 456 foo bar
	fixup 789 fixup! foo

>   +
> -If the `--autosquash` option is enabled by default using the
> -configuration variable `rebase.autoSquash`, this option can be
> -used to override and disable this setting.
> +In the rebase todo list, commits marked for squashing are moved right after
> +the commits they modify, and their action is changed from `pick` to `squash`,
> +`fixup` or `fixup -C`, depending on the squash marker.

Here we have lost the documentation that told users which marker 
corresponds to which action which is unfortunate.

Best Wishes

Phillip

>  The `--interactive`
> +option can be used to review and edit the todo list before proceeding.
> ++
> +The recommended way to create commits with squash markers is by using the
> +`--squash`, `--fixup`, `--fixup=amend:` or `--fixup=reword:` options of
> +linkgit:git-commit[1], which take the target commit as an argument and
> +automatically fill in the subject line of the new commit from that.
> ++
> +The configuration variable `rebase.autoSquash` can be used to enable
> +`--autosquash` by default.  See the CONFIGURATION section below for details.
> +The `--no-autosquash` option overrides that setting.
>   +
>   See also INCOMPATIBLE OPTIONS below.
>   

  reply	other threads:[~2023-11-06 11:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 21:29 [PATCH 1/2] rebase: support non-interactive autosquash Andy Koppe
2023-11-03 21:29 ` [PATCH 2/2] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-04  1:19 ` [PATCH 1/2] rebase: support non-interactive autosquash Junio C Hamano
2023-11-04 22:05   ` Andy Koppe
2023-11-04 22:03 ` [PATCH v2 " Andy Koppe
2023-11-04 22:03   ` [PATCH v2 2/2] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-05  0:08   ` [PATCH v3 1/2] rebase: support non-interactive autosquash Andy Koppe
2023-11-05  0:08     ` [PATCH v3 2/2] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-06 11:07       ` Phillip Wood [this message]
2023-11-06 11:06     ` [PATCH v3 1/2] rebase: support non-interactive autosquash Phillip Wood
2023-11-11 14:08       ` Andy Koppe
2023-11-11 13:27     ` [PATCH v4 0/4] rebase: support --autosquash without -i Andy Koppe
2023-11-11 13:27       ` [PATCH v4 1/4] rebase: fully ignore rebase.autoSquash " Andy Koppe
2023-11-13 17:01         ` Phillip Wood
2023-11-11 13:27       ` [PATCH v4 2/4] rebase: support --autosquash " Andy Koppe
2023-11-13 17:01         ` Phillip Wood
2023-11-11 13:27       ` [PATCH v4 3/4] rebase: test autosquash with and " Andy Koppe
2023-11-13  1:20         ` Junio C Hamano
2023-11-13 17:02         ` Phillip Wood
2023-11-11 13:27       ` [PATCH v4 4/4] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-11 13:33         ` Andy Koppe
2023-11-11 13:27       ` [PATCH v4 4/4] rebase: rewrite --(no-)autosquash documentation Andy Koppe
2023-11-13  1:21         ` Junio C Hamano
2023-11-13 17:02         ` Phillip Wood
2023-11-14 21:43       ` [PATCH v5 0/3] rebase: support --autosquash without -i Andy Koppe
2023-11-14 21:43         ` [PATCH v5 1/3] rebase: fully ignore rebase.autoSquash " Andy Koppe
2023-11-14 21:43         ` [PATCH v5 2/3] rebase: support --autosquash " Andy Koppe
2023-11-14 21:43         ` [PATCH v5 3/3] rebase: rewrite --(no-)autosquash documentation Andy Koppe
2023-11-15 15:09         ` [PATCH v5 0/3] rebase: support --autosquash without -i Phillip Wood
2023-11-16  0:27           ` Junio C Hamano
2023-11-06  0:50   ` [PATCH v2 1/2] rebase: support non-interactive autosquash Junio C Hamano
2023-11-11 14:26     ` Andy Koppe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4679ee0-b36f-441f-9350-b4c9c02f6e2d@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=andy.koppe@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).