diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-17 15:24:48 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-17 15:24:48 +0100 |
commit | a1e6234c27abf041e4c8cd1a799950e7cd9104f6 (patch) | |
tree | 3e39fa29ea1478f9a31f378a25bd9c58bb71ed91 /lib/git/index/fun.py | |
parent | b03933057df80ea9f860cc616eb7733f140f866e (diff) | |
download | gitpython-a1e6234c27abf041e4c8cd1a799950e7cd9104f6.tar.gz |
Inital implementation of Submodule.move including a very simple and to-be-improved test
Diffstat (limited to 'lib/git/index/fun.py')
-rw-r--r-- | lib/git/index/fun.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/git/index/fun.py b/lib/git/index/fun.py index b05344a8..87fdf1a9 100644 --- a/lib/git/index/fun.py +++ b/lib/git/index/fun.py @@ -30,6 +30,7 @@ from typ import ( CE_NAMEMASK, CE_STAGESHIFT ) +CE_NAMEMASK_INV = ~CE_NAMEMASK from util import ( pack, @@ -84,7 +85,7 @@ def write_cache(entries, stream, extension_data=None, ShaStreamCls=IndexFileSHA1 path = entry[3] plen = len(path) & CE_NAMEMASK # path length assert plen == len(path), "Path %s too long to fit into index" % entry[3] - flags = plen | entry[2] + flags = plen | (entry[2] & CE_NAMEMASK_INV) # clear possible previous values write(pack(">LLLLLL20sH", entry[6], entry[7], entry[0], entry[8], entry[9], entry[10], entry[1], flags)) write(path) |