Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tree-walk.h')
-rw-r--r--tree-walk.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tree-walk.h b/tree-walk.h
index de6b95179d..8225171866 100644
--- a/tree-walk.h
+++ b/tree-walk.h
@@ -1,12 +1,12 @@
#ifndef TREE_WALK_H
#define TREE_WALK_H
-struct index_state;
-struct strbuf;
+#include "cache.h"
struct name_entry {
- const struct object_id *oid;
+ struct object_id oid;
const char *path;
+ int pathlen;
unsigned int mode;
};
@@ -20,12 +20,12 @@ static inline const struct object_id *tree_entry_extract(struct tree_desc *desc,
{
*pathp = desc->entry.path;
*modep = desc->entry.mode;
- return desc->entry.oid;
+ return &desc->entry.oid;
}
static inline int tree_entry_len(const struct name_entry *ne)
{
- return (const char *)ne->oid - ne->path - 1;
+ return ne->pathlen;
}
/*