Re: [RFC][PATCH] Re: git-rm isn't the inverse action of git-add

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matthieu Moy
Date: Friday, July 13, 2007 - 10:36 am

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:


OK, I've been thinking about it for some time (not having time to hack
can be good, it lets time for thinking instead ;-) ).

I'm actually still not convinced that my proposal was wrong, but I
think we disagree because we disagree on what is a "failure". I
consider leaving the file in the working tree to be just a safety
precaution, not a failure, and to me, it's OK to do that only for the
files that need it.

Fixing my patch by just "applying the same strategy to all files"
would be wrong: leaving _all_ the files on disk when just one has
local modifications is very misleading, and if the user notices it
after running the command, he or she does not always have an easy way
to get back to a clean situation (re-running the same command with -f
wouldn't work for example).

So, I went a shorter way from the current semantics:

* Allow --cached in more situations, so that -f is really needed in
  very particular situation (as I mentionned above, forcing -f too
  often means the -f gets hardcoded in the fingers, and makes it
  useless).

* Better error message, which points to --cached in addition to -f.

That's very close to what bzr does, BTW.

Drawback: it still doesn't solve the "rm isn't the inverse of add".

The patch is quite straightforward, and will be in a followup email.

-- 
Matthieu
-
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:
git-rm isn't the inverse action of git-add, Christian Jaeger, (Mon Jul 2, 11:09 am)
Re: git-rm isn't the inverse action of git-add, Yann Dirson, (Mon Jul 2, 12:42 pm)
Re: git-rm isn't the inverse action of git-add, Christian Jaeger, (Mon Jul 2, 1:23 pm)
Re: git-rm isn't the inverse action of git-add, Yann Dirson, (Mon Jul 2, 1:40 pm)
Re: git-rm isn't the inverse action of git-add, Matthieu Moy, (Mon Jul 2, 1:54 pm)
Re: git-rm isn't the inverse action of git-add, Johannes Schindelin, (Mon Jul 2, 2:05 pm)
Re: git-rm isn't the inverse action of git-add, Christian Jaeger, (Mon Jul 2, 2:20 pm)
Re: git-rm isn't the inverse action of git-add, Jeff King, (Mon Jul 2, 9:12 pm)
Re: git-rm isn't the inverse action of git-add, Junio C Hamano, (Mon Jul 2, 9:47 pm)
Re: git-rm isn't the inverse action of git-add, Jeff King, (Mon Jul 2, 9:59 pm)
Re: git-rm isn't the inverse action of git-add, Junio C Hamano, (Mon Jul 2, 10:09 pm)
Re: git-rm isn't the inverse action of git-add, Jeff King, (Mon Jul 2, 10:12 pm)
Re: git-rm isn't the inverse action of git-add, Junio C Hamano, (Mon Jul 2, 11:26 pm)
Re: git-rm isn't the inverse action of git-add, Matthieu Moy, (Tue Jul 3, 3:37 am)
Re: git-rm isn't the inverse action of git-add, Johannes Schindelin, (Tue Jul 3, 5:09 am)
Re: git-rm isn't the inverse action of git-add, Matthieu Moy, (Tue Jul 3, 6:40 am)
Re: git-rm isn't the inverse action of git-add, Johannes Schindelin, (Tue Jul 3, 7:21 am)
Re: git-rm isn't the inverse action of git-add, Jan Hudec, (Wed Jul 4, 1:08 pm)
Re: git-rm isn't the inverse action of git-add, Matthieu Moy, (Thu Jul 5, 6:44 am)
Re: [RFC][PATCH] Re: git-rm isn't the inverse action of gi ..., Johannes Schindelin, (Sun Jul 8, 11:10 am)
Re: [RFC][PATCH] Re: git-rm isn't the inverse action of gi ..., Johannes Schindelin, (Sun Jul 8, 2:49 pm)
Re: [RFC][PATCH] Re: git-rm isn't the inverse action of gi ..., Matthieu Moy, (Fri Jul 13, 10:36 am)