login
Header Space

 
 

Re: [PATCH] git-revert is one of the most misunderstood command in git, help users out.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Steven Grimm <koreth@...>, Pierre Habouzit <madcoder@...>, <git@...>
Date: Tuesday, November 6, 2007 - 8:25 am

Hi,

On Tue, 6 Nov 2007, Junio C Hamano wrote:


Yes, but Pierre also said earlier that people want to revert their local 
changes.  And the logical thing to try that really is

	git revert <path>

Now, if you read that out in English, it does not make too much sense: 
"revert the path" (not "revert the _changes_ to that file").  But it is 
what people try to do.

However, IIUC another thing Pierre mentioned is that

	$scm revert <commit> <path>

commonly means "revert the file _to the version_ stored in <commit>".  
This is just different enough from "revert the _changes_ to that file 
stored in <commit>" to bite people, no?


FWIW I really wanted to use the merge-file machinery, not the 
merge-recursive one.  But since "<path>" can be a directory, too, I was 
mistaken, and you are correct, as always.


I was planning to put cmd_checkout() into builtin-reset.c for that reason.

But first things first, that "git remote prune" with --mirror'ed 
repositories misbehaviour annoys me just enough that I started converting 
this script first.  It has been stable enough for quite a long time, and 
the script now shows its limitations.

Besides, remote.[ch] makes it easy, even if not _really_ easy.

Ciao,
Dscho

-
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: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Mon Nov 5, 7:40 pm)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Tue Nov 6, 8:25 am)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Tue Nov 6, 8:16 am)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Mon Nov 5, 11:18 pm)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Tue Nov 6, 8:32 am)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Tue Nov 6, 6:25 pm)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Wed Nov 7, 7:08 am)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Tue Nov 6, 2:27 pm)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Johannes Schindelin, (Tue Nov 6, 6:21 pm)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Alejandro Martinez Ruiz, (Mon Nov 5, 5:54 pm)
Re: [PATCH] git-revert is one of the most misunderstood comm..., Alejandro Martinez Ruiz, (Mon Nov 5, 7:41 pm)
speck-geostationary