summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-05-06 14:45:44 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-06 14:45:44 -0700
commit8429f2b42d04a0598079c847c39d45d777613939 (patch)
tree5c4c3954173955e4cbaf1551b6757512caf324fa /cache.h
parent89d3eafe9019b407d6b2cf8913c6845bde50b178 (diff)
parentb6aec868afb17acdbd486c09602a658e14c98602 (diff)
downloadgit-8429f2b42d04a0598079c847c39d45d777613939.tar.gz
Merge branch 'bc/object-id'
Move from unsigned char[20] to struct object_id continues. * bc/object-id: match-trees: convert several leaf functions to use struct object_id tree-walk: convert tree_entry_extract() to use struct object_id struct name_entry: use struct object_id instead of unsigned char sha1[20] match-trees: convert shift_tree() and shift_tree_by() to use object_id test-match-trees: convert to use struct object_id sha1-name: introduce a get_oid() function
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index fd728f0793..160f8e32e3 100644
--- a/cache.h
+++ b/cache.h
@@ -1154,6 +1154,8 @@ extern int get_sha1_blob(const char *str, unsigned char *sha1);
extern void maybe_die_on_misspelt_object_name(const char *name, const char *prefix);
extern int get_sha1_with_context(const char *str, unsigned flags, unsigned char *sha1, struct object_context *orc);
+extern int get_oid(const char *str, struct object_id *oid);
+
typedef int each_abbrev_fn(const unsigned char *sha1, void *);
extern int for_each_abbrev(const char *prefix, each_abbrev_fn, void *);
@@ -1764,8 +1766,8 @@ int add_files_to_cache(const char *prefix, const struct pathspec *pathspec, int
extern int diff_auto_refresh_index;
/* match-trees.c */
-void shift_tree(const unsigned char *, const unsigned char *, unsigned char *, int);
-void shift_tree_by(const unsigned char *, const unsigned char *, unsigned char *, const char *);
+void shift_tree(const struct object_id *, const struct object_id *, struct object_id *, int);
+void shift_tree_by(const struct object_id *, const struct object_id *, struct object_id *, const char *);
/*
* whitespace rules.