threads / bug / 51841

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

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

## tl;dr

One message between Sep 13, 2019 and Sep 13, 2019.

replies: 0people: 1as markdown or json

Luciano Joublanc· Sep 13, 2019, 08:10 UTC · lore
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.

← back to recent threads