Skip to content

Commit

Permalink
If honor_filemode is false, ignore filemode when
Browse files Browse the repository at this point in the history
  • Loading branch information
sonologic authored and jelmer committed Jan 4, 2017
1 parent a9531cf commit 692be7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dulwich/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ def build_index_from_tree(root_path, index_path, object_store, tree_id,
honor_filemode=honor_filemode)
# Add file to index
st = os.lstat(full_path)
if not honor_filemode:
st_tuple = (entry.mode, st.st_ino, st.st_dev, st.st_nlink, st.st_uid, st.st_gid, st.st_size, st.st_atime, st.st_mtime, st.st_ctime)
st = st.__class__(st_tuple)
index[entry.path] = index_entry_from_stat(st, entry.sha, 0)

index.write()
Expand Down

0 comments on commit 692be7d

Please sign in to comment.