All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Cc: James Westby <jw+debian@jameswestby.net>,
	git@vger.kernel.org,
	Ian Clatworthy <ian.clatworthy@internode.on.net>
Subject: Re: [PATCH] fast-import: Document the effect of "merge" with no "from" in a commit
Date: Wed, 19 Mar 2008 23:40:31 -0400	[thread overview]
Message-ID: <20080320034031.GX8410@spearce.org> (raw)
In-Reply-To: <9A41E5AD-2305-457B-A214-7A11A1B559F6@orakel.ntnu.no>

Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no> wrote:
> @@ -385,9 +385,11 @@ 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.
> -Omitting the `from` command on existing branches is usually desired,
> +Including 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.

I disagree with this.  Omitting is the correct term here as you
usually do not want a 'from' commit, as you usually want it to
automatically use the prior commit made on this branch.

As I understand it, this discussion about leaving out 'from' and
using 'merge' is only relevant on a *new* branch.

> +If the frontend creates all files from scratch when making a new
> +commit, a `merge` command may be used instead.

This is fine.
 
>  As `LF` is not valid in a Git refname or SHA-1 expression, no
>  quoting or escaping syntax is supported within `<committish>`.
> @@ -427,13 +429,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.  In the absence of a `from`
> +command, the first `merge` commit will be the first ancestor of the
> +current commit, and the commit 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 `from` is not used.

These updates are also fine.

-- 
Shawn.

  parent reply	other threads:[~2008-03-20  3:41 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         ` Shawn O. Pearce [this message]
     [not found]           ` <6FC571BB-D304-4D25-B1F2-1E03BD5438F8@orakel.ntnu.no>
2008-03-21 13:57             ` [PATCH] fast-import: Document the effect of "merge" with no "from" in a commit Eyvind Bernhardsen
2008-03-21 15:25               ` [PATCH v2] " Eyvind Bernhardsen
2008-03-23  5:00                 ` Shawn O. Pearce
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=20080320034031.GX8410@spearce.org \
    --to=spearce@spearce.org \
    --cc=eyvind-git@orakel.ntnu.no \
    --cc=git@vger.kernel.org \
    --cc=ian.clatworthy@internode.on.net \
    --cc=jw+debian@jameswestby.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.