summaryrefslogtreecommitdiff
path: root/refspec.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-10-05 14:01:54 -0700
committerJunio C Hamano <gitster@pobox.com>2020-10-05 14:01:54 -0700
commit8e3ec76a20d6abf5dd8ceb3f5f2c157000e4c13e (patch)
tree816c5dc42c7dc8cac732c804b8e99775806bb5dc /refspec.h
parentf6b06b459092520bd90e5a191589e2d4371ef7d1 (diff)
parentc0192df6306d4d9ad77f6015a053925b13155834 (diff)
downloadgit-8e3ec76a20d6abf5dd8ceb3f5f2c157000e4c13e.tar.gz
Merge branch 'jk/refspecs-negative'
"git fetch" and "git push" support negative refspecs. * jk/refspecs-negative: refspec: add support for negative refspecs
Diffstat (limited to 'refspec.h')
-rw-r--r--refspec.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/refspec.h b/refspec.h
index 7569248d11..9551832399 100644
--- a/refspec.h
+++ b/refspec.h
@@ -5,12 +5,13 @@
extern const struct refspec_item *tag_refspec;
/**
- * A struct refspec_item holds the parsed interpretation of a refspec. If it will
- * force updates (starts with a '+'), force is true. If it is a pattern
- * (sides end with '*') pattern is true. src and dest are the two sides
- * (including '*' characters if present); if there is only one side, it is src,
- * and dst is NULL; if sides exist but are empty (i.e., the refspec either
- * starts or ends with ':'), the corresponding side is "".
+ * A struct refspec_item holds the parsed interpretation of a refspec. If it
+ * will force updates (starts with a '+'), force is true. If it is a pattern
+ * (sides end with '*') pattern is true. If it is a negative refspec, (starts
+ * with '^'), negative is true. src and dest are the two sides (including '*'
+ * characters if present); if there is only one side, it is src, and dst is
+ * NULL; if sides exist but are empty (i.e., the refspec either starts or ends
+ * with ':'), the corresponding side is "".
*
* remote_find_tracking(), given a remote and a struct refspec_item with either src
* or dst filled out, will fill out the other such that the result is in the
@@ -22,6 +23,7 @@ struct refspec_item {
unsigned pattern : 1;
unsigned matching : 1;
unsigned exact_sha1 : 1;
+ unsigned negative : 1;
char *src;
char *dst;