Re: [RFC/PATCH] git-svn: add support for --first-parent
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Sep 6, 2007, 07:51 UTC
- Message-ID
- <20070906075104.GA10192@hand.yhbt.net>
- In-Reply-To
- <8c5c35580709060018p50398071s32b271d52f4dc7e3@mail.gmail.com>
Lars Hjemli <hjemli@gmail.com> wrote:
Show 14 quoted lines
> On 9/5/07, Eric Wong <normalperson@yhbt.net> wrote: > > Lars Hjemli <hjemli@gmail.com> wrote: > > > When git-svn uses git-log to find embedded 'git-svn-id'-lines in commit > > > messages, it can get confused when local history contains merges with > > > other git-svn branches. But if --first-parent is supplied to git-log, > > > working_head_info() will only see 'branch-local' commits and thus the > > > first commit containing a 'git-svn-id' line should refer to the correct > > > subversion branch. > > > > Ideally, we'd probably stop, say something and give the user the choice > > of branches if multiple parents available. > > Could you elaborate? (I don't understand how following the first > parent of a merge could end up at the wrong svn branch)
Well, if the user didn't know about --first-parent (like me yesterday :), they could still end up miscommitting to any branch. That's been a complaint of users for a while now. Thinking more about it, --first-parent should probably be the default.
But, if they want to commit a different branch instead of the one they merged into (so the second/third/fourth parent), --first-parent would never give them that chance.
-- Eric Wong