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
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 5, 2018, 19:24 UTC
Message-ID
<nycvar.QRO.7.76.6.1805052121090.77@tvgsbejvaqbjf.bet>
In-Reply-To
<CAGZ79ka2SmfA_ZUA2MjuqSwb=gUphbRxp=NQgj5AcqvMiePZFw@mail.gmail.com>
Hi Stefan,
On Fri, 4 May 2018, Stefan Beller wrote:
Show 11 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!

You're welcome. After sleeping a night over it, I think this function might also benefit from a new name: extract_ident_from_author_script(). What do you think?

Show 18 quoted lines
> >      @@ -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.
Yes, it makes things explicit, and it is not too long a case-chain.
> This series is
> Reviewed-by: Stefan Beller <sbeller@google.com>
Thanks!
Show 5 quoted lines
> <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.
</off topic> (which BTW is not valid XML)

I do not think that it would be a wise idea to detour even further from Git when exchanging patch series iterations. We have a lovely way to exchange commits, after all: `git fetch` and `git push`, and for times you cannot agree on a central server, `git bundle`.

Ciao, Dscho

Previous: Stefan Beller
Message 22 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.