login
Header Space

 
 

Re: Two ideas for improving git's user interface

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Carl Worth <cworth@...>
Cc: <git@...>, Nicolas Pitre <nico@...>, Linus Torvalds <torvalds@...>
Date: Wednesday, February 1, 2006 - 8:38 pm

Carl Worth <cworth@cworth.org> writes:


I do not think you have to make it sound *that* negative.  I
agree it may be counterintuitive until the user groks the index.

Let's assume that we will fix things to (1) require "--also" (or
"--incremental") to get the current "git commit paths..."
behaviour, (2) without any arguments we commit the index as is,
(3) with explicit paths we commit clean HEAD plus only specified
paths using a temporary index.  I think a fairer way to say what
you said would be:

        Always use -a, or explicit paths.  With -a all of your
        changes in the working tree are committed.  With paths,
        only changes to those paths are committed.

        Once you are comfortable with making commits this way,
        you might want to learn about index file and then start
        using 'git commit' without any argument.  This works in
        a way that cannot be understood until you learn how the
        index file works, so stick to "-a or explicit paths"
        rule for now.  That rule is good enough for everyday
        use.

And you can probably go a long way without ever knowing about
index.  Initially when I wrote the above two paragraphs, I said
"appreciated" instead of "understood".  But depending on your
workflow, you may not even need what "git commit" without
arguments would give you, in which case there is nothing to
appreciate about, so I changed the wording.

Old-timer git people seem to like what it gives them but that
does not mean everybody should marvel at what it does and adopt
the workflow to take advantage of the index file.


What that means is people should always do "git commit -a".  Not
even "git commit paths...".  It matches _my_ sense of developer
discipline, especially for individual developers, but it is a
rather cumbersome straightjacket if enforced upon you in
practice.  It is a useful timesaver to be able to leave
unrelated changes around in the working tree.


I think I've already done this a couple of times today.

Your "git diff" is interesting, but I'd rather make them
completely separate command from "git diff".  Perhaps "git
ndiff" and "git ncommit", that assumes there is nothing but "git
commit -a" kind of commits.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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