From: Junio C Hamano Date: Wed, 16 Mar 2011 23:47:26 +0000 (-0700) Subject: Merge branch 'jh/push-default-upstream-configname' into maint X-Git-Tag: v1.7.4.2~22 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/61a6f1faecf19d7727bdfae012a14747c672cb1a?ds=sidebyside;hp=-c Merge branch 'jh/push-default-upstream-configname' into maint * jh/push-default-upstream-configname: push.default: Rename 'tracking' to 'upstream' --- 61a6f1faecf19d7727bdfae012a14747c672cb1a diff --combined Documentation/config.txt index 84e308fce5,c995a1a47b..701fba92dc --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -376,6 -376,15 +376,6 @@@ core.warnAmbiguousRefs: If true, git will warn you if the ref name you passed it is ambiguous and might match multiple refs in the .git/refs/ tree. True by default. -core.abbrevguard:: - Even though git makes sure that it uses enough hexdigits to show - an abbreviated object name unambiguously, as more objects are - added to the repository over time, a short name that used to be - unique will stop being unique. Git uses this many extra hexdigits - that are more than necessary to make the object name currently - unique, in the hope that its output will stay unique a bit longer. - Defaults to 0. - core.compression:: An integer -1..9, indicating a default compression level. -1 is the zlib default. 0 means no compression, @@@ -1582,7 -1591,8 +1582,8 @@@ push.default: * `matching` - push all matching branches. All branches having the same name in both ends are considered to be matching. This is the default. - * `tracking` - push the current branch to its upstream branch. + * `upstream` - push the current branch to its upstream branch. + * `tracking` - deprecated synonym for `upstream`. * `current` - push the current branch to a branch of the same name. rebase.stat:: diff --combined cache.h index 39ca875fb5,7acf120126..c782495a8f --- a/cache.h +++ b/cache.h @@@ -545,6 -545,7 +545,6 @@@ extern int assume_unchanged extern int prefer_symlink_refs; extern int log_all_ref_updates; extern int warn_ambiguous_refs; -extern int unique_abbrev_extra_length; extern int shared_repository; extern const char *apply_default_whitespace; extern const char *apply_default_ignorewhitespace; @@@ -570,7 -571,7 +570,7 @@@ extern enum safe_crlf safe_crlf enum auto_crlf { AUTO_CRLF_FALSE = 0, AUTO_CRLF_TRUE = 1, - AUTO_CRLF_INPUT = -1, + AUTO_CRLF_INPUT = -1 }; extern enum auto_crlf auto_crlf; @@@ -607,7 -608,7 +607,7 @@@ enum rebase_setup_type enum push_default_type { PUSH_DEFAULT_NOTHING = 0, PUSH_DEFAULT_MATCHING, - PUSH_DEFAULT_TRACKING, + PUSH_DEFAULT_UPSTREAM, PUSH_DEFAULT_CURRENT }; @@@ -675,11 -676,9 +675,11 @@@ static inline void hashclr(unsigned cha #define EMPTY_TREE_SHA1_HEX \ "4b825dc642cb6eb9a060e54bf8d69288fbee4904" -#define EMPTY_TREE_SHA1_BIN \ +#define EMPTY_TREE_SHA1_BIN_LITERAL \ "\x4b\x82\x5d\xc6\x42\xcb\x6e\xb9\xa0\x60" \ "\xe5\x4b\xf8\xd6\x92\x88\xfb\xee\x49\x04" +#define EMPTY_TREE_SHA1_BIN \ + ((const unsigned char *) EMPTY_TREE_SHA1_BIN_LITERAL) int git_mkstemp(char *path, size_t n, const char *template); diff --combined config.c index 3dd55d507b,9184900fb4..822ef8365c --- a/config.c +++ b/config.c @@@ -20,7 -20,8 +20,7 @@@ static int zlib_compression_seen const char *config_exclusive_filename = NULL; -struct config_item -{ +struct config_item { struct config_item *next; char *name; char *value; @@@ -498,6 -499,13 +498,6 @@@ static int git_default_core_config(cons return 0; } - if (!strcmp(var, "core.abbrevguard")) { - unique_abbrev_extra_length = git_config_int(var, value); - if (unique_abbrev_extra_length < 0) - unique_abbrev_extra_length = 0; - return 0; - } - if (!strcmp(var, "core.bare")) { is_bare_repository_cfg = git_config_bool(var, value); return 0; @@@ -729,8 -737,10 +729,10 @@@ static int git_default_push_config(cons push_default = PUSH_DEFAULT_NOTHING; else if (!strcmp(value, "matching")) push_default = PUSH_DEFAULT_MATCHING; - else if (!strcmp(value, "tracking")) - push_default = PUSH_DEFAULT_TRACKING; + else if (!strcmp(value, "upstream")) + push_default = PUSH_DEFAULT_UPSTREAM; + else if (!strcmp(value, "tracking")) /* deprecated */ + push_default = PUSH_DEFAULT_UPSTREAM; else if (!strcmp(value, "current")) push_default = PUSH_DEFAULT_CURRENT; else {