git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix incorrect wording in git-merge.txt.
@ 2008-03-03 17:14 Matthieu Moy
  2008-03-03 17:27 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Matthieu Moy @ 2008-03-03 17:14 UTC (permalink / raw)
  To: git, gitster; +Cc: Matthieu Moy

A merge is not necessarily with a remote branch, it can be with any
commit object.
---
 Documentation/git-merge.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 0c9ad7f..193c9c0 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -68,7 +68,8 @@ HOW MERGE WORKS
 ---------------
 
 A merge is always between the current `HEAD` and one or more
-remote branch heads, and the index file must exactly match the
+commit objects (usually, branch head or tag), and the index file must
+exactly match the
 tree of `HEAD` commit (i.e. the contents of the last commit) when
 it happens.  In other words, `git-diff --cached HEAD` must
 report no changes.
-- 
1.5.4.21.g82c44


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

* Re: [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 17:14 [PATCH] Fix incorrect wording in git-merge.txt Matthieu Moy
@ 2008-03-03 17:27 ` Junio C Hamano
  2008-03-03 17:52 ` Matthieu Moy
  2008-03-03 18:26 ` Nicolas Pitre
  2 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2008-03-03 17:27 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

Matthieu Moy <Matthieu.Moy@imag.fr> writes:

> A merge is not necessarily with a remote branch, it can be with any
> commit object.

Thanks.  Sign-off, and perhaps mention other people who helped refine the
wording in the discussion?

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

* [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 17:14 [PATCH] Fix incorrect wording in git-merge.txt Matthieu Moy
  2008-03-03 17:27 ` Junio C Hamano
@ 2008-03-03 17:52 ` Matthieu Moy
  2008-03-03 18:26 ` Nicolas Pitre
  2 siblings, 0 replies; 9+ messages in thread
From: Matthieu Moy @ 2008-03-03 17:52 UTC (permalink / raw)
  To: git, gitster; +Cc: Matthieu Moy

A merge is not necessarily with a remote branch, it can be with any
commit object.

Thanks to Paolo Ciarrocchi for pointing out the problem, and to
Nicolas Pitre for pointing out the fact that a merge is not
necessarily with a branch head.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 Documentation/git-merge.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 0c9ad7f..193c9c0 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -68,7 +68,8 @@ HOW MERGE WORKS
 ---------------
 
 A merge is always between the current `HEAD` and one or more
-remote branch heads, and the index file must exactly match the
+commit objects (usually, branch head or tag), and the index file must
+exactly match the
 tree of `HEAD` commit (i.e. the contents of the last commit) when
 it happens.  In other words, `git-diff --cached HEAD` must
 report no changes.
-- 
1.5.4.21.g82c44


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

* Re: [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 17:14 [PATCH] Fix incorrect wording in git-merge.txt Matthieu Moy
  2008-03-03 17:27 ` Junio C Hamano
  2008-03-03 17:52 ` Matthieu Moy
@ 2008-03-03 18:26 ` Nicolas Pitre
  2008-03-03 19:50   ` Matthieu Moy
  2 siblings, 1 reply; 9+ messages in thread
From: Nicolas Pitre @ 2008-03-03 18:26 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git, gitster

On Mon, 3 Mar 2008, Matthieu Moy wrote:

> A merge is not necessarily with a remote branch, it can be with any
> commit object.
> ---
>  Documentation/git-merge.txt |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
> index 0c9ad7f..193c9c0 100644
> --- a/Documentation/git-merge.txt
> +++ b/Documentation/git-merge.txt
> @@ -68,7 +68,8 @@ HOW MERGE WORKS
>  ---------------
>  
>  A merge is always between the current `HEAD` and one or more
> -remote branch heads, and the index file must exactly match the
> +commit objects (usually, branch head or tag), and the index file must
> +exactly match the
>  tree of `HEAD` commit (i.e. the contents of the last commit) when
>  it happens.  In other words, `git-diff --cached HEAD` must
>  report no changes.

I don't like this wording.  Using "object" here wouldn't help avoiding 
Paolo's confusion at all.

You don't really merge a commit _object_.
You merge with one or more other commits, tipycally identified by a 
branch name or a tag.


Nicolas

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

* Re: [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 18:26 ` Nicolas Pitre
@ 2008-03-03 19:50   ` Matthieu Moy
  2008-03-03 20:39     ` Nicolas Pitre
  0 siblings, 1 reply; 9+ messages in thread
From: Matthieu Moy @ 2008-03-03 19:50 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: git, gitster

Nicolas Pitre <nico@cam.org> writes:

> You don't really merge a commit _object_.
> You merge with one or more other commits, tipycally identified by a 
> branch name or a tag.

Strictly speaking, you can merge any commit, not necessarily a branch
or a tag. That can be "git merge 66f0a4d" or whatever. Admitedly, the
common case is to merge a tag or a branch (which is why I keep it in
parentheses).

Now, I don't understand the distinction you seem to be making between
"commit" and "commit object".

-- 
Matthieu

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

* Re: [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 19:50   ` Matthieu Moy
@ 2008-03-03 20:39     ` Nicolas Pitre
  2008-03-03 21:25       ` Matthieu Moy
  2008-03-11  7:05       ` Andreas Ericsson
  0 siblings, 2 replies; 9+ messages in thread
From: Nicolas Pitre @ 2008-03-03 20:39 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git, gitster

On Mon, 3 Mar 2008, Matthieu Moy wrote:

> Nicolas Pitre <nico@cam.org> writes:
> 
> > You don't really merge a commit _object_.
> > You merge with one or more other commits, tipycally identified by a 
> > branch name or a tag.
> 
> Strictly speaking, you can merge any commit, not necessarily a branch
> or a tag. That can be "git merge 66f0a4d" or whatever. Admitedly, the
> common case is to merge a tag or a branch (which is why I keep it in
> parentheses).

Yes, and I've been meaning the same all along.

> Now, I don't understand the distinction you seem to be making between
> "commit" and "commit object".

Objects are what the low level storage is made of.  Conceptually, The 
merge operation doesn't work at the object level, but rather at the 
history graph level.  You don't merge objects, you merge history.
I think it is unnecessary and probably best not to 
mention the word "object" in this case.

The alternative is to provide more detailed explanation, such as:

   A merge is made by joining one or more history line to the current 
   'HEAD' branch.  Those history lines are denoted by their terminating 
   commit.  To identify them, the SHA1 name of the corresponding commit 
   object is used, or more frequently the name of the branch or tag 
   currently pointing at such commit objects.

but while this is more correct strictly speaking as the relation between 
a merge and a commit object is made, I don't know if this is any more 
enlightening to those who ope to learn something from the reading the 
documentation.


Nicolas

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

* Re: [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 20:39     ` Nicolas Pitre
@ 2008-03-03 21:25       ` Matthieu Moy
  2008-03-03 22:10         ` Nicolas Pitre
  2008-03-11  7:05       ` Andreas Ericsson
  1 sibling, 1 reply; 9+ messages in thread
From: Matthieu Moy @ 2008-03-03 21:25 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: git, gitster

Nicolas Pitre <nico@cam.org> writes:

>> Now, I don't understand the distinction you seem to be making between
>> "commit" and "commit object".
>
> Objects are what the low level storage is made of.  Conceptually, The 
> merge operation doesn't work at the object level, but rather at the 
> history graph level.

I still don't get the distinction. What is the "graph" if not a set of
objects pointing to each other?

If you don't want to talk about commit object, then you should fix
also user-manual.txt (for example, it states that a merge "create a
commit object in the history").

Well, that said, the same sentence as the one I propose without
"object" is fine to me, but I just don't understand the difference.

-- 
Matthieu

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

* Re: [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 21:25       ` Matthieu Moy
@ 2008-03-03 22:10         ` Nicolas Pitre
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Pitre @ 2008-03-03 22:10 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git, gitster

On Mon, 3 Mar 2008, Matthieu Moy wrote:

> Nicolas Pitre <nico@cam.org> writes:
> 
> >> Now, I don't understand the distinction you seem to be making between
> >> "commit" and "commit object".
> >
> > Objects are what the low level storage is made of.  Conceptually, The 
> > merge operation doesn't work at the object level, but rather at the 
> > history graph level.
> 
> I still don't get the distinction. What is the "graph" if not a set of
> objects pointing to each other?
> 
> If you don't want to talk about commit object, then you should fix
> also user-manual.txt (for example, it states that a merge "create a
> commit object in the history").
> 
> Well, that said, the same sentence as the one I propose without
> "object" is fine to me, but I just don't understand the difference.

Sorry.  I don't have enough free time to pursue this point, nor do I 
consider it important enough.  So if no one else feels like the 
distinction deserves to be made then I won't care anymore either.


Nicolas

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

* Re: [PATCH] Fix incorrect wording in git-merge.txt.
  2008-03-03 20:39     ` Nicolas Pitre
  2008-03-03 21:25       ` Matthieu Moy
@ 2008-03-11  7:05       ` Andreas Ericsson
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Ericsson @ 2008-03-11  7:05 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: Matthieu Moy, git, gitster

Nicolas Pitre wrote:
> On Mon, 3 Mar 2008, Matthieu Moy wrote:
> 
>> Nicolas Pitre <nico@cam.org> writes:
>>
>>> You don't really merge a commit _object_.
>>> You merge with one or more other commits, tipycally identified by a 
>>> branch name or a tag.
>> Strictly speaking, you can merge any commit, not necessarily a branch
>> or a tag. That can be "git merge 66f0a4d" or whatever. Admitedly, the
>> common case is to merge a tag or a branch (which is why I keep it in
>> parentheses).
> 
> Yes, and I've been meaning the same all along.
> 
>> Now, I don't understand the distinction you seem to be making between
>> "commit" and "commit object".
> 
> Objects are what the low level storage is made of.  Conceptually, The 
> merge operation doesn't work at the object level, but rather at the 
> history graph level.  You don't merge objects, you merge history.
> I think it is unnecessary and probably best not to 
> mention the word "object" in this case.
> 
> The alternative is to provide more detailed explanation, such as:
> 
>    A merge is made by joining one or more history line to the current 
>    'HEAD' branch.  Those history lines are denoted by their terminating 
>    commit.  To identify them, the SHA1 name of the corresponding commit 
>    object is used, or more frequently the name of the branch or tag 
>    currently pointing at such commit objects.
> 

"... The SHA1 name or, more frequently, branch- or tag-names currently
pointing to such commits are used to identify them."

commit object = meta-data containing author/committer info, one or more
                parent links and a tree object describing the state of
                the tracked content

commit = A particular point in history.

At least afaiu.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

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

end of thread, other threads:[~2008-03-11  7:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-03 17:14 [PATCH] Fix incorrect wording in git-merge.txt Matthieu Moy
2008-03-03 17:27 ` Junio C Hamano
2008-03-03 17:52 ` Matthieu Moy
2008-03-03 18:26 ` Nicolas Pitre
2008-03-03 19:50   ` Matthieu Moy
2008-03-03 20:39     ` Nicolas Pitre
2008-03-03 21:25       ` Matthieu Moy
2008-03-03 22:10         ` Nicolas Pitre
2008-03-11  7:05       ` Andreas Ericsson

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