login
Header Space

 
 

Re: Two ideas for improving git's user interface

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <junkio@...>
Cc: <git@...>, Nicolas Pitre <nico@...>, Linus Torvalds <torvalds@...>
Date: Wednesday, February 1, 2006 - 9:16 pm

On Wed, 01 Feb 2006 16:38:45 -0800, Junio C Hamano wrote:

Sorry about that. I was just trying to emphasize the new-user
confusion, and perhaps I went overboard.


I'm sorry. I didn't succeed in phrasing the question the way I
wanted. Yes, it is useful to be able to leave unrelated changes around
in the working tree. So in that sense, it is clearly useful to be able
to commit something that is different (in a repository-wide sense)
than what is in the working tree.

The question I was trying to ask is, for a _single file_ is it ever
useful to commit contents that differ from the contents of the working
directory? Let's call this a "skewed file" in the index.

I haven't used git much yet, but I found two cases for when one might
end up committing a skewed file:

1) Modification of working directory after git-update-index or git-add.

   There has been discussion in this thread already that the user can
   get a confusing commit in this case.

2) git-read-tree -m	# without -u

   The git documentation already advertises that not using -u here
   leads to confusion. This one looks historical, and it's not obvious
   to me whether git-read-tree is used in practice without -u.

So, in both of those cases the skewed files seem to lead only to
confusion. Are there any non-confusing cases where it's useful to be
able to commit a skewed file?

If not, we should be able to simplify things since a lot of the
UI complexity being discussed (-a vs. no -a, path names vs. no path
names), hinges on the handling of skewed files.


I'd be fine with some other name than "diff" if strictly necessary,
but I'm not suggesting something that makes any assumption about "git
commit -a" only. What I want is a simple way to take any "git commit"
command and be able to examine the diff that it will be committing.

My workflow has been to always perform a final review of such a diff
while composing the commit message. I'd like to be able to do that
with git.

And I think this tool would make a very good learning tool for users
trying to figure out the various commit operations, (particularly if
we end up with different semantics for merge vs. non-merge, -a vs. no
-a, path names vs. no path names, etc.).

-Carl
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Two ideas for improving git's user interface, Junio C Hamano, (Wed Feb 1, 8:38 pm)
Re: Two ideas for improving git's user interface, Carl Worth, (Wed Feb 1, 9:16 pm)
Re: Two ideas for improving git's user interface, Junio C Hamano, (Wed Feb 1, 10:25 pm)
Re: Two ideas for improving git's user interface, Carl Worth, (Fri Feb 3, 7:57 pm)
speck-geostationary