Merge branch 'jh/push-default-upstream-configname' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 16 Mar 2011 23:47:26 +0000 (16:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Mar 2011 23:47:26 +0000 (16:47 -0700)
* jh/push-default-upstream-configname:
push.default: Rename 'tracking' to 'upstream'

1  2 
Documentation/config.txt
cache.h
config.c
diff --combined Documentation/config.txt
index 84e308fce5b2a0a67dcb64a98e414c49e4cd3b01,c995a1a47b3cfb99a2bebbadf4f7a5360cbe3d1a..701fba92dc1cfda8982aee8b66eb39b8b1c5816b
@@@ -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 39ca875fb54afa8ef31631d6096738c46df02ccc,7acf12012628fc16a68d186bcf3707157ba98d94..c782495a8f097e45c4bedd0e18c1f1250b794728
+++ 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 3dd55d507b5e3551e2ec315dda3fc37d2a74ad5a,9184900fb455dcac87a2c264c7cdaee353a98f16..822ef8365ce29c48e4b04fcccc47ba2e0b3a255f
+++ 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 {