git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Norbert Nemec <Norbert.Nemec@microsoft.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: fast-import on existing branches
Date: Mon, 11 Mar 2019 12:46:22 -0700	[thread overview]
Message-ID: <CABPp-BGs4E48bBQ0e94jxhoXv6t9nzwoNEEnb37tUBpTsi_mCw@mail.gmail.com> (raw)
In-Reply-To: <DB6PR8303MB006927B6267629467F783F58FD4D0@DB6PR8303MB0069.EURPRD83.prod.outlook.com>

Hi Norbert,

On Fri, Mar 8, 2019 at 9:38 AM Norbert Nemec
<Norbert.Nemec@microsoft.com> wrote:
>
> Thanks, Elijah, I had indeed missed that block about the ^0 handling.
>
> I still don't get why this awkward workaround is required. Why isn't that lookup done by default? Performance can't be the reason, since the same lookup is done lateron anyway, just as correctness check. The way I read the documentation, providing no "from" should continue committing to a branch in any case. I would never have seen the continuation of an incremental import a "special case". There is a number of tools around that sync a git repo from some other source and would regularly need to continue an existing branch.
>
> Greetings,
> Norbert

If this "awkward workaround", as you put it, were removed it would
make it impossible to create a commit with no parent without using a
different branch name.  I really like being able to export, modify,
and re-import history, using something of the form:

   git fast-export --all | <edit the stream somehow> | git fast-import --force

which would no longer work if fast-import automatically assumed a
parent for every from-less commit in the input based on the reference
name.  Personally, I'm more on the side of not understanding why
"from" isn't required whenever you want your commit to have a parent;
users can specify either a sha or a mark-id easily enough; I don't see
what it saves to allow omitting it, and it inevitably leads to other
confusion like yours.  But I'm well over a decade too late to advocate
for that.


Hope that helps,
Elijah

  reply	other threads:[~2019-03-11 19:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 10:50 fast-import on existing branches Norbert Nemec
2019-03-08 15:40 ` Elijah Newren
2019-03-08 17:33   ` Norbert Nemec
2019-03-11 19:46     ` Elijah Newren [this message]
2019-03-12  9:18       ` Norbert Nemec

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=CABPp-BGs4E48bBQ0e94jxhoXv6t9nzwoNEEnb37tUBpTsi_mCw@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=Norbert.Nemec@microsoft.com \
    --cc=git@vger.kernel.org \
    /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).