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

Re: [PATCH 2/4] git-rebase: document ack

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 18, 2014, 23:43 UTC
Message-ID
<CAPig+cT0evq73-O9Ns5YXjp7Yg-FdX7FehDzW9fOz_Wqp2chUQ@mail.gmail.com>
In-Reply-To
<1400447743-18513-3-git-send-email-mst@redhat.com>
On Sun, May 18, 2014 at 5:17 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
Show 76 quoted lines
> document ack! behaviour and use
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  Documentation/git-rebase.txt | 45 +++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 40 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
> index 2a93c64..c27aef4 100644
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -384,7 +384,7 @@ or by giving more than one `--exec`:
>  +
>  If `--autosquash` is used, "exec" lines will not be appended for
>  the intermediate commits, and will only appear at the end of each
> -squash/fixup series.
> +squash/fixup/ack series.
>
>  --root::
>         Rebase all commits reachable from <branch>, instead of
> @@ -398,13 +398,13 @@ squash/fixup series.
>
>  --autosquash::
>  --no-autosquash::
> -       When the commit log message begins with "squash! ..." (or
> -       "fixup! ..."), and there is a commit whose title begins with
> +       When the commit log message begins with "squash! ..." ("fixup! ..."
> +       or "ack! ..."), and there is a commit whose title begins with
>         the same ..., automatically modify the todo list of rebase -i
>         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`).  Ignores subsequent
> -       "fixup! " or "squash! " after the first, in case you referred to an
> +       commit from `pick` to `squash` (`fixup` or `ack`).  Ignores subsequent
> +       "ack! ", "fixup! " or "squash! " after the first, in case you referred to an
>         earlier fixup/squash with `git commit --fixup/--squash`.
>  +
>  This option is only valid when the '--interactive' option is used.
> @@ -624,6 +624,41 @@ consistent (they compile, pass the testsuite, etc.) you should use
>  'git stash' to stash away the not-yet-committed changes
>  after each commit, test, and amend the commit if fixes are necessary.
>
> +----------------
> +RECORDING ACKS
> +----------------
> +
> +Interactive mode with --autosquash can be used to concatenate
> +commit log for several commits, which is useful to record
> +extra information about the commit, such as ack signatures.
> +This allows, for example, the following workflow:
> +
> +1. receive patches by mail and commit
> +2. receive by mail ack signatures for the patches
> +3. prepare a series for submission
> +4. submit
> +
> +where point 2. consists of several instances of
> +       i) create a (possibly empty) commit with signature
> +         in the commit message
> +
> +Sometimes the ack signature added in i. cannot be amended to the
> +commit it acks, because that commit is buried deeply in a
> +patch series.  That is exactly what rebase --autosquash
> +option is for: use it
> +after plenty of "i"s, to automaticlly rearrange
> +commits, and squashing multiple sign-off commits into
> +the commit that is signed.
> +
> +Start it with the last commit you want to retain as-is:
> +
> +       git rebase --autosquash -i <after-this-commit>
> +
> +An editor will be fired up with all the commits in your current branch
> +which come after the given commit. Ack commits will be
> +re-arranged to come after the commit that is acked,
> +and the action will be utomticlly changed from `pick` to `ack`
s/utomticlly/automatically/
Show 7 quoted lines
> +to cause them to be squashed into the acked commit.
>
>  RECOVERING FROM UPSTREAM REBASE
>  -------------------------------
> --
> MST
>
Previous: Michael S. TsirkinNext: Michael S. Tsirkin
Message 4 of 17 in “ack recoding in commit log”
  1. 0/4 ack recoding in commit logMichael S. Tsirkin, May 18, 2014
  2. 1/4 rebase -i: add ack actionMichael S. Tsirkin, May 18, 2014
  3. 2/4 git-rebase: document ackMichael S. Tsirkin, May 18, 2014
  4. Eric SunshineMay 18, 2014
  5. 3/4 rebase: test ackMichael S. Tsirkin, May 18, 2014
  6. Junio C HamanoMay 19, 2014
  7. Michael S. TsirkinMay 19, 2014
  8. Michael S. TsirkinMay 20, 2014
  9. Junio C HamanoMay 20, 2014
  10. Michael S. TsirkinMay 21, 2014
  11. Junio C HamanoMay 21, 2014
  12. Michael S. TsirkinMay 21, 2014
  13. Junio C HamanoMay 21, 2014
  14. 4/4 git-ack: record an ackMichael S. Tsirkin, May 18, 2014
  15. Fabian RuchJun 3, 2014
  16. Fabian RuchJun 11, 2014
  17. Michael S. TsirkinJun 11, 2014

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.