From: Mike Hommey <mh@glandium•org>
To: David Barr <davidbarr@google•com>
Cc: git@vger•kernel.org
Subject: Re: commit/from command in git-fast-import
Date: Fri, 27 Jan 2012 15:08:08 +0100 [thread overview]
Message-ID: <20120127140808.GA31535@glandium.org> (raw)
In-Reply-To: <CAFfmPPPYc=9BdwuE+ANiHKrFk+_7aXDgnMv3fHxVmF0ttZu8bA@mail.gmail.com>
On Sat, Jan 28, 2012 at 01:00:17AM +1100, David Barr wrote:
> On Fri, Jan 27, 2012 at 11:48 PM, Mike Hommey <mh@glandium•org> wrote:
> > When I do create a commit on a given branch with a stream like:
> > commit refs/heads/branch
> > author ...
> > committer ...
> > data <<EOF
> > Commit message
> > EOF
> > deleteall
> >
> > All I get is this warning:
> > warning: Not updating refs/heads/branch (new tip new_sha1
> > does not contain old_sha1)
> >
> > And the branch only has one commit, which is the one I just created.
> > On the other hand, if I add a "from" instruction in the above stream,
> > I have the expected branch history.
>
> This is precisely the expected behavior.
> If 'from' is omitted, the resulting commit has no preceding history.
> On the other hand, what you want is to specify the parent so that
> there is a continuation of history.
This is however not what the manpage suggests in what I quoted in my
message:
Omitting the from command on existing branches is usually desired, as
the current commit on that branch is automatically assumed to be the
first ancestor of the new commit.
Mike
next prev parent reply other threads:[~2012-01-27 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 12:48 commit/from command in git-fast-import Mike Hommey
2012-01-27 14:00 ` David Barr
2012-01-27 14:08 ` Mike Hommey [this message]
[not found] ` <CAFfmPPN9BOp3tDetEeMjVmfFam3bgHzf=q5Am4OkTz0TqLWfbQ@mail.gmail.com>
[not found] ` <20120127144702.GA6693@glandium.org>
2012-01-27 20:56 ` David Barr
2012-01-27 21:09 ` Jonathan Nieder
2012-01-30 15:35 ` Sverre Rabbelier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120127140808.GA31535@glandium.org \
--to=mh@glandium$(echo .)org \
--cc=davidbarr@google$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox