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.
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