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

Re: [PATCH v1] rebase --root: sentinel commit cloaks empty commits

From
Chris Webb <chris@arachsys.com>
Date
Jul 20, 2014, 20:52 UTC
Message-ID
<291ABB60-4B66-4211-A561-048F10089B82@arachsys.com>
In-Reply-To
<871tti50l8.fsf@thomasrast.ch>
Thomas Rast <tr@thomasrast.ch> wrote:
Show 12 quoted lines
>> Please take a closer look at the last two test cases that specify the
>> expected behaviour of rebasing a branch that tracks the empty tree.
>> At this point they expect the "Nothing to do" error (aborts with
>> untouched history). This is consistent with rebasing only empty
>> commits without `--root`, which also doesn't just delete them from
>> the history. Furthermore, I think the two alternatives adding a note
>> that all commits in the range were empty, and removing the empty
>> commits (thus making the branch empty) are better discussed in a
>> separate bug report.
> 
> Makes sense to me, though I have never thought much about rebasing empty
> commits.  Maybe Chris has a more informed opinion?

I definitely agree with you both that --root should be (and isn't) consistent with normal interactive rebasing. The difference isn't deliberate on my part.

On a personal note, I've always disliked the way interactive rebase stops when you pick an existing empty commit or empty log message rather than preserving it. Jumping through a few hoops is perhaps sensible when you create that kind of strange commit, but just annoying when picking an existing empty/logless commit as part of a series. But as you say, that's a separate issue than --root behaving differently to non --root.

Cheers,
Chris.
Previous: Thomas Rast
Message 7 of 7 in “[RFC] rebase --root: Empty root commit is replaced with sentinel”
  1. Fabian RuchJun 18, 2014
  2. Michael HaggertyJun 19, 2014
  3. Fabian RuchJun 19, 2014
  4. Michael HaggertyJun 19, 2014
  5. rebase --root: sentinel commit cloaks empty commitsFabian Ruch, Jul 16, 2014
  6. Thomas RastJul 18, 2014
  7. Chris WebbJul 20, 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.