]> git.ipfire.org Git - thirdparty/git.git/blobdiff - remote.h
remote: simplify guess_remote_head()
[thirdparty/git.git] / remote.h
index a46a5be131caf1d1d71f97cab3c3ba2cebb6386c..db49ce046704a5ebc65fb2929d46e20f15599a71 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -74,6 +74,7 @@ int check_ref_type(const struct ref *ref, int flags);
 void free_refs(struct ref *ref);
 
 int resolve_remote_symref(struct ref *ref, struct ref *list);
+int ref_newer(const unsigned char *new_sha1, const unsigned char *old_sha1);
 
 /*
  * Removes and frees any duplicate refs in the map.
@@ -137,4 +138,13 @@ enum match_refs_flags {
 int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs);
 int format_tracking_info(struct branch *branch, struct strbuf *sb);
 
+struct ref *get_local_heads(void);
+
+/*
+ * Look for a ref in refs whose SHA1 matches head, first checking if
+ * refs/heads/master matches. Return NULL if nothing matches or if head
+ * is NULL.
+ */
+const struct ref *guess_remote_head(const struct ref *head,
+                                   const struct ref *refs);
 #endif