From: Junio C Hamano Date: Thu, 18 Dec 2014 20:30:53 +0000 (-0800) Subject: Sync with v2.2.1 X-Git-Tag: v2.3.0-rc0~79 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3f1509809e728b70ea7912e4e1b40f22965e45ee?ds=inline;hp=-c Sync with v2.2.1 * maint: Git 2.2.1 Git 2.1.4 Git 2.0.5 Git 1.9.5 Git 1.8.5.6 fsck: complain about NTFS ".git" aliases in trees read-cache: optionally disallow NTFS .git variants path: add is_ntfs_dotgit() helper fsck: complain about HFS+ ".git" aliases in trees read-cache: optionally disallow HFS+ .git variants utf8: add is_hfs_dotgit() helper fsck: notice .git case-insensitively t1450: refactor ".", "..", and ".git" fsck tests verify_dotfile(): reject .git case-insensitively read-tree: add tests for confusing paths like ".." and ".git" unpack-trees: propagate errors adding entries to the index --- 3f1509809e728b70ea7912e4e1b40f22965e45ee diff --combined Documentation/config.txt index f615a5c354,302d61e76f..9335ff2ae2 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -246,6 -246,17 +246,17 @@@ core.precomposeunicode: When false, file names are handled fully transparent by Git, which is backward compatible with older versions of Git. + core.protectHFS:: + If set to true, do not allow checkout of paths that would + be considered equivalent to `.git` on an HFS+ filesystem. + Defaults to `true` on Mac OS, and `false` elsewhere. + + core.protectNTFS:: + If set to true, do not allow checkout of paths that would + cause problems with the NTFS filesystem, e.g. conflict with + 8.3 "short" names. + Defaults to `true` on Windows, and `false` elsewhere. + core.trustctime:: If false, the ctime differences between the index and the working tree are ignored; useful when the inode change time @@@ -839,10 -850,6 +850,10 @@@ accepted are `normal`, `black`, `red`, `blink` and `reverse`. The first color given is the foreground; the second is the background. The position of the attribute, if any, doesn't matter. ++ +Colors (foreground and background) may also be given as numbers between +0 and 255; these use ANSI 256-color mode (but note that not all +terminals may support this). color.diff:: Whether to use ANSI escape sequences to add color to patches. diff --combined Documentation/git.txt index dd172548f3,db4e407bb1..73dc0ad0a0 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -43,40 -43,45 +43,45 @@@ unreleased) version of Git, that is ava branch of the `git.git` repository. Documentation for older releases are available here: - * link:v2.2.0/git.html[documentation for release 2.2] + * link:v2.2.1/git.html[documentation for release 2.2.1] * release notes for + link:RelNotes/2.2.1.txt[2.2.1], link:RelNotes/2.2.0.txt[2.2]. - * link:v2.1.3/git.html[documentation for release 2.1.3] + * link:v2.1.4/git.html[documentation for release 2.1.4] * release notes for + link:RelNotes/2.1.4.txt[2.1.4], link:RelNotes/2.1.3.txt[2.1.3], link:RelNotes/2.1.2.txt[2.1.2], link:RelNotes/2.1.1.txt[2.1.1], link:RelNotes/2.1.0.txt[2.1]. - * link:v2.0.4/git.html[documentation for release 2.0.4] + * link:v2.0.5/git.html[documentation for release 2.0.5] * release notes for + link:RelNotes/2.0.5.txt[2.0.5], link:RelNotes/2.0.4.txt[2.0.4], link:RelNotes/2.0.3.txt[2.0.3], link:RelNotes/2.0.2.txt[2.0.2], link:RelNotes/2.0.1.txt[2.0.1], link:RelNotes/2.0.0.txt[2.0.0]. - * link:v1.9.4/git.html[documentation for release 1.9.4] + * link:v1.9.5/git.html[documentation for release 1.9.5] * release notes for + link:RelNotes/1.9.5.txt[1.9.5], link:RelNotes/1.9.4.txt[1.9.4], link:RelNotes/1.9.3.txt[1.9.3], link:RelNotes/1.9.2.txt[1.9.2], link:RelNotes/1.9.1.txt[1.9.1], link:RelNotes/1.9.0.txt[1.9.0]. - * link:v1.8.5.5/git.html[documentation for release 1.8.5.5] + * link:v1.8.5.6/git.html[documentation for release 1.8.5.6] * release notes for + link:RelNotes/1.8.5.6.txt[1.8.5.6], link:RelNotes/1.8.5.5.txt[1.8.5.5], link:RelNotes/1.8.5.4.txt[1.8.5.4], link:RelNotes/1.8.5.3.txt[1.8.5.3], @@@ -881,21 -886,19 +886,21 @@@ othe and the `core.editor` option in linkgit:git-config[1]. 'GIT_SSH':: - If this environment variable is set then 'git fetch' - and 'git push' will use this command instead - of 'ssh' when they need to connect to a remote system. - The '$GIT_SSH' command will be given exactly two or - four arguments: the 'username@host' (or just 'host') - from the URL and the shell command to execute on that - remote system, optionally preceded by '-p' (literally) and - the 'port' from the URL when it specifies something other - than the default SSH port. +'GIT_SSH_COMMAND':: + If either of these environment variables is set then 'git fetch' + and 'git push' will use the specified command instead of 'ssh' + when they need to connect to a remote system. + The command will be given exactly two or four arguments: the + 'username@host' (or just 'host') from the URL and the shell + command to execute on that remote system, optionally preceded by + '-p' (literally) and the 'port' from the URL when it specifies + something other than the default SSH port. + -To pass options to the program that you want to list in GIT_SSH -you will need to wrap the program and options into a shell script, -then set GIT_SSH to refer to the shell script. +`$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted +by the shell, which allows additional arguments to be included. +`$GIT_SSH` on the other hand must be just the path to a program +(which can be a wrapper shell script, if additional arguments are +needed). + Usually it is easier to configure any desired options through your personal `.ssh/config` file. Please consult your ssh documentation diff --combined config.c index ae1398f4f4,d5446d2b63..752e2e227f --- a/config.c +++ b/config.c @@@ -506,9 -506,9 +506,9 @@@ static int git_parse_signed(const char errno = EINVAL; return 0; } - uval = abs(val); + uval = labs(val); uval *= factor; - if (uval > max || abs(val) > uval) { + if (uval > max || labs(val) > uval) { errno = ERANGE; return 0; } @@@ -896,6 -896,16 +896,16 @@@ static int git_default_core_config(cons return 0; } + if (!strcmp(var, "core.protecthfs")) { + protect_hfs = git_config_bool(var, value); + return 0; + } + + if (!strcmp(var, "core.protectntfs")) { + protect_ntfs = git_config_bool(var, value); + return 0; + } + /* Add other config variables here and to Documentation/config.txt. */ return 0; } diff --combined unpack-trees.c index 3a66849e38,256df47b35..be84ba2607 --- a/unpack-trees.c +++ b/unpack-trees.c @@@ -98,7 -98,7 +98,7 @@@ void setup_unpack_trees_porcelain(struc opts->unpack_rejects[i].strdup_strings = 1; } - static void do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce, + static int do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce, unsigned int set, unsigned int clear) { clear |= CE_HASHED; @@@ -107,8 -107,8 +107,8 @@@ set |= CE_WT_REMOVE; ce->ce_flags = (ce->ce_flags & ~clear) | set; - add_index_entry(&o->result, ce, - ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE); + return add_index_entry(&o->result, ce, + ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE); } static struct cache_entry *dup_entry(const struct cache_entry *ce) @@@ -609,7 -609,9 +609,9 @@@ static int unpack_nondirectories(int n for (i = 0; i < n; i++) if (src[i] && src[i] != o->df_conflict_entry) - do_add_entry(o, src[i], 0, 0); + if (do_add_entry(o, src[i], 0, 0)) + return -1; + return 0; } @@@ -1155,8 -1157,6 +1157,8 @@@ int unpack_trees(unsigned len, struct t if (o->dst_index) { discard_index(o->dst_index); *o->dst_index = o->result; + } else { + discard_index(&o->result); } done: