{"thread":{"id":"51841","subject":"bug: report `rebase -i + subtree add --prefix = disaster`","startedAt":"2019-09-13T08:17:07Z","lastAt":"2019-09-13T08:17:07Z","messageCount":1,"participants":["Luciano Joublanc"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"382286","messageId":"CAPYWsc08bROfbSHuiuFMrHK99NgqZ=euOkRh-KQHrEWC3w3NnQ@mail.gmail.com","threadId":"51841","inReplyTo":null,"subject":"bug: report `rebase -i + subtree add --prefix = disaster`","fromName":"Luciano Joublanc","fromEmail":"luciano.joublanc@digitalasset.com","sentAt":"2019-09-13T08:10:07Z","receivedAt":"2019-09-13T08:17:07Z","isPatch":false,"sender":{"key":"luciano.joublanc@digitalasset.com","avatar":null},"body":"Hi,\n\nI would like to report what I suspect is a bug in `git rebase -i`.\n\nThe problem in question is that when a `rebase -i` is run on a repo\nwhich has had a subtree added with `git subtree add --prefix=xxx`\npreviously; the later command will be executed without the `--prefix`\nargument, resulting in the `subtree` command being replayed to the\n_root_ of the repo.\n\nTo illustrate this example, this is what happened to me.\n\n1. I ran `git subtree add --prefix=ui ../ui/ui.git master` on my repo\nto merge a sub-project into the `ui` subdirectory.\n2. Sometime later, I had to re-write history to remove a large binary.\nI did this using\n  a) `git rebase -i` and\n  b) removing the file with `git rm bigfile.bin` and then `git commit --amend`.\n  c) completed the rebase with `git rebase --continue`.\n3. The resulting repository had all the files of the subproject 'ui',\nbut in the root directory. e.g. previously I had folder `./ui/python`,\nnow I have `./python`.\n\nPlease let me know if I can produce any more information.\n\nRegards,\n\nLuciano\n\n-- \nLuciano Joublanc\nDAML Commando Team\nc: +41 765 3223 82\ne: luciano.joublanc@digitalasset.com\nDigital Asset (Switzerland) GmbH\nThurgauerstrasse 40\n8050 Zurich, Switzerland\ndigitalasset.com\n\n-- \nThis message, and any attachments, is for the intended recipient(s) only, \nmay contain information that is privileged, confidential and/or proprietary \nand subject to important terms and conditions available at \nhttp://www.digitalasset.com/emaildisclaimer.html \n<http://www.digitalasset.com/emaildisclaimer.html>. If you are not the \nintended recipient, please delete this message.\n\n"}]}