Skip to content

Commit

Permalink
use .zit directory
Browse files Browse the repository at this point in the history
Make it a little harder to trash a real git repository
  • Loading branch information
Joe Mou committed Apr 12, 2019
1 parent fffddd9 commit d2ec6fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .zit
2 changes: 1 addition & 1 deletion cat-file
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import zlib

required_type, sha1 = sys.argv[1:]
# sha1_file.c:sha1_file_name
filename = '.git/objects/{}/{}'.format(sha1[:2], sha1[2:])
filename = '.zit/objects/{}/{}'.format(sha1[:2], sha1[2:])
decompressed = zlib.decompress(open(filename).read())
header, contents = decompressed.split('\0', 1)
actual_type, length = header.split(' ')
Expand Down

0 comments on commit d2ec6fc

Please sign in to comment.