git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>,
	Junio C Hamano <gitster@pobox.com>
Cc: James Westby <jw+debian@jameswestby.net>,
	Ian Clatworthy <ian.clatworthy@internode.on.net>,
	Michael Haggerty <mhagger@alum.mit.edu>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH v2] fast-import: Document the effect of "merge" with no "from" in a commit
Date: Sun, 23 Mar 2008 01:00:28 -0400	[thread overview]
Message-ID: <20080323050028.GI8410@spearce.org> (raw)
In-Reply-To: <BDCF3EE6-0813-40B1-96D8-CCBADCCDAEA6@orakel.ntnu.no>

Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no> wrote:
> The fast-import documentation currently does not document the behaviour
> of "merge" when there is no "from" in a commit.  This patch adds a
> description of what happens: the commit is created with a parent, but
> no files.  This behaviour is equivalent to "from" followed by
> "filedeleteall".
> 
> Signed-off-by: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>

Thanks.  This change does clarify the documentation.

Acked-by: Shawn O. Pearce <spearce@spearce.org>


> diff --git a/Documentation/git-fast-import.txt b/Documentation/git- 
> fast-import.txt
> index 96f6767..c29a4f8 100644
> --- a/Documentation/git-fast-import.txt
> +++ b/Documentation/git-fast-import.txt
> @@ -385,6 +385,9 @@ new commit.
>  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.
> @@ -427,13 +430,15 @@ existing value of the branch.
> 
>  `merge`
>  ^^^^^^^
> -Includes one additional ancestor commit, and makes the current
> -commit a merge commit.  An unlimited number of `merge` commands per
> +Includes one additional ancestor commit.  If the `from` command is
> +omitted when creating a new branch, the first `merge` commit will be
> +the first ancestor of the current commit, and the branch will start
> +out with no files.  An unlimited number of `merge` commands per
>  commit are permitted by fast-import, thereby establishing an n-way  
> merge.
>  However Git's other tools never create commits with more than 15
>  additional ancestors (forming a 16-way merge).  For this reason
>  it is suggested that frontends do not use more than 15 `merge`
> -commands per commit.
> +commands per commit; 16, if starting a new, empty branch.
> 
>  Here `<committish>` is any of the commit specification expressions
>  also accepted by `from` (see above).
> -- 
> 1.5.5.rc0.9.g6e103
> 

-- 
Shawn.

  reply	other threads:[~2008-03-23  5:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 22:10 "commit"s without "from" in fast-import Eyvind Bernhardsen
2008-03-18  3:43 ` Shawn O. Pearce
     [not found]   ` <F4486D8E-3256-4FA7-89A7-3EC7E7D64162@orakel.ntnu.no>
2008-03-19  2:06     ` Shawn O. Pearce
2008-03-19 18:39       ` James Westby
     [not found]       ` <9A41E5AD-2305-457B-A214-7A11A1B559F6@orakel.ntnu.no>
2008-03-20  3:40         ` [PATCH] fast-import: Document the effect of "merge" with no "from" in a commit Shawn O. Pearce
     [not found]           ` <6FC571BB-D304-4D25-B1F2-1E03BD5438F8@orakel.ntnu.no>
2008-03-21 13:57             ` Eyvind Bernhardsen
2008-03-21 15:25               ` [PATCH v2] " Eyvind Bernhardsen
2008-03-23  5:00                 ` Shawn O. Pearce [this message]
2008-03-23  6:17                   ` Junio C Hamano

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=20080323050028.GI8410@spearce.org \
    --to=spearce@spearce.org \
    --cc=eyvind-git@orakel.ntnu.no \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ian.clatworthy@internode.on.net \
    --cc=jw+debian@jameswestby.net \
    --cc=mhagger@alum.mit.edu \
    /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).