login
Header Space

 
 

Re: git-rm isn't the inverse action of git-add

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>, Yann Dirson <ydirson@...>, Christian Jaeger <christian@...>, <git@...>
Date: Wednesday, July 4, 2007 - 4:08 pm

On Tue, Jul 03, 2007 at 15:40:12 +0200, Matthieu Moy wrote:

Hm. They all behave roughly the same: They unversion the file and unlink it,
unless it is modified, in which case they unversion it and leave it alone.

Now git has the extra complexity that index contains also content of the
file. But the behaviour can be easily adapted like this (HEAD =3D version in
HEAD, index =3D version in index, tree =3D version in tree):
 - if (HEAD =3D=3D index && index =3D=3D version) unversion and unlink
 - else if (HEAD =3D=3D index || index =3D=3D version) unversion
 - else print message and do nothing

Would you consider that a sane behaviour?

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