* git reset --merge misdocumented?
@ 2009-01-29 1:17 Johannes Schindelin
2009-01-30 23:20 ` Thomas Rast
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Schindelin @ 2009-01-29 1:17 UTC (permalink / raw)
To: git
Hi,
from the man page I thought that --merge would be just another way to say
"git read-tree -u -m".
In particular, the man page says _nothing_ about resetting HEAD to
something else.
Maybe somebody with l33ter dox skillz than me would like to fix that.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git reset --merge misdocumented?
2009-01-29 1:17 git reset --merge misdocumented? Johannes Schindelin
@ 2009-01-30 23:20 ` Thomas Rast
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Rast @ 2009-01-30 23:20 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
Johannes Schindelin wrote:
> from the man page I thought that --merge would be just another way to say
> "git read-tree -u -m".
Isn't that idea from the commit message? I can't find any mention of
read-tree in next's idea of the manpage.
> In particular, the man page says _nothing_ about resetting HEAD to
> something else.
It says
--merge::
Resets the index to match the tree recorded by the named commit,
and updates the files that are different between the named commit
and the current commit in the working tree.
so while the exact way of "updating" is not specified, it does mention
that you can move between commits, and that it will do something with
the difference across the move.
The example further down really cleared up the idea for me:
Undo a merge or pull inside a dirty work tree::
+
------------
$ git pull <1>
Auto-merging nitfol
Merge made by recursive.
nitfol | 20 +++++----
...
$ git reset --merge ORIG_HEAD <2>
------------
I've never used 'read-tree -u -m' except in voodoo scripting, but I'd
have done the same with 'git stash && git reset --hard ORIG_HEAD &&
git stash pop' before. The original commit message even mentions this
equivalence.
So I'm not sure what exactly needs changing there?
--
Thomas Rast
trast@{inf,student}.ethz.ch
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-30 23:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 1:17 git reset --merge misdocumented? Johannes Schindelin
2009-01-30 23:20 ` Thomas Rast
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).