ident: add the ability to provide a "fallback identity"
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 8ac4adb3644f789ef644c630a2ab1bb86941fd61..611e554dea0c2065d4f376f6710e71f586aead28 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -661,6 +661,9 @@ extern int daemonize(void);
 /* Initialize and use the cache information */
 struct lock_file;
 extern int read_index(struct index_state *);
+extern void preload_index(struct index_state *index,
+                         const struct pathspec *pathspec,
+                         unsigned int refresh_flags);
 extern int read_index_preload(struct index_state *,
                              const struct pathspec *pathspec,
                              unsigned int refresh_flags);
@@ -1330,6 +1333,7 @@ struct object_context {
        GET_OID_BLOB)
 
 extern int get_oid(const char *str, struct object_id *oid);
+extern int get_oidf(struct object_id *oid, const char *fmt, ...);
 extern int get_oid_commit(const char *str, struct object_id *oid);
 extern int get_oid_committish(const char *str, struct object_id *oid);
 extern int get_oid_tree(const char *str, struct object_id *oid);
@@ -1487,6 +1491,11 @@ extern const char *git_sequence_editor(void);
 extern const char *git_pager(int stdout_is_tty);
 extern int is_terminal_dumb(void);
 extern int git_ident_config(const char *, const char *, void *);
+/*
+ * Prepare an ident to fall back on if the user didn't configure it.
+ * Must be called before any other function from the ident API.
+ */
+void prepare_fallback_ident(const char *name, const char *email);
 extern void reset_ident_date(void);
 
 struct ident_split {