Re: 'read-tree -m head' vs 'read-tree head'
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 3, 2005, 19:13 UTC
- Message-ID
- <7vbr7sw2aj.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20050503124935.GT25004@cip.informatik.uni-erlangen.de>
The form "git-read-tree <tree>" does not care what the original cache contained and builds the cache from scratch. On the other hand, "git-read-tree -m <tree>" uses what the original cache contained to speed things up in later checkout-cache. That's the official version of difference description.
That said, I've been wondering if "git-read-tree -m <tree>" always does the same thing (but only making the operation afterwards faster) as "git-read-tree <tree>". That is, if there is a valid use case where you would want to use it without "-m" because "-m" does something wrong. If there is no such valid use case probably we should always do "-m" version if we are reading only one tree, practically deprecating "-m" flag to the same status as "-r" flag to git-diff-cache.
However, I have not had time to think things through and have not bugged Linus about it myself.