git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Eric Wong <normalperson@yhbt.net>
Cc: Lars Hjemli <hjemli@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC/PATCH] git-svn: add support for --first-parent
Date: Thu, 06 Sep 2007 10:05:10 +0200	[thread overview]
Message-ID: <85ejhcfccp.fsf@lola.goethe.zz> (raw)
In-Reply-To: <20070906075104.GA10192@hand.yhbt.net> (Eric Wong's message of "Thu\, 6 Sep 2007 00\:51\:04 -0700")

Eric Wong <normalperson@yhbt.net> writes:

> Lars Hjemli <hjemli@gmail.com> wrote:
>> 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.

If they want to commit to a different branch, they can b****y well
check out that branch and merge to _that_.  That is the way all the
rest of git works and nobody whines that this is a restriction.

Quite the opposite: that git-svn does not feel constrained to actually
commit to the base of the checked-out branch is a complete nuisance.
_Why_ would anybody want to dcommit to a Subversion branch not
associated with the current branch?

Just yesterday, I _again_ had git-svn dcommit to a nonsensical branch
(this time, the commit was to branch instead of the trunk, while more
often the catastrophes happen the other way round).  And it is not
like git-svn gives you a chance to override this bad decision: you
have to rebase -i all of your commit messages from potential
cherrypicks or whatever else and remove the git-svn taglines manually
for every commit before git-svn will deign to dcommit to the same
branch as before.

Eric, this is not "flexibility".  This is madness.  If you think that
it is essential to dcommit to a branch unrelated to the current HEAD,
then create a sane command line interface for it that takes effect at
the time of dcommit.  But the current interface is just throwing dice
as far as the user is concerned, since the addition of git-svn tags to
commit messages happens behind his back, and any merge or cherrypick
or rebase 5 revisions back might come to bite you.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2007-09-06  8:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05  9:35 [RFC/PATCH] git-svn: add support for --first-parent Lars Hjemli
2007-09-05 10:19 ` Eric Wong
2007-09-06  7:18   ` Lars Hjemli
2007-09-06  7:51     ` Eric Wong
2007-09-06  8:05       ` David Kastrup [this message]
2007-09-06  8:34       ` Lars Hjemli
2007-09-06 16:37       ` [PATCH] git-svn: remove --first-parent, add --upstream Lars Hjemli
2007-09-06 17:49         ` Steven Grimm
2007-09-06 21:01         ` Eric Wong
2007-09-06 21:35           ` Eric Wong
2007-09-06 22:14             ` Lars Hjemli
2007-09-06 23:55               ` Peter Baumann
2007-09-07  0:23                 ` Lars Hjemli
2007-09-07  8:43                   ` Peter Baumann
2007-09-07 10:13                     ` Lars Hjemli
2007-09-07 11:51                       ` Peter Baumann
2007-09-07 12:08                         ` Configure mutt to be used in git and lkml mailing lists (was: Re: [PATCH] git-svn: remove --first-parent, add --upstream) Fernando J. Pereda
2007-09-07 18:37                         ` [PATCH] git-svn: remove --first-parent, add --upstream Eric Wong
2007-09-15 14:08                       ` Lars Hjemli
2007-09-15 14:37                         ` Peter Baumann
2007-09-15 15:24                           ` Lars Hjemli
2007-09-15 15:49                             ` Peter Baumann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85ejhcfccp.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hjemli@gmail.com \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).