##// END OF EJS Templates
git: fix index handling of removed files during commit (issue6398)...
Augie Fackler -
r45981:8e997c5d default draft
parent child Browse files
Show More
@@ -301,8 +301,10 b' class gitdirstate(object):'
301 def drop(self, f):
301 def drop(self, f):
302 index = self.git.index
302 index = self.git.index
303 index.read()
303 index.read()
304 index.remove(pycompat.fsdecode(f))
304 fs = pycompat.fsdecode(f)
305 index.write()
305 if fs in index:
306 index.remove(fs)
307 index.write()
306
308
307 def remove(self, f):
309 def remove(self, f):
308 index = self.git.index
310 index = self.git.index
@@ -270,3 +270,8 b' This covers manifest.diff()'
270 +++ b/beta Mon Jan 01 00:00:11 2007 +0000
270 +++ b/beta Mon Jan 01 00:00:11 2007 +0000
271 @@ -0,0 +1,1 @@
271 @@ -0,0 +1,1 @@
272 +beta
272 +beta
273
274
275 Deleting files should also work (this was issue6398)
276 $ hg rm beta
277 $ hg ci -m 'remove beta'
General Comments 0
You need to be logged in to leave comments. Login now