summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-02 22:57:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-02 22:57:26 (GMT)
commitdb400949b31a5d2cec923b4c9da710fbdd52cca2 (patch)
treee707343e71761c2a3031f4009a7db4d09c581af6 /cache.h
parent67b57a90f41aeba8486db37c2771550c0de03686 (diff)
parent823c6d56a83f3eec657a94581c23c5b7682bdaf4 (diff)
downloadgit-db400949b31a5d2cec923b4c9da710fbdd52cca2.zip
git-db400949b31a5d2cec923b4c9da710fbdd52cca2.tar.gz
git-db400949b31a5d2cec923b4c9da710fbdd52cca2.tar.bz2
Merge branch 'jk/fetch-always-update-tracking'
"git fetch origin master" unlike "git fetch origin" or "git fetch" did not update "refs/remotes/origin/master"; this was an early design decision to keep the update of remote tracking branches predictable, but in practice it turns out that people find it more convenient to opportunisticly update them whenever we have a chance, and we have been updating them when we run "git push" which already breaks the original "predictability" anyway. Now such a fetch does update refs/remotes/origin/master. * jk/fetch-always-update-tracking: fetch: don't try to update unfetched tracking refs fetch: opportunistically update tracking refs refactor "ref->merge" flag fetch/pull doc: untangle meaning of bare <ref> t5510: start tracking-ref tests from a known state
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 7ce9061..df532f8 100644
--- a/cache.h
+++ b/cache.h
@@ -1025,9 +1025,21 @@ struct ref {
unsigned int
force:1,
forced_update:1,
- merge:1,
deletion:1,
matched:1;
+
+ /*
+ * Order is important here, as we write to FETCH_HEAD
+ * in numeric order. And the default NOT_FOR_MERGE
+ * should be 0, so that xcalloc'd structures get it
+ * by default.
+ */
+ enum {
+ FETCH_HEAD_MERGE = -1,
+ FETCH_HEAD_NOT_FOR_MERGE = 0,
+ FETCH_HEAD_IGNORE = 1
+ } fetch_head_status;
+
enum {
REF_STATUS_NONE = 0,
REF_STATUS_OK,