]> git.ipfire.org Git - thirdparty/git.git/blobdiff - remote.h
First batch
[thirdparty/git.git] / remote.h
index eb62a470442815dca70cd3cbbb67d2419417fe0e..3211abdf05ceef275309053af0dafc06f51fbb13 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -107,12 +107,20 @@ struct ref {
        struct object_id new_oid;
        struct object_id old_oid_expect; /* used by expect-old */
        char *symref;
+       char *tracking_ref;
        unsigned int
                force:1,
                forced_update:1,
                expect_old_sha1:1,
                exact_oid:1,
-               deletion:1;
+               deletion:1,
+               /* Need to check if local reflog reaches the remote tip. */
+               check_reachable:1,
+               /*
+                * Store the result of the check enabled by "check_reachable";
+                * implies the local reflog does not reach the remote tip.
+                */
+               unreachable:1;
 
        enum {
                REF_NOT_MATCHED = 0, /* initial value */
@@ -142,6 +150,7 @@ struct ref {
                REF_STATUS_REJECT_NEEDS_FORCE,
                REF_STATUS_REJECT_STALE,
                REF_STATUS_REJECT_SHALLOW,
+               REF_STATUS_REJECT_REMOTE_UPDATED,
                REF_STATUS_UPTODATE,
                REF_STATUS_REMOTE_REJECT,
                REF_STATUS_EXPECTING_REPORT,
@@ -202,6 +211,12 @@ int resolve_remote_symref(struct ref *ref, struct ref *list);
  */
 struct ref *ref_remove_duplicates(struct ref *ref_map);
 
+/*
+ * Remove all entries in the input list which match any negative refspec in
+ * the refspec list.
+ */
+struct ref *apply_negative_refspecs(struct ref *ref_map, struct refspec *rs);
+
 int query_refspecs(struct refspec *rs, struct refspec_item *query);
 char *apply_refspecs(struct refspec *rs, const char *name);
 
@@ -214,7 +229,8 @@ void set_ref_status_for_push(struct ref *remote_refs, int send_mirror,
 /*
  * Given a list of the remote refs and the specification of things to
  * fetch, makes a (separate) list of the refs to fetch and the local
- * refs to store into.
+ * refs to store into. Note that negative refspecs are ignored here, and
+ * should be handled separately.
  *
  * *tail is the pointer to the tail pointer of the list of results
  * beforehand, and will be set to the tail pointer of the list of
@@ -341,6 +357,7 @@ struct ref *get_stale_heads(struct refspec *rs, struct ref *fetch_map);
 
 struct push_cas_option {
        unsigned use_tracking_for_rest:1;
+       unsigned use_force_if_includes:1;
        struct push_cas {
                struct object_id expect;
                unsigned use_tracking:1;