git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 4/4] rebase: rewrite --(no-)autosquash documentation

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Nov 13, 2023, 17:02 UTC
Message-ID
<dac6405e-9b8d-40f5-9dda-b248a3548a42@gmail.com>
In-Reply-To
<20231111132720.78877-6-andy.koppe@gmail.com>
Hi Andy
On 11/11/2023 13:27, 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, mention how --interactive can be used to review the
> todo list, and add a bit more detail on commit --squash/amend.
This version looks good to me, thanks for working on it
Best Wishes
Phillip
Show 51 quoted lines
> Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
> ---
>   Documentation/git-rebase.txt | 34 ++++++++++++++++++++--------------
>   1 file changed, 20 insertions(+), 14 deletions(-)
> 
> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
> index 10548e715c..1dd6555f66 100644
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -589,21 +589,27 @@ 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 being rebased.  If a commit message starts with
> +	"squash! ", "fixup! " or "amend! ", the remainder of the subject line
> +	is taken as a commit specifier, which matches a previous commit if it
> +	matches the subject line or the hash of that commit.  If no commit
> +	matches fully, matches of the specifier with the start of commit
> +	subjects are considered.
>   +
> -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, the actions of squash, fixup and amend commits are
> +changed from `pick` to `squash`, `fixup` or `fixup -C`, respectively, and they
> +are moved right after the commit they modify.  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.
> ++
> +Settting configuration variable `rebase.autoSquash` to true enables
> +auto-squashing by default for interactive rebase.  The `--no-autosquash`
> +option can be used to override that setting.
>   +
>   See also INCOMPATIBLE OPTIONS below.
>   
Previous: Junio C HamanoNext: Andy Koppe
Message 24 of 32 in “rebase: support non-interactive autosquash”
  1. 1/2 rebase: support non-interactive autosquashAndy Koppe, Nov 3, 2023
  2. 2/2 docs: rewrite rebase --(no-)autosquash descriptionAndy Koppe, Nov 3, 2023
  3. Junio C HamanoNov 4, 2023
  4. Andy KoppeNov 4, 2023
  5. 1/2 rebase: support non-interactive autosquashAndy Koppe, Nov 4, 2023
  6. 2/2 docs: rewrite rebase --(no-)autosquash descriptionAndy Koppe, Nov 4, 2023
  7. 1/2 rebase: support non-interactive autosquashAndy Koppe, Nov 5, 2023
  8. 2/2 docs: rewrite rebase --(no-)autosquash descriptionAndy Koppe, Nov 5, 2023
  9. Phillip WoodNov 6, 2023
  10. Phillip WoodNov 6, 2023
  11. Andy KoppeNov 11, 2023
  12. 0/4 rebase: support --autosquash without -iAndy Koppe, Nov 11, 2023
  13. 2/4 rebase: support --autosquash without -iAndy Koppe, Nov 11, 2023
  14. Phillip WoodNov 13, 2023
  15. 1/4 rebase: fully ignore rebase.autoSquash without -iAndy Koppe, Nov 11, 2023
  16. Phillip WoodNov 13, 2023
  17. 4/4 docs: rewrite rebase --(no-)autosquash descriptionAndy Koppe, Nov 11, 2023
  18. Andy KoppeNov 11, 2023
  19. 3/4 rebase: test autosquash with and without -iAndy Koppe, Nov 11, 2023
  20. Junio C HamanoNov 13, 2023
  21. Phillip WoodNov 13, 2023
  22. 4/4 rebase: rewrite --(no-)autosquash documentationAndy Koppe, Nov 11, 2023
  23. Junio C HamanoNov 13, 2023
  24. Phillip WoodNov 13, 2023
  25. 0/3 rebase: support --autosquash without -iAndy Koppe, Nov 14, 2023
  26. 1/3 rebase: fully ignore rebase.autoSquash without -iAndy Koppe, Nov 14, 2023
  27. 2/3 rebase: support --autosquash without -iAndy Koppe, Nov 14, 2023
  28. 3/3 rebase: rewrite --(no-)autosquash documentationAndy Koppe, Nov 14, 2023
  29. Phillip WoodNov 15, 2023
  30. Junio C HamanoNov 16, 2023
  31. Junio C HamanoNov 6, 2023
  32. Andy KoppeNov 11, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.