Merge branch 'jc/magic-pathspec'
* jc/magic-pathspec: setup.c: Fix some "symbol not declared" sparse warnings t3703: Skip tests using directory name ":" on Windows revision.c: leave a note for "a lone :" enhancement t3703, t4208: add test cases for magic pathspec rev/path disambiguation: further restrict "misspelled index entry" diag fix overslow :/no-such-string-ever-existed diagnostics fix overstrict :<path> diagnosis grep: use get_pathspec() correctly pathspec: drop "lone : means no pathspec" from get_pathspec() Revert "magic pathspec: add ":(icase)path" to match case insensitively" magic pathspec: add ":(icase)path" to match case insensitively magic pathspec: futureproof shorthand form magic pathspec: add tentative ":/path/from/top/level" pathspec support
This commit is contained in:
8
cache.h
8
cache.h
@ -810,15 +810,15 @@ struct object_context {
|
||||
};
|
||||
|
||||
extern int get_sha1(const char *str, unsigned char *sha1);
|
||||
extern int get_sha1_with_mode_1(const char *str, unsigned char *sha1, unsigned *mode, int gently, const char *prefix);
|
||||
extern int get_sha1_with_mode_1(const char *str, unsigned char *sha1, unsigned *mode, int only_to_die, const char *prefix);
|
||||
static inline int get_sha1_with_mode(const char *str, unsigned char *sha1, unsigned *mode)
|
||||
{
|
||||
return get_sha1_with_mode_1(str, sha1, mode, 1, NULL);
|
||||
return get_sha1_with_mode_1(str, sha1, mode, 0, NULL);
|
||||
}
|
||||
extern int get_sha1_with_context_1(const char *name, unsigned char *sha1, struct object_context *orc, int gently, const char *prefix);
|
||||
extern int get_sha1_with_context_1(const char *name, unsigned char *sha1, struct object_context *orc, int only_to_die, const char *prefix);
|
||||
static inline int get_sha1_with_context(const char *str, unsigned char *sha1, struct object_context *orc)
|
||||
{
|
||||
return get_sha1_with_context_1(str, sha1, orc, 1, NULL);
|
||||
return get_sha1_with_context_1(str, sha1, orc, 0, NULL);
|
||||
}
|
||||
extern int get_sha1_hex(const char *hex, unsigned char *sha1);
|
||||
extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */
|
||||
|
||||
Reference in New Issue
Block a user