{"thread":{"id":"36524","subject":"git-svn Rewrites Some Commits, but not All","startedAt":"2014-04-28T19:26:20Z","lastAt":"2014-05-01T12:52:46Z","messageCount":4,"participants":["Aaron Laws","Piotr Krukowiecki","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"240000","messageId":"CADu-kvcXWXAd2iBt+oQOVt5znxLmU0fmJ-tgOaogyfGjS5R0vA@mail.gmail.com","threadId":"36524","inReplyTo":null,"subject":"git-svn Rewrites Some Commits, but not All","fromName":"Aaron Laws","fromEmail":"dartme18@gmail.com","sentAt":"2014-04-28T19:26:20Z","receivedAt":"2014-04-28T19:26:20Z","isPatch":false,"sender":{"key":"dartme18@gmail.com","avatar":null},"body":"Hello.\n\nI've been using git-svn for some time now, and I'm very happy with it.\nThere is one thing that I'm wondering about, however.\n\nThe way I understand it, when `git svn dcommit` is run, new commits\nare created (A' is created from A adding SVN information), then the\ncurrent branch is moved to point to A'. Why don't we move any other\nrefs that were pointing to A over to A' ? What would be the point of\ncontinuing to point to A? I'm interested in looking into coding this\nchange to git-svn, but I would like to hear some feedback first.\n\nIf you understand what I'm saying, feel free to stop now, otherwise, a\nmore verbose explanation follows:\n\nConsider the following workflow:\n\nCreate a local branch tracking a SVN branch (I'll call it \"master\")\nOn that branch, git checkout -b topic;\nDo some work, and git commit;\ngit checkout master; git merge topic;\ngit log --oneline --decorate --graph topic master\nNote that topic and master point to the same commit (it was a fast-forward)\ngit svn dcommit;\ngit log --oneline --decorate --graph topic master\n\nNow we see that topic and master now point to different commits. git\nsvn rewrote the master commits to add information about where those\ncommits went in SVN (their rev number, the url, etc.).\n\nI'm proposing that both master and topic should now be pointing to A'.\nThis would allow numerous things to happen automatically that are\npleasing, for instance:  git branch -d topic; should succeed rather\nthan warn about unmerged changes.\n\nThanks for listening; I look forward to hearing your thoughts.\n\nIn Christ,\nAaron Laws\n"},{"id":"240215","messageId":"CAA01CsoWw2OxuO7e09u18b9-g8c2aavDNWPDE_TvG33-79nwMQ@mail.gmail.com","threadId":"36524","inReplyTo":"CADu-kvcXWXAd2iBt+oQOVt5znxLmU0fmJ-tgOaogyfGjS5R0vA@mail.gmail.com","subject":"Re: git-svn Rewrites Some Commits, but not All","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2014-04-29T22:04:37Z","receivedAt":"2014-04-29T22:04:37Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Mon, Apr 28, 2014 at 9:26 PM, Aaron Laws <dartme18@gmail.com> wrote:\n> The way I understand it, when `git svn dcommit` is run, new commits\n> are created (A' is created from A adding SVN information), then the\n> current branch is moved to point to A'. Why don't we move any other\n> refs that were pointing to A over to A' ? What would be the point of\n> continuing to point to A? I'm interested in looking into coding this\n> change to git-svn, but I would like to hear some feedback first.\n\nHi,\n\nI think A' might not always be simply (A + SVN info). I think you can\ndcommit when you're not up to date.  So A' will have a different\nparent than A (will be automatically rebased on top of current branch\ntip). Other refs pointing to A might be used as bookmarks, and moving\nthem from A to A' would be a significant change.\n\n-- \nPiotr Krukowiecki\n"},{"id":"240272","messageId":"20140430065951.GA30265@dcvr.yhbt.net","threadId":"36524","inReplyTo":"CAA01CsoWw2OxuO7e09u18b9-g8c2aavDNWPDE_TvG33-79nwMQ@mail.gmail.com","subject":"Re: git-svn Rewrites Some Commits, but not All","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2014-04-30T06:59:51Z","receivedAt":"2014-04-30T06:59:51Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Piotr Krukowiecki <piotr.krukowiecki@gmail.com> wrote:\n> On Mon, Apr 28, 2014 at 9:26 PM, Aaron Laws <dartme18@gmail.com> wrote:\n> > The way I understand it, when `git svn dcommit` is run, new commits\n> > are created (A' is created from A adding SVN information), then the\n> > current branch is moved to point to A'. Why don't we move any other\n> > refs that were pointing to A over to A' ? What would be the point of\n> > continuing to point to A? I'm interested in looking into coding this\n> > change to git-svn, but I would like to hear some feedback first.\n> \n> I think A' might not always be simply (A + SVN info). I think you can\n> dcommit when you're not up to date.  So A' will have a different\n> parent than A (will be automatically rebased on top of current branch\n> tip). Other refs pointing to A might be used as bookmarks, and moving\n> them from A to A' would be a significant change.\n\nRight, I would not want \"git rebase\" (what dcommit uses internally)\nto scan all the branches in my repository and try to update them\nbehind my back.  It's far too surprising and potentially dangerous.\n"},{"id":"240401","messageId":"CADu-kvdVcdJk6+5-ELwti5SEJE5cHjTf+2AwMhfmAOFeYWT-sQ@mail.gmail.com","threadId":"36524","inReplyTo":"CAA01CsoWw2OxuO7e09u18b9-g8c2aavDNWPDE_TvG33-79nwMQ@mail.gmail.com","subject":"Re: git-svn Rewrites Some Commits, but not All","fromName":"Aaron Laws","fromEmail":"dartme18@gmail.com","sentAt":"2014-05-01T12:52:46Z","receivedAt":"2014-05-01T12:52:46Z","isPatch":false,"sender":{"key":"dartme18@gmail.com","avatar":null},"body":"Ah, I missed that dcommit entails a rebase. I thought it just\ncomplained if one needed to take place, so I always do a rebase\n\"manually\" before dcommit. I agree, and would not want my other refs\nmoved around if the change is that drastic.\n\nThe workaround is not so bad anyway: git reset on the left-behind\nrefs. Thanks for the replies!\n\nIn Christ,\nAaron Laws\n\n\nOn Tue, Apr 29, 2014 at 6:04 PM, Piotr Krukowiecki\n<piotr.krukowiecki@gmail.com> wrote:\n> On Mon, Apr 28, 2014 at 9:26 PM, Aaron Laws <dartme18@gmail.com> wrote:\n>> The way I understand it, when `git svn dcommit` is run, new commits\n>> are created (A' is created from A adding SVN information), then the\n>> current branch is moved to point to A'. Why don't we move any other\n>> refs that were pointing to A over to A' ? What would be the point of\n>> continuing to point to A? I'm interested in looking into coding this\n>> change to git-svn, but I would like to hear some feedback first.\n>\n> Hi,\n>\n> I think A' might not always be simply (A + SVN info). I think you can\n> dcommit when you're not up to date.  So A' will have a different\n> parent than A (will be automatically rebased on top of current branch\n> tip). Other refs pointing to A might be used as bookmarks, and moving\n> them from A to A' would be a significant change.\n>\n> --\n> Piotr Krukowiecki\n"}]}