@matheusbsbs / matheus-bagliano / commits / 3bc1eca91e
Fork 0

Remove unused "zeropad" entry from tree_list_entry

That was a hack, only needed because 'git fsck-objects' didn't look at the raw tree format. Now that fsck traverses the tree itself, we can drop it. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Linus Torvalds committed May 29, 2006 at 12:19 UTC 3bc1eca91e5230739cfb488e63fae35a166a07de
2 files changed +1 -3
tree.c
+1 -2
@@ -217,6 +217,7 @@ struct tree_entry_list *create_tree_entry_list(struct tree *tree)
217 struct tree_entry_list *entry;
218
219 sha1 = tree_entry_extract(&desc, &path, &mode);
220 + update_tree_entry(&desc);
221
222 entry = xmalloc(sizeof(struct tree_entry_list));
223 entry->name = path;
@@ -225,10 +226,8 @@ struct tree_entry_list *create_tree_entry_list(struct tree *tree)
226 entry->directory = S_ISDIR(mode) != 0;
227 entry->executable = (mode & S_IXUSR) != 0;
228 entry->symlink = S_ISLNK(mode) != 0;
228 - entry->zeropad = *(const char *)(desc.buf) == '0';
229 entry->next = NULL;
230
231 - update_tree_entry(&desc);
231 *list_p = entry;
232 list_p = &entry->next;
233 }
tree.h
-1
@@ -10,7 +10,6 @@ struct tree_entry_list {
10 unsigned directory : 1;
11 unsigned executable : 1;
12 unsigned symlink : 1;
13 - unsigned zeropad : 1;
13 unsigned int mode;
14 const char *name;
15 const unsigned char *sha1;