{"thread":{"id":"20045","subject":"Re: \"git svn reset\" only resets current branch ?","startedAt":"2009-07-07T08:01:08Z","lastAt":"2009-07-07T20:28:27Z","messageCount":3,"participants":["Yann Dirson","Ben Jackson","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"117544","messageId":"46974.10.0.0.1.1246953668.squirrel@intranet.linagora.com","threadId":"20045","inReplyTo":null,"subject":"Re: \"git svn reset\" only resets current branch ?","fromName":"Yann Dirson","fromEmail":"ydirson@linagora.com","sentAt":"2009-07-07T08:01:08Z","receivedAt":"2009-07-07T08:01:08Z","isPatch":false,"sender":{"key":"ydirson@linagora.com","avatar":null},"body":"> I think the current behavior is a reasonable default; it's least\n> surprising to me and the user could more easily rerun with \"--all\" if\n> needed.  If --all were the default, the user could potentially\n> have to refetch a lot of data they didn't want to.\n\nAs an alternative, we could also allow \"git svn reset\" to take us back\ninto the future to undo any such mistake without refetching.\n\nI'm not sure it would be the best to keep reset act on a single branch,\nwhere eg. fetch acts on all branches, and already has a --all flag, which\nis not yet documented, and seems to have a different meaning (if that\nwasn't obvious, I have still not had a look at what it really does ;)\n"},{"id":"117572","messageId":"20090707182109.GA3158@kronos.home.ben.com","threadId":"20045","inReplyTo":"46974.10.0.0.1.1246953668.squirrel@intranet.linagora.com","subject":"Re: \"git svn reset\" only resets current branch ?","fromName":"Ben Jackson","fromEmail":"ben@ben.com","sentAt":"2009-07-07T18:21:11Z","receivedAt":"2009-07-07T18:21:11Z","isPatch":false,"sender":{"key":"ben@ben.com","avatar":"https://gravatar.com/avatar/df49904dd23b03a5f57d9d53c0bf9fb6f69a14fac075c98f54f26cf1ce960794?d=mp&s=160"},"body":"On Tue, Jul 07, 2009 at 10:01:08AM +0200, Yann Dirson wrote:\n> \n> As an alternative, we could also allow \"git svn reset\" to take us back\n> into the future to undo any such mistake without refetching.\n\nYou can't do that directly, since data is destroyed (specifically, the\nrev_map is truncated back to the selected revision).  However, you can\n\"git reset\" the branch back to where it was using the reflog, and then\nthe next git-svn command you run will rebuild the rev_map from the\ncomment metadata (obviously you're out of luck if you set \"no_metadata\").\n\nIt's possible that \"git-svn reset\" should be saving something like\nORIG_HEAD (comments welcome) but that does conflict with the idea of\nadding \"--all\" or defaulting to \"--all\" behavior.\n\n> I'm not sure it would be the best to keep reset act on a single branch,\n> where eg. fetch acts on all branches, and already has a --all flag, which\n> is not yet documented, and seems to have a different meaning (if that\n> wasn't obvious, I have still not had a look at what it really does ;)\n\nRight, I don't really grok the branch thing on the fetch side either.\nI was hoping for guidance from people who use it on what the expected\nbehavior is.  I see even branch users are fuzzy.  ;-)\n\nThe one area where I can definitely see a potential problem is if you\nreset/refetched one branch (and the revs actually changed, eg due to\npermissions changes or --ignore-paths changes) and then did a merge.\nOn the other hand, the documentation already suggests you not try to\ndo SVN branch merges with git-svn.\n\n-- \nBen Jackson AD7GD\n<ben@ben.com>\nhttp://www.ben.com/\n"},{"id":"117589","messageId":"20090707202826.GA8618@dcvr.yhbt.net","threadId":"20045","inReplyTo":"46974.10.0.0.1.1246953668.squirrel@intranet.linagora.com","subject":"Re: \"git svn reset\" only resets current branch ?","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-07-07T20:28:27Z","receivedAt":"2009-07-07T20:28:27Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Yann Dirson <ydirson@linagora.com> wrote:\n> > I think the current behavior is a reasonable default; it's least\n> > surprising to me and the user could more easily rerun with \"--all\" if\n> > needed.  If --all were the default, the user could potentially\n> > have to refetch a lot of data they didn't want to.\n> \n> As an alternative, we could also allow \"git svn reset\" to take us back\n> into the future to undo any such mistake without refetching.\n> \n> I'm not sure it would be the best to keep reset act on a single branch,\n> where eg. fetch acts on all branches, and already has a --all flag, which\n> is not yet documented, and seems to have a different meaning (if that\n> wasn't obvious, I have still not had a look at what it really does ;)\n\nfetch with --all fetches from all \"svn-remotes\" defined in the config\n(it's rare to have more than one).  It's roughly equivalent to:\n\n  git remote | xargs -n1 git fetch\n\nAs far as reset behavior goes, I'll leave you and Ben to decide how/what\nto do since I've never used it myself (I rarely even use git svn\nnowadays).\n\n-- \nEric Wong\n"}]}