git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC] git-diff-cache sans --cached and unmerged paths
@ 2005-05-02 23:21 Junio C Hamano
  2005-05-03  4:23 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2005-05-02 23:21 UTC (permalink / raw
  To: Linus Torvalds; +Cc: git

Linus, 

    git-diff-cache without --cached says 'U filename" (or
"unmerged filename") when working with an unmerged cache entry.
Since the form without --cached is to mean "look at the work
tree", I think it should be changed to report the mode and the
magic 0{40} SHA1.  What do you think?

I was manually fixing up a merge and I wanted to compare the
merge result in the work tree with the pre-merge HEAD version
from either heads, but this behaviour (yes I am the guilty one)
makes it cumbersome, and that is the reason behind this
question.

BTW, when you have a chance, could you please give the
executable bit to git-apply-patch-script, pretty please.  This
is my fourth attempt ;-).



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

* Re: [RFC] git-diff-cache sans --cached and unmerged paths
  2005-05-02 23:21 [RFC] git-diff-cache sans --cached and unmerged paths Junio C Hamano
@ 2005-05-03  4:23 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2005-05-03  4:23 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git



On Mon, 2 May 2005, Junio C Hamano wrote:
> 
>     git-diff-cache without --cached says 'U filename" (or "unmerged
> filename") when working with an unmerged cache entry. Since the form
> without --cached is to mean "look at the work tree", I think it should
> be changed to report the mode and the magic 0{40} SHA1.  What do you
> think?

Hmm.. I like the "it's unmerged, so we report it that way" thing, but on 
the other hand, what you describe as your workflow:

> I was manually fixing up a merge and I wanted to compare the
> merge result in the work tree with the pre-merge HEAD version
> from either heads, but this behaviour (yes I am the guilty one)
> makes it cumbersome, and that is the reason behind this
> question.

This seems to make sense as a workflow perspective, so I guess I'll have 
to agree. A unmerged file that exists in the working tree should probably 
get reported as the working tree version, not as unmerged.

If it's not in the working tree at all, I'd assume that "U" is the right 
thing to do (and obviously, with "--cached" there is no question about 
it).

> BTW, when you have a chance, could you please give the
> executable bit to git-apply-patch-script, pretty please.  This
> is my fourth attempt ;-).

I just sent you a description of the problem I had with your tree, so 
maybe fifth time lucky..

		Linus

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

end of thread, other threads:[~2005-05-03  4:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 23:21 [RFC] git-diff-cache sans --cached and unmerged paths Junio C Hamano
2005-05-03  4:23 ` Linus Torvalds

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).