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

bug: report `rebase -i + subtree add --prefix = disaster`

From
LJLuciano Joublanc <luciano.joublanc@digitalasset.com>
Date
Sep 13, 2019, 08:10 UTC
Message-ID
<CAPYWsc08bROfbSHuiuFMrHK99NgqZ=euOkRh-KQHrEWC3w3NnQ@mail.gmail.com>
Hi,
I would like to report what I suspect is a bug in `git rebase -i`.

The problem in question is that when a `rebase -i` is run on a repo which has had a subtree added with `git subtree add --prefix=xxx` previously; the later command will be executed without the `--prefix` argument, resulting in the `subtree` command being replayed to the _root_ of the repo.

To illustrate this example, this is what happened to me.
1. I ran `git subtree add --prefix=ui ../ui/ui.git master` on my repo
to merge a sub-project into the `ui` subdirectory.
2. Sometime later, I had to re-write history to remove a large binary.
I did this using
  a) `git rebase -i` and
  b) removing the file with `git rm bigfile.bin` and then `git commit --amend`.
  c) completed the rebase with `git rebase --continue`.
3. The resulting repository had all the files of the subproject 'ui',
but in the root directory. e.g. previously I had folder `./ui/python`,
now I have `./python`.
Please let me know if I can produce any more information.
Regards,
Luciano
-- 
Luciano Joublanc
DAML Commando Team
c: +41 765 3223 82
e: luciano.joublanc@digitalasset.com
Digital Asset (Switzerland) GmbH
Thurgauerstrasse 40
8050 Zurich, Switzerland
digitalasset.com

-- 
This message, and any attachments, is for the intended recipient(s) only, 
may contain information that is privileged, confidential and/or proprietary 
and subject to important terms and conditions available at 
http://www.digitalasset.com/emaildisclaimer.html 
<http://www.digitalasset.com/emaildisclaimer.html>. If you are not the 
intended recipient, please delete this message.
Message 1 of 1 in “bug: report `rebase -i + subtree add --prefix = disaster`”
  1. Luciano JoublancSep 13, 2019

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.