X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=cmd%2Findex-cmd.py;h=f5ab59252eb30bacf3c11381d1a8e9cf808e9788;hb=a79de5af5c6fcdf730a94ae8d1b839dfbbc2dc59;hp=c2a22f913aa64bd2fe83f4a6b68812ed5837613b;hpb=dee2d8f09fc29be74c3d4a0896944c4dde2c2f44;p=bup.git diff --git a/cmd/index-cmd.py b/cmd/index-cmd.py index c2a22f9..f5ab592 100755 --- a/cmd/index-cmd.py +++ b/cmd/index-cmd.py @@ -150,7 +150,8 @@ def update_index(top, excluded_paths, exclude_rxs, xdev_exceptions, out=None): need_repack = True if not (rig.cur.flags & index.IX_HASHVALID): if fake_hash: - rig.cur.gitmode, rig.cur.sha = fake_hash(path) + if rig.cur.sha == index.EMPTY_SHA: + rig.cur.gitmode, rig.cur.sha = fake_hash(path) rig.cur.flags |= index.IX_HASHVALID need_repack = True if opt.fake_invalid: