From: Junio C Hamano Date: Sun, 2 Jun 2013 22:57:26 +0000 (-0700) Subject: Merge branch 'jk/fetch-always-update-tracking' X-Git-Tag: v1.8.4-rc0~229 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/db400949b31a5d2cec923b4c9da710fbdd52cca2?hp=-c 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 t5510: start tracking-ref tests from a known state --- db400949b31a5d2cec923b4c9da710fbdd52cca2 diff --combined cache.h index 7ce9061137,9670d99f2b..df532f8e4a --- a/cache.h +++ b/cache.h @@@ -910,7 -910,6 +910,7 @@@ void show_date_relative(unsigned long t struct strbuf *timebuf); int parse_date(const char *date, char *buf, int bufsize); int parse_date_basic(const char *date, unsigned long *timestamp, int *offset); +int parse_expiry_date(const char *date, unsigned long *timestamp); void datestamp(char *buf, int bufsize); #define approxidate(s) approxidate_careful((s), NULL) unsigned long approxidate_careful(const char *, int *); @@@ -1025,9 -1024,21 +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,