git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Subject: commit/from command in git-fast-import
Date: Fri, 27 Jan 2012 13:48:37 +0100	[thread overview]
Message-ID: <20120127124837.GA24084@glandium.org> (raw)

Hi,

I'm trying to make sense of the git fast-import manual page. This is
what it reads, as of git 1.7.8.3, from Debian unstable:

  Omitting the from command in the first commit of a new branch will
  cause fast-import to create that commit with no ancestor. This
  tends to be desired only for the initial commit of a project. If
  the frontend creates all files from scratch when making a new
  branch, a merge command may be used instead of from to start the
  commit with an empty tree. 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.

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.

Arguably, this may be related to my use of deleteall, but nothing in the
deleteall description suggests this would happen.

Is it an expected behaviour and a lack of proper documentation, or is it
a bug in git fast-import ?

Mike

             reply	other threads:[~2012-01-27 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 12:48 Mike Hommey [this message]
2012-01-27 14:00 ` commit/from command in git-fast-import David Barr
2012-01-27 14:08   ` Mike Hommey
     [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=20120127124837.GA24084@glandium.org \
    --to=mh@glandium.org \
    --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.
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 NNTP newsgroup(s).