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

Re: [PATCH v2 0/6] Let the sequencer handle `git rebase -i --root`

From
Stefan Beller <sbeller@google.com>
Date
May 4, 2018, 19:55 UTC
Message-ID
<CAGZ79ka2SmfA_ZUA2MjuqSwb=gUphbRxp=NQgj5AcqvMiePZFw@mail.gmail.com>
In-Reply-To
<cover.1525388472.git.johannes.schindelin@gmx.de>
Show 9 quoted lines
>
> Branch-diff vs v1:
>  1: 42db734a980 ! 1: 73398da7119 sequencer: learn about the special "fake root commit" handling
>      @@ -54,40 +54,50 @@
>         return NULL;
>        }
>
>      ++/* Read author-script and return an ident line (author <email> timestamp) */
>       +static const char *read_author_ident(struct strbuf *buf)
I like the new way of read_author_ident. Thanks for writing it!
Show 18 quoted lines
>       +
>        static const char staged_changes_advice[] =
>      @@ -159,7 +169,17 @@
>       +/* Does this command create a (non-merge) commit? */
>       +static int is_pick_or_similar(enum todo_command command)
>       +{
>      -+ return command <= TODO_SQUASH;
>      ++ switch (command) {
>      ++ case TODO_PICK:
>      ++ case TODO_REVERT:
>      ++ case TODO_EDIT:
>      ++ case TODO_REWORD:
>      ++ case TODO_FIXUP:
>      ++ case TODO_SQUASH:
>      ++         return 1;
>      ++ default:
>      ++         return 0;
>      ++ }
The switch case is not as bad as I thought following the discussion on of v1.
This series is
Reviewed-by: Stefan Beller <sbeller@google.com>
Thanks!

<off topic> During a lunch discussion I wondered if the branch diff format could lead to another form of machine readable communication, i.e. if we want to add the ability to read the branch diff format and apply the changes. Note how applying this diff-diff would not create new commits, but rather amend existing commits.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 21 of 22 in “Let the sequencer handle `git rebase -i --root`”
  1. 0/6 Let the sequencer handle `git rebase -i --root`Johannes Schindelin, Apr 27, 2018
  2. 1/6 sequencer: extract helper to update active_cache_treeJohannes Schindelin, Apr 27, 2018
  3. Stefan BellerApr 28, 2018
  4. 2/6 sequencer: learn about the special "fake root commit" handlingJohannes Schindelin, Apr 27, 2018
  5. Stefan BellerApr 28, 2018
  6. Johannes SchindelinApr 29, 2018
  7. Stefan BellerApr 29, 2018
  8. 3/6 rebase -i --root: let the sequencer handle even the initial partJohannes Schindelin, Apr 27, 2018
  9. Stefan BellerApr 28, 2018
  10. Johannes SchindelinApr 29, 2018
  11. 4/6 sequencer: allow introducing new root commitsJohannes Schindelin, Apr 27, 2018
  12. 5/6 rebase --rebase-merges: a "merge" into a new root is a fast-forwardJohannes Schindelin, Apr 27, 2018
  13. 6/6 rebase --rebase-merges: root commits can be cousins, tooJohannes Schindelin, Apr 27, 2018
  14. 0/6 Let the sequencer handle `git rebase -i --root`Johannes Schindelin, May 3, 2018
  15. 1/6 sequencer: extract helper to update active_cache_treeJohannes Schindelin, May 3, 2018
  16. 3/6 rebase -i --root: let the sequencer handle even the initial partJohannes Schindelin, May 3, 2018
  17. 2/6 sequencer: learn about the special "fake root commit" handlingJohannes Schindelin, May 3, 2018
  18. 5/6 rebase --rebase-merges: a "merge" into a new root is a fast-forwardJohannes Schindelin, May 3, 2018
  19. 6/6 rebase --rebase-merges: root commits can be cousins, tooJohannes Schindelin, May 3, 2018
  20. 4/6 sequencer: allow introducing new root commitsJohannes Schindelin, May 3, 2018
  21. Stefan BellerMay 4, 2018
  22. Johannes SchindelinMay 5, 2018

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.