git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: linux@horizon.com
Cc: git@vger.kernel.org
Subject: Re: More merge questions (why doesn't this work?)
Date: Fri, 02 Dec 2005 02:12:42 -0800	[thread overview]
Message-ID: <7vacfj6c4l.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20051202091946.1631.qmail@science.horizon.com> (linux@horizon.com's message of "2 Dec 2005 04:19:46 -0500")

linux@horizon.com writes:

> Which should be case 10 of the t/t1000-read-tree-m-3way.sh
> table and succeed.

Yes.  The reason is git-read-tree's behaviour was changed
underneath while octopus was looking elsewhere ;-).  See
Documentation/technical/trivial-merge.txt, last couple of
lines.

There are two schools of thoughts about "both sides remove"
(case #10) case.  Some people argued that "the branches might
have renamed that path to different paths and might indicate a
rename/rename conflict" (meaning read-tree should not consider
it trivial, and leave that to upper level "policy layer" to
decide).  merge-one-file policy simply says "no, they both
wanted to remove them".  If I recall correctly, read-tree itself
merged this case before multi-base rewrite happened (if you are
curious, run 'git whatchanged -p read-tree.c' and look for
"Rewrite read-tree").

> 1) The MAJOR difference between "git checkout" and "git reset --hard"

True.  "git reset --hard" should be used without <rev> by
novices and with <rev> after they understand what they are
doing (it is used for rewinding/warping heads).

> 2) Don't use "git branch" to create branches, unless you really
>    *don't* want to switch to them.  Use "git checkout -b".

Because...?  "git branch foo && git checkout foo" may be
suboptimal to type, but it is not _wrong_; it does not do
anything bad or incorrect.

> 3) Dumb question: why does "git-commit-tree" need "-p" before the
>    parent commit arguments?  Isn't just argv[2]..argv[argc-1]
>    good enough?

1. Why not?

2. I myself wondered about it long time ago.

3. It does not matter; nobody types that command by hand.

4. It allows us to later add some other flags to commit-tree
   (none planned currently).

> 4) If the "git-read-tree" docs for "--reset", does "ignored" mean
>    "not overwritten" or "overwritten"?

That sentence is very poorly written; a better paraphrasing is
appreciated.

	$ git whatchanged -S--reset \
        	read-tree.c Documentation/git-read-tree.txt 

shows logs for 438195ccedce7270cf5ba167a940c90467cb72d7 commit
(run "git-cat-file commit 438195cc" to read it).  It ignores
existing unmerged entries when reconstructing the index from the
given tree ("git-read-tree -m", given an unmerged index, refuses
to operate, but "--reset" *ignores* the unmerged ones hence it
does not refuse to operate).

> 5) The final "error" message on "git-merge --no-commit" is a bit
>    alarming for a newbie who uses it...

First of all, --no-commit is not meant to be used by newbies,
but you are right.  Patches to make the failure message
conditional are welcome.  It should switch on these three cases:

 - "--no-commit" option is given, but a merge conflict would
   have prevented autocommit anyway;

 - "--no-commit" option is given, but automerge succeeded;

 - conflict prevented autocommit.

> 6) The "pickaxe" options are being a bit confusing, and the fact they're
>    only documented in cvs-migration.txt doesn't help.

Docs of git-diff-* family have OPTIONS section, at the end of
which refers you to the diffcore documentation.  Suggestions to
a better organization and a patch is appropriate here.

> 7) The git-tag man page could use a little better description of -a.

Please.  It should have the same "OPTIONS" section as others do.

  reply	other threads:[~2005-12-02 10:13 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-28 23:42 git-name-rev off-by-one bug linux
2005-11-29  5:54 ` Junio C Hamano
2005-11-29  8:05   ` linux
2005-11-29  9:29     ` Junio C Hamano
2005-11-30  8:37       ` Junio C Hamano
2005-11-29 10:31     ` Petr Baudis
2005-11-29 18:46       ` Junio C Hamano
2005-12-04 21:34         ` Petr Baudis
2005-12-08  6:34           ` as promised, docs: git for the confused linux
2005-12-08 21:53             ` Junio C Hamano
2005-12-08 22:02               ` H. Peter Anvin
2005-12-09  0:47             ` Alan Chandler
2005-12-09  1:45               ` Petr Baudis
2005-12-09  1:19             ` Josef Weidendorfer
2005-11-29 21:40       ` git-name-rev off-by-one bug linux
2005-11-29 23:14         ` Junio C Hamano
2005-11-30  0:15           ` linux
2005-11-30  0:53             ` Junio C Hamano
2005-11-30  1:27               ` Junio C Hamano
2005-11-30  1:51             ` Linus Torvalds
2005-11-30  2:06               ` Junio C Hamano
2005-11-30  2:33               ` Junio C Hamano
2005-11-30  3:12                 ` Linus Torvalds
2005-11-30  5:06                   ` Linus Torvalds
2005-11-30  5:51                     ` Junio C Hamano
2005-11-30  6:11                       ` Junio C Hamano
2005-11-30 16:13                         ` Linus Torvalds
2005-11-30 16:08                       ` Linus Torvalds
2005-12-02  8:25                       ` Junio C Hamano
2005-12-02  9:14                         ` [PATCH] merge-one-file: make sure we create the merged file Junio C Hamano
2005-12-02  9:15                         ` [PATCH] merge-one-file: make sure we do not mismerge symbolic links Junio C Hamano
2005-12-02  9:16                         ` [PATCH] git-merge documentation: conflicting merge leaves higher stages in index Junio C Hamano
2005-11-30  6:09                     ` git-name-rev off-by-one bug linux
2005-11-30  6:39                       ` Junio C Hamano
2005-11-30 13:10                         ` More merge questions linux
2005-11-30 18:37                           ` Daniel Barkalow
2005-11-30 20:23                           ` Junio C Hamano
2005-12-02  9:19                             ` More merge questions (why doesn't this work?) linux
2005-12-02 10:12                               ` Junio C Hamano [this message]
2005-12-02 13:09                                 ` Sven Verdoolaege
2005-12-02 20:32                                   ` Junio C Hamano
2005-12-05 15:01                                     ` Sven Verdoolaege
2005-12-02 11:37                               ` linux
2005-12-02 20:31                                 ` Junio C Hamano
2005-12-02 21:32                                   ` linux
2005-12-02 22:00                                     ` Junio C Hamano
2005-12-02 22:12                                     ` Linus Torvalds
2005-12-02 23:14                                       ` linux
2005-12-02 21:56                                   ` More merge questions linux
2005-11-30 16:12                       ` git-name-rev off-by-one bug Linus Torvalds
2005-11-30  7:18                   ` Junio C Hamano
2005-11-30  9:05                     ` Junio C Hamano
2005-11-30  9:42                     ` Junio C Hamano
2005-11-30  3:15                 ` linux
2005-11-30 18:11               ` Daniel Barkalow
2005-11-30 17:46   ` Daniel Barkalow
2005-11-30 20:05     ` Junio C Hamano
2005-11-30 21:06       ` Daniel Barkalow
2005-11-30 22:00         ` Junio C Hamano
2005-11-30 23:12           ` Daniel Barkalow
2005-12-01  7:46             ` Junio C Hamano
2005-12-01 10:14 ` Junio C Hamano
2005-12-01 21:50   ` Petr Baudis
2005-12-01 21:53     ` Randal L. Schwartz

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=7vacfj6c4l.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=linux@horizon.com \
    /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).