summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-28Sync with 2.10.2Libravatar Junio C Hamano2-1/+68
2016-10-28Git 2.10.2Libravatar Junio C Hamano3-2/+69
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-28Merge branch 'pb/test-parse-options-expect' into maintLibravatar Junio C Hamano1-170/+13
Test clean-up. * pb/test-parse-options-expect: t0040: convert all possible tests to use `test-parse-options --expect`
2016-10-28Merge branch 'jc/cocci-xstrdup-or-null' into maintLibravatar Junio C Hamano7-20/+17
Code cleanup. * jc/cocci-xstrdup-or-null: cocci: refactor common patterns to use xstrdup_or_null()
2016-10-28Merge branch 'rs/cocci' into maintLibravatar Junio C Hamano15-45/+99
Code cleanup. * rs/cocci: use strbuf_add_unique_abbrev() for adding short hashes, part 3 remove unnecessary NULL check before free(3) coccicheck: make transformation for strbuf_addf(sb, "...") more precise use strbuf_add_unique_abbrev() for adding short hashes, part 2 use strbuf_addstr() instead of strbuf_addf() with "%s", part 2 gitignore: ignore output files of coccicheck make target use strbuf_addstr() for adding constant strings to a strbuf, part 2 add coccicheck make target contrib/coccinelle: fix semantic patch for oid_to_hex_r()
2016-10-28Merge branch 'jc/diff-unique-abbrev-comments' into maintLibravatar Junio C Hamano1-1/+22
A bit more comments in a tricky code. * jc/diff-unique-abbrev-comments: diff_unique_abbrev(): document its assumption and limitation
2016-10-28Merge branch 'rs/pretty-format-color-doc-fix' into maintLibravatar Junio C Hamano1-1/+2
Small doc update. * rs/pretty-format-color-doc-fix: pretty: fix document link for color specification
2016-10-28Merge branch 'js/reset-usage' into maintLibravatar Junio C Hamano1-1/+1
Message fix-up. * js/reset-usage: reset: fix usage
2016-10-28Merge branch 'po/fix-doc-merge-base-illustration' into maintLibravatar Junio C Hamano2-21/+21
Some AsciiDoc formatter mishandles a displayed illustration with tabs in it. Adjust a few of them in merge-base documentation to work around them. * po/fix-doc-merge-base-illustration: doc: fix the 'revert a faulty merge' ASCII art tab spacing doc: fix merge-base ASCII art tab spacing
2016-10-28Merge branch 'jk/tap-verbose-fix' into maintLibravatar Junio C Hamano3-5/+37
The Travis CI configuration we ship ran the tests with --verbose option but this risks non-TAP output that happens to be "ok" to be misinterpreted as TAP signalling a test that passed. This resulted in unnecessary failure. This has been corrected by introducing a new mode to run our tests in the test harness to send the verbose output separately to the log file. * jk/tap-verbose-fix: test-lib: bail out when "-v" used under "prove" travis: use --verbose-log test option test-lib: add --verbose-log option test-lib: handle TEST_OUTPUT_DIRECTORY with spaces
2016-10-28Merge branch 'tg/add-chmod+x-fix' into maintLibravatar Junio C Hamano1-0/+1
A hot-fix for a test added by a recent topic that went to both 'master' and 'maint' already. * tg/add-chmod+x-fix: t3700: fix broken test under !SANITY
2016-10-28Merge branch 'bw/submodule-branch-dot-doc' into maintLibravatar Junio C Hamano2-3/+8
Recent git allows submodule.<name>.branch to use a special token "." instead of the branch name; the documentation has been updated to describe it. * bw/submodule-branch-dot-doc: submodules doc: update documentation for "." used for submodule branches
2016-10-28Merge branch 'jk/tighten-alloc' into maintLibravatar Junio C Hamano1-11/+6
Protect our code from over-eager compilers. * jk/tighten-alloc: inline xalloc_flex() into FLEXPTR_ALLOC_MEM avoid pointer arithmetic involving NULL in FLEX_ALLOC_MEM
2016-10-28Merge branch 'jk/fetch-quick-tag-following' into maintLibravatar Junio C Hamano4-4/+112
When fetching from a remote that has many tags that are irrelevant to branches we are following, we used to waste way too many cycles when checking if the object pointed at by a tag (that we are not going to fetch!) exists in our repository too carefully. * jk/fetch-quick-tag-following: fetch: use "quick" has_sha1_file for tag following
2016-10-28Merge branch 'jk/merge-base-fork-point-without-reflog' into maintLibravatar Junio C Hamano2-0/+9
"git rebase" immediately after "git clone" failed to find the fork point from the upstream. * jk/merge-base-fork-point-without-reflog: merge-base: handle --fork-point without reflog
2016-10-28Merge branch 'dk/worktree-dup-checkout-with-bare-is-ok' into maintLibravatar Junio C Hamano2-0/+10
In a worktree connected to a repository elsewhere, created via "git worktree", "git checkout" attempts to protect users from confusion by refusing to check out a branch that is already checked out in another worktree. However, this also prevented checking out a branch, which is designated as the primary branch of a bare reopsitory, in a worktree that is connected to the bare repository. The check has been corrected to allow it. * dk/worktree-dup-checkout-with-bare-is-ok: worktree: allow the main brach of a bare repository to be checked out
2016-10-28Merge branch 'sb/submodule-config-doc-drop-path' into maintLibravatar Junio C Hamano1-5/+6
The "submodule.<name>.path" stored in .gitmodules is never copied to .git/config and such a key in .git/config has no meaning, but the documentation described it and submodule.<name>.url next to each other as if both belong to .git/config. This has been fixed. * sb/submodule-config-doc-drop-path: documentation: improve submodule.<name>.{url, path} description
2016-10-28Merge branch 'jk/ref-symlink-loop' into maintLibravatar Junio C Hamano2-1/+18
A stray symbolic link in $GIT_DIR/refs/ directory could make name resolution loop forever, which has been corrected. * jk/ref-symlink-loop: files_read_raw_ref: prevent infinite retry loops in general files_read_raw_ref: avoid infinite loop on broken symlinks
2016-10-28Merge branch 'nd/commit-p-doc' into maintLibravatar Junio C Hamano1-2/+4
Documentation for "git commit" was updated to clarify that "commit -p <paths>" adds to the current contents of the index to come up with what to commit. * nd/commit-p-doc: git-commit.txt: clarify --patch mode with pathspec
2016-10-28Merge branch 'jk/clone-copy-alternates-fix' into maintLibravatar Junio C Hamano1-2/+5
"git clone" of a local repository can be done at the filesystem level, but the codepath did not check errors while copying and adjusting the file that lists alternate object stores. * jk/clone-copy-alternates-fix: clone: detect errors in normalize_path_copy
2016-10-28Merge branch 'dt/http-empty-auth' into maintLibravatar Junio C Hamano1-1/+1
http.emptyauth configuration is a way to allow an empty username to pass when attempting to authenticate using mechanisms like Kerberos. We took an unspecified (NULL) username and sent ":" (i.e. no username, no password) to CURLOPT_USERPWD, but did not do the same when the username is explicitly set to an empty string. * dt/http-empty-auth: http: http.emptyauth should allow empty (not just NULL) usernames
2016-10-28Merge branch 'dp/autoconf-curl-ssl' into maintLibravatar Junio C Hamano1-10/+11
The ./configure script generated from configure.ac was taught how to detect support of SSL by libcurl better. * dp/autoconf-curl-ssl: ./configure.ac: detect SSL in libcurl using curl-config
2016-10-28Merge branch 'ak/curl-imap-send-explicit-scheme' into maintLibravatar Junio C Hamano1-0/+1
When we started cURL to talk to imap server when a new enough version of cURL library is available, we forgot to explicitly add imap(s):// before the destination. To some folks, that didn't work and the library tried to make HTTP(s) requests instead. * ak/curl-imap-send-explicit-scheme: imap-send: Tell cURL to use imap:// or imaps://
2016-10-28Merge branch 'jt/fetch-pack-in-vain-count-with-stateless' into maintLibravatar Junio C Hamano1-2/+9
When "git fetch" tries to find where the history of the repository it runs in has diverged from what the other side has, it has a mechanism to avoid digging too deep into irrelevant side branches. This however did not work well over the "smart-http" transport due to a design bug, which has been fixed. * jt/fetch-pack-in-vain-count-with-stateless: fetch-pack: do not reset in_vain on non-novel acks
2016-10-28Merge branch 'js/regexec-buf' into maintLibravatar Junio C Hamano1-6/+7
A follow-up to an already graduated topic. * js/regexec-buf: configure.ac: improve description of NO_REGEX test
2016-10-28Merge branch 'rs/c-auto-resets-attributes' into maintLibravatar Junio C Hamano1-0/+2
When "%C(auto)" appears at the very beginning of the pretty format string, it did not need to issue the reset sequence, but it did. This is a small optimization to already graduated topic. * rs/c-auto-resets-attributes: pretty: avoid adding reset for %C(auto) if output is empty pretty: let %C(auto) reset all attributes
2016-10-28Merge branch 'yk/git-tag-remove-mention-of-old-layout-in-doc' into maintLibravatar Junio C Hamano1-3/+2
Shorten description of auto-following in "git tag" by removing a mention of historical remotes layout which is not relevant to the main topic. * yk/git-tag-remove-mention-of-old-layout-in-doc: doc: remove reference to the traditional layout in git-tag.txt
2016-10-27Getting ready for 2.11-rc0Libravatar Junio C Hamano1-1/+36
... but not quite yet. A few more topics to go. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-27Merge branch 'svn-cache' of git://bogomips.org/git-svnLibravatar Junio C Hamano1-1/+11
* 'svn-cache' of git://bogomips.org/git-svn: git-svn: do not reuse caches memoized for a different architecture
2016-10-27Merge branch 'svn-wt' of git://bogomips.org/git-svnLibravatar Junio C Hamano6-48/+69
* 'svn-wt' of git://bogomips.org/git-svn: git-svn: "git worktree" awareness git-svn: reduce scope of input record separator change
2016-10-27Merge branch 'nd/ita-empty-commit'Libravatar Junio C Hamano9-13/+89
When new paths were added by "git add -N" to the index, it was enough to circumvent the check by "git commit" to refrain from making an empty commit without "--allow-empty". The same logic prevented "git status" to show such a path as "new file" in the "Changes not staged for commit" section. * nd/ita-empty-commit: commit: don't be fooled by ita entries when creating initial commit commit: fix empty commit creation when there's no changes but ita entries diff: add --ita-[in]visible-in-index diff-lib: allow ita entries treated as "not yet exist in index"
2016-10-27Merge branch 'js/prepare-sequencer'Libravatar Junio C Hamano5-261/+492
Update of the sequencer codebase to make it reusable to reimplement "rebase -i" continues. * js/prepare-sequencer: (27 commits) sequencer: mark all error messages for translation sequencer: start error messages consistently with lower case sequencer: quote filenames in error messages sequencer: mark action_name() for translation sequencer: remove overzealous assumption in rebase -i mode sequencer: teach write_message() to append an optional LF sequencer: refactor write_message() to take a pointer/length sequencer: roll back lock file if write_message() failed sequencer: stop releasing the strbuf in write_message() sequencer: left-trim lines read from the script sequencer: support cleaning up commit messages sequencer: support amending commits sequencer: allow editing the commit message on a case-by-case basis sequencer: introduce a helper to read files written by scripts sequencer: prepare for rebase -i's commit functionality sequencer: remember the onelines when parsing the todo file sequencer: get rid of the subcommand field sequencer: avoid completely different messages for different actions sequencer: strip CR from the todo script sequencer: completely revamp the "todo" script parsing ...
2016-10-27Merge branch 'jk/daemon-path-ok-check-truncation'Libravatar Junio C Hamano1-4/+21
"git daemon" used fixed-length buffers to turn URL to the repository the client asked for into the server side directory path, using snprintf() to avoid overflowing these buffers, but allowed possibly truncated paths to the directory. This has been tightened to reject such a request that causes overlong path to be required to serve. * jk/daemon-path-ok-check-truncation: daemon: detect and reject too-long paths
2016-10-27Merge branch 'rs/ring-buffer-wraparound'Libravatar Junio C Hamano2-2/+4
The code that we have used for the past 10+ years to cycle 4-element ring buffers turns out to be not quite portable in theoretical world. * rs/ring-buffer-wraparound: hex: make wraparound of the index into ring-buffer explicit
2016-10-27Merge branch 'sb/submodule-ignore-trailing-slash'Libravatar Junio C Hamano2-15/+22
A minor regression fix for "git submodule". * sb/submodule-ignore-trailing-slash: t0060: sidestep surprising path mangling results on Windows submodule: ignore trailing slash in relative url submodule: ignore trailing slash on superproject URL
2016-10-27Merge branch 'jk/no-looking-at-dotgit-outside-repo'Libravatar Junio C Hamano11-46/+66
Update "git diff --no-index" codepath not to try to peek into .git/ directory that happens to be under the current directory, when we know we are operating outside any repository. * jk/no-looking-at-dotgit-outside-repo: diff: handle sha1 abbreviations outside of repository diff_aligned_abbrev: use "struct oid" diff_unique_abbrev: rename to diff_aligned_abbrev find_unique_abbrev: use 4-buffer ring test-*-cache-tree: setup git dir read info/{attributes,exclude} only when in repository
2016-10-27Merge branch 'jc/abbrev-auto'Libravatar Junio C Hamano3-42/+81
"git push" and "git fetch" reports from what old object to what new object each ref was updated, using abbreviated refnames, and they attempt to align the columns for this and other pieces of information. The way these codepaths compute how many display columns to allocate for the object names portion of this output has been updated to match the recent "auto scale the default abbreviation length" change. * jc/abbrev-auto: transport: compute summary-width dynamically transport: allow summary-width to be computed dynamically fetch: pass summary_width down the callchain transport: pass summary_width down the callchain
2016-10-27Merge branch 'jk/abbrev-auto'Libravatar Junio C Hamano3-26/+68
Updates the way approximate count of total objects is computed while attempting to come up with a unique abbreviated object name, which in turn needs to estimate how many hexdigits are necessary to ensure uniqueness. * jk/abbrev-auto: find_unique_abbrev: move logic out of get_short_sha1()
2016-10-27Merge branch 'lt/abbrev-auto'Libravatar Junio C Hamano7-7/+40
Allow the default abbreviation length, which has historically been 7, to scale as the repository grows. The logic suggests to use 12 hexdigits for the Linux kernel, and 9 to 10 for Git itself. * lt/abbrev-auto: abbrev: auto size the default abbreviation abbrev: prepare for new world order abbrev: add FALLBACK_DEFAULT_ABBREV to prepare for auto sizing
2016-10-27git-svn: do not reuse caches memoized for a different architectureLibravatar Gavin Lambert1-1/+11
Reusing cached data speeds up git-svn by quite a fair bit. However, if the YAML module is unavailable, the caches are written to disk in an architecture-dependent manner. That leads to problems when upgrading, say, from 32-bit to 64-bit Git for Windows. Let's just try to read those caches back if we detect the absence of the YAML module and the presence of the file, and delete the file if it could not be read back correctly. Note that the only way to catch the error when the memoized cache could not be read back is to put the call inside an `eval { ... }` block because it would die otherwise; the `eval` block should also return `1` in case of success explicitly since the function reading back the cached data does not return an appropriate value to test for success. This fixes https://github.com/git-for-windows/git/issues/233. [ew: import "retrieve" explictly, check unlink result] Signed-off-by: Gavin Lambert <github@mirality.co.nz> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Eric Wong <e@80x24.org>
2016-10-26diff: handle sha1 abbreviations outside of repositoryLibravatar Jeff King1-4/+17
When generating diffs outside a repository (e.g., with "diff --no-index"), we may write abbreviated sha1s as part of "--raw" output or the "index" lines of "--patch" output. Since we have no object database, we never find any collisions, and these sha1s get whatever static abbreviation length is configured (typically 7). However, we do blindly look in ".git/objects" to see if any objects exist, even though we know we are not in a repository. This is usually harmless because such a directory is unlikely to exist, but could be wrong in rare circumstances. Let's instead notice when we are not in a repository and behave as if the object database is empty (i.e., just use the default abbrev length). It would perhaps make sense to be conservative and show full sha1s in that case, but showing the default abbreviation is what we've always done (and is certainly less ugly). Note that this does mean that: cd /not/a/repo GIT_OBJECT_DIRECTORY=/some/real/objdir git diff --no-index ... used to look for collisions in /some/real/objdir but now does not. This could be considered either a bugfix (we do not look at objects if we have no repository) or a regression, but it seems unlikely that anybody would care much either way. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-26diff_aligned_abbrev: use "struct oid"Libravatar Jeff King3-12/+14
Since we're modifying this function anyway, it's a good time to update it to the more modern "struct oid". We can also drop some of the magic numbers in favor of GIT_SHA1_HEXSZ, along with some descriptive comments. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-26diff_unique_abbrev: rename to diff_aligned_abbrevLibravatar Jeff King3-11/+11
The word "align" describes how the function actually differs from find_unique_abbrev, and will make it less confusing when we add more diff-specific abbrevation functions that do not do this alignment. Since this is a globally available function, let's also move its descriptive comment to the header file, where we typically document function interfaces. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-26find_unique_abbrev: use 4-buffer ringLibravatar Jeff King4-19/+16
Some code paths want to format multiple abbreviated sha1s in the same output line. Because we use a single static buffer for our return value, they have to either break their output into several calls or allocate their own arrays and use find_unique_abbrev_r(). Intead, let's mimic sha1_to_hex() and use a ring of several buffers, so that the return value stays valid through multiple calls. This shortens some of the callers, and makes it harder to for them to make a silly mistake. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-26test-*-cache-tree: setup git dirLibravatar Jeff King2-0/+2
These test helper programs access the index, but do not ever setup_git_directory(), meaning we just blindly looked in ".git/index". This happened to work for the purposes of our tests (which do not run from subdirectories, nor in non-repos), but it's a bad habit. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-26read info/{attributes,exclude} only when in repositoryLibravatar Jeff King2-7/+11
The low-level attribute and gitignore code will try to look in $GIT_DIR/info for any repo-level configuration files, even if we have not actually determined that we are in a repository (e.g., running "git grep --no-index"). In such a case they end up looking for ".git/info/attributes", etc. This is generally harmless, as such a file is unlikely to exist outside of a repository, but it's still conceptually the wrong thing to do. Let's detect this situation explicitly and skip reading the file (i.e., the same behavior we'd get if we were in a repository and the file did not exist). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-26Eleventh batch for 2.11Libravatar Junio C Hamano1-0/+106
There still are a few topics that need to go in before -rc0 which would make the shape of the upcoming release clearer, but here is the final batch before it happens. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-26Merge branch 'ex/deprecate-empty-pathspec-as-match-all'Libravatar Junio C Hamano3-2/+19
An empty string used as a pathspec element has always meant 'everything matches', but it is too easy to write a script that finds a path to remove in $path and run 'git rm "$paht"', which ends up removing everything. Start warning about this use of an empty string used for 'everything matches' and ask users to use a more explicit '.' for that instead. The hope is that existing users will not mind this change, and eventually the warning can be turned into a hard error, upgrading the deprecation into removal of this (mis)feature. * ex/deprecate-empty-pathspec-as-match-all: pathspec: warn on empty strings as pathspec
2016-10-26Merge branch 'po/fix-doc-merge-base-illustration'Libravatar Junio C Hamano2-21/+21
Some AsciiDoc formatter mishandles a displayed illustration with tabs in it. Adjust a few of them in merge-base documentation to work around them. * po/fix-doc-merge-base-illustration: doc: fix the 'revert a faulty merge' ASCII art tab spacing doc: fix merge-base ASCII art tab spacing
2016-10-26Merge branch 'jk/tap-verbose-fix'Libravatar Junio C Hamano3-5/+37
The Travis CI configuration we ship ran the tests with --verbose option but this risks non-TAP output that happens to be "ok" to be misinterpreted as TAP signalling a test that passed. This resulted in unnecessary failure. This has been corrected by introducing a new mode to run our tests in the test harness to send the verbose output separately to the log file. * jk/tap-verbose-fix: test-lib: bail out when "-v" used under "prove" travis: use --verbose-log test option test-lib: add --verbose-log option test-lib: handle TEST_OUTPUT_DIRECTORY with spaces