git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* commit/from command in git-fast-import
@ 2012-01-27 12:48 Mike Hommey
  2012-01-27 14:00 ` David Barr
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Hommey @ 2012-01-27 12:48 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-30 15:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [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

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).