summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-17config: match both symlink & realpath versions in IncludeIf.gitdir:*Libravatar Ævar Arnfjörð Bjarmason3-0/+49
Change the conditional inclusion mechanism to support e.g. gitdir:~/git_tree/repo where ~/git_tree is a symlink to /mnt/stuff/repo. This worked in the initial version of this facility[1], but regressed later in the series while solving a related bug[2]. Now gitdir: will match against the symlinked path (e.g. gitdir:~/git_tree/repo) in addition to the current /mnt/stuff/repo path. Since this is already in a release version note in the documentation that this behavior changed, so users who expect their configuration to work on both v2.13.0 and some future version of git with this fix aren't utterly confused. 1. commit 3efd0bedc6 ("config: add conditional include", 2017-03-01) 2. commit 86f9515708 ("config: resolve symlinks in conditional include's patterns", 2017-04-05) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-26Merge branch 'nd/conditional-config-in-early-config'Libravatar Junio C Hamano5-30/+90
The recently introduced conditional inclusion of configuration did not work well when early-config mechanism was involved. * nd/conditional-config-in-early-config: config: correct file reading order in read_early_config() config: handle conditional include when $GIT_DIR is not set up config: prepare to pass more info in git_config_with_options()
2017-04-26Merge branch 'ab/push-cas-doc-n-test'Libravatar Junio C Hamano2-0/+70
Doc update. * ab/push-cas-doc-n-test: push: document & test --force-with-lease with multiple remotes
2017-04-26Merge branch 'ls/travis-coccicheck'Libravatar Junio C Hamano1-0/+12
Travis CI learns to run coccicheck. * ls/travis-coccicheck: travis-ci: add static analysis build job to run coccicheck
2017-04-26Merge branch 'ps/pathspec-empty-prefix-origin'Libravatar Junio C Hamano2-1/+23
A recent update broke "git add -p ../foo" from a subdirectory. * ps/pathspec-empty-prefix-origin: pathspec: honor `PATHSPEC_PREFIX_ORIGIN` with empty prefix
2017-04-26Merge branch 'pc/t2027-git-to-pipe-cleanup'Libravatar Junio C Hamano1-14/+21
Having a git command on the upstream side of a pipe in a test script will hide the exit status from the command, which may cause us to fail to notice a breakage; rewrite tests in a script to avoid this issue. * pc/t2027-git-to-pipe-cleanup: t2027: avoid using pipes
2017-04-26Merge branch 'gb/rebase-signoff'Libravatar Junio C Hamano4-22/+71
"git rebase" learns "--signoff" option. * gb/rebase-signoff: rebase: pass --[no-]signoff option to git am builtin/am: fold am_signoff() into am_append_signoff() builtin/am: honor --signoff also when --rebasing
2017-04-23Getting ready for -rc1Libravatar Junio C Hamano1-3/+51
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-23Merge branch 'dt/xgethostname-nul-termination'Libravatar Junio C Hamano7-14/+33
gethostname(2) may not NUL terminate the buffer if hostname does not fit; unfortunately there is no easy way to see if our buffer was too small, but at least this will make sure we will not end up using garbage past the end of the buffer. * dt/xgethostname-nul-termination: xgethostname: handle long hostnames use HOST_NAME_MAX to size buffers for gethostname(2)
2017-04-23Merge branch 'jk/ls-files-recurse-submodules-fix'Libravatar Junio C Hamano2-1/+20
"ls-files --recurse-submodules" did not quite work well in a project with nested submodules. * jk/ls-files-recurse-submodules-fix: ls-files: fix path used when recursing into submodules ls-files: fix recurse-submodules with nested submodules
2017-04-23Merge branch 'rs/misc-cppcheck-fixes'Libravatar Junio C Hamano3-13/+23
Various small fixes. * rs/misc-cppcheck-fixes: server-info: avoid calling fclose(3) twice in update_info_file() files_for_each_reflog_ent_reverse(): close stream and free strbuf on error am: close stream on error, but not stdin
2017-04-23Merge branch 'jk/snprintf-cleanups'Libravatar Junio C Hamano1-0/+1
Hotfix for a topic that is already in 'master'. * jk/snprintf-cleanups: replace: plug a memory leak
2017-04-23Merge branch 'xy/format-patch-base'Libravatar Junio C Hamano1-1/+1
Doc cleanup. * xy/format-patch-base: doc: trivial typo in git-format-patch.txt
2017-04-23Merge branch 'sb/checkout-recurse-submodules'Libravatar Junio C Hamano1-2/+1
Code cleanup. * sb/checkout-recurse-submodules: submodule: remove a superfluous second check for the "new" variable
2017-04-23Merge branch 'jt/fetch-pack-error-reporting'Libravatar Junio C Hamano2-1/+8
"git fetch-pack" was not prepared to accept ERR packet that the upload-pack can send with a human-readable error message. It showed the packet contents with ERR prefix, so there was no data loss, but it was redundant to say "ERR" in an error message. * jt/fetch-pack-error-reporting: fetch-pack: show clearer error message upon ERR
2017-04-23Merge branch 'km/t1400-modernization'Libravatar Junio C Hamano1-168/+167
Code cleanup. * km/t1400-modernization: t1400: use consistent style for test_expect_success calls
2017-04-23Merge branch 'jk/quarantine-received-objects'Libravatar Junio C Hamano5-1/+49
Add finishing touches to a recent topic. * jk/quarantine-received-objects: refs: reject ref updates while GIT_QUARANTINE_PATH is set receive-pack: document user-visible quarantine effects receive-pack: drop tmp_objdir_env from run_update_hook
2017-04-23Merge branch 'jk/loose-object-fsck'Libravatar Junio C Hamano1-3/+0
Code cleanup. * jk/loose-object-fsck: sha1_file: remove an used fd variable
2017-04-23Merge branch 'bw/submodule-with-bs-path'Libravatar Junio C Hamano2-7/+21
"git submodule" script does not work well with strange pathnames. Protect it from a path with slashes in them, at least. * bw/submodule-with-bs-path: submodule: prevent backslash expantion in submodule names
2017-04-23Merge branch 'jh/verify-index-checksum-only-in-fsck'Libravatar Junio C Hamano4-0/+23
The index file has a trailing SHA-1 checksum to detect file corruption, and historically we checked it every time the index file is used. Omit the validation during normal use, and instead verify only in "git fsck". * jh/verify-index-checksum-only-in-fsck: read-cache: force_verify_index_checksum
2017-04-23Merge branch 'jh/unpack-trees-micro-optim'Libravatar Junio C Hamano1-5/+33
In a 2- and 3-way merge of trees, more than one source trees often end up sharing an identical subtree; optimize by not reading the same tree multiple times in such a case. * jh/unpack-trees-micro-optim: unpack-trees: avoid duplicate ODB lookups during checkout
2017-04-23Merge branch 'jh/string-list-micro-optim'Libravatar Junio C Hamano2-4/+50
The string-list API used a custom reallocation strategy that was very inefficient, instead of using the usual ALLOC_GROW() macro, which has been fixed. * jh/string-list-micro-optim: string-list: use ALLOC_GROW macro when reallocing string_list
2017-04-23Merge branch 'nd/conditional-config-include'Libravatar Junio C Hamano8-14/+73
$GIT_DIR may in some cases be normalized with all symlinks resolved while "gitdir" path expansion in the pattern does not receive the same treatment, leading to incorrect mismatch. This has been fixed. * nd/conditional-config-include: config: resolve symlinks in conditional include's patterns path.c: and an option to call real_path() in expand_user_path()
2017-04-23Merge branch 'dt/http-postbuffer-can-be-large'Libravatar Junio C Hamano5-6/+32
Allow the http.postbuffer configuration variable to be set to a size that can be expressed in size_t, which can be larger than ulong on some platforms. * dt/http-postbuffer-can-be-large: http.postbuffer: allow full range of ssize_t values
2017-04-23Merge branch 'tb/doc-eol-normalization'Libravatar Junio C Hamano2-4/+28
Doc update. * tb/doc-eol-normalization: gitattributes.txt: document how to normalize the line endings
2017-04-23Merge branch 'sr/http-proxy-configuration-fix'Libravatar Junio C Hamano1-2/+11
"http.proxy" set to an empty string is used to disable the usage of proxy. We broke this early last year. * sr/http-proxy-configuration-fix: http: fix the silent ignoring of proxy misconfiguraion http: honor empty http.proxy option to bypass proxy
2017-04-19Git 2.13-rc0Libravatar Junio C Hamano2-1/+36
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-19Merge branch 'jh/memihash-opt'Libravatar Junio C Hamano6-1/+40
Hotfix for a topic that is already in 'master'. * jh/memihash-opt: p0004: make perf test executable t3008: skip lazy-init test on a single-core box test-online-cpus: helper to return cpu count name-hash: fix buffer overrun
2017-04-19Merge branch 'vn/revision-shorthand-for-side-branch-log'Libravatar Junio C Hamano1-2/+2
Doc cleanup. * vn/revision-shorthand-for-side-branch-log: doc/revisions: remove brackets from rev^-n shorthand
2017-04-19Merge branch 'sf/putty-w-args'Libravatar Junio C Hamano2-1/+7
* sf/putty-w-args: connect.c: handle errors from split_cmdline
2017-04-19Merge branch 'ld/p4-current-branch-fix'Libravatar Junio C Hamano2-9/+45
"git p4" used "name-rev HEAD" when it wants to learn what branch is checked out; it should use "symbolic-ref HEAD". * ld/p4-current-branch-fix: git-p4: don't use name-rev to get current branch git-p4: add read_pipe_text() internal function git-p4: add failing test for name-rev rather than symbolic-ref
2017-04-19Merge branch 'dt/gc-ignore-old-gc-logs'Libravatar Junio C Hamano1-1/+17
* dt/gc-ignore-old-gc-logs: t6500: wait for detached auto gc at the end of the test script
2017-04-19Merge branch 'bw/attr-pathspec'Libravatar Junio C Hamano1-1/+1
* bw/attr-pathspec: pathspec: fix segfault in clear_pathspec
2017-04-19Merge branch 'ab/grep-plug-pathspec-leak'Libravatar Junio C Hamano1-0/+1
Call clear_pathspec() to release resources immediately before the cmd_grep() function returns. * ab/grep-plug-pathspec-leak: grep: plug a trivial memory leak
2017-04-19Merge branch 'jk/no-looking-at-dotgit-outside-repo'Libravatar Junio C Hamano2-0/+3
Clean up fallouts from recent tightening of the set-up sequence, where Git barfs when repository information is accessed without first ensuring that it was started in a repository. * jk/no-looking-at-dotgit-outside-repo: test-read-cache: setup git dir has_sha1_file: don't bother if we are not in a repository
2017-04-19Merge branch 'nd/files-backend-git-dir'Libravatar Junio C Hamano13-403/+1319
The "submodule" specific field in the ref_store structure is replaced with a more generic "gitdir" that can later be used also when dealing with ref_store that represents the set of refs visible from the other worktrees. * nd/files-backend-git-dir: (28 commits) refs.h: add a note about sorting order of for_each_ref_* t1406: new tests for submodule ref store t1405: some basic tests on main ref store t/helper: add test-ref-store to test ref-store functions refs: delete pack_refs() in favor of refs_pack_refs() files-backend: avoid ref api targeting main ref store refs: new transaction related ref-store api refs: add new ref-store api refs: rename get_ref_store() to get_submodule_ref_store() and make it public files-backend: replace submodule_allowed check in files_downcast() refs: move submodule code out of files-backend.c path.c: move some code out of strbuf_git_path_submodule() refs.c: make get_main_ref_store() public and use it refs.c: kill register_ref_store(), add register_submodule_ref_store() refs.c: flatten get_ref_store() a bit refs: rename lookup_ref_store() to lookup_submodule_ref_store() refs.c: introduce get_main_ref_store() files-backend: remove the use of git_path() files-backend: add and use files_ref_path() files-backend: add and use files_reflog_path() ...
2017-04-19Merge branch 'bw/submodule-is-active'Libravatar Junio C Hamano1-1/+1
Error message fix. * bw/submodule-is-active: submodule--helper: fix typo in is_active error message
2017-04-19Merge branch 'va/i18n-perl-scripts'Libravatar Junio C Hamano1-1/+1
Message fix. * va/i18n-perl-scripts: git-add--interactive.perl: add missing dot in a message
2017-04-19Merge branch 'sb/submodule-rm-absorb'Libravatar Junio C Hamano1-2/+2
Error message fix. * sb/submodule-rm-absorb: submodule.c: add missing ' in error messages
2017-04-19Merge branch 'ah/diff-files-ours-theirs-doc'Libravatar Junio C Hamano1-0/+14
The diff options "--ours", "--theirs" exist for quite some time. But so far they were not documented. Now they are. * ah/diff-files-ours-theirs-doc: diff-files: document --ours etc.
2017-04-19Merge branch 'lt/mailinfo-in-body-header-continuation'Libravatar Junio C Hamano2-3/+10
If a patch e-mail had its first paragraph after an in-body header indented (even after a blank line after the in-body header line), the indented line was mistook as a continuation of the in-body header. This has been fixed. * lt/mailinfo-in-body-header-continuation: mailinfo: fix in-body header continuations
2017-04-19Merge branch 'bw/push-options-recursively-to-submodules'Libravatar Junio C Hamano9-9/+219
"git push --recurse-submodules --push-option=<string>" learned to propagate the push option recursively down to pushes in submodules. * bw/push-options-recursively-to-submodules: push: propagate remote and refspec with --recurse-submodules submodule--helper: add push-check subcommand remote: expose parse_push_refspec function push: propagate push-options with --recurse-submodules push: unmark a local variable as static
2017-04-19Merge branch 'bc/object-id'Libravatar Junio C Hamano46-451/+459
Conversion from unsigned char [40] to struct object_id continues. * bc/object-id: Documentation: update and rename api-sha1-array.txt Rename sha1_array to oid_array Convert sha1_array_for_each_unique and for_each_abbrev to object_id Convert sha1_array_lookup to take struct object_id Convert remaining callers of sha1_array_lookup to object_id Make sha1_array_append take a struct object_id * sha1-array: convert internal storage for struct sha1_array to object_id builtin/pull: convert to struct object_id submodule: convert check_for_new_submodule_commits to object_id sha1_name: convert disambiguate_hint_fn to take object_id sha1_name: convert struct disambiguate_state to object_id test-sha1-array: convert most code to struct object_id parse-options-cb: convert sha1_array_append caller to struct object_id fsck: convert init_skiplist to struct object_id builtin/receive-pack: convert portions to struct object_id builtin/pull: convert portions to struct object_id builtin/diff: convert to struct object_id Convert GIT_SHA1_RAWSZ used for allocation to GIT_MAX_RAWSZ Convert GIT_SHA1_HEXSZ used for allocation to GIT_MAX_HEXSZ Define new hash-size constants for allocating memory
2017-04-19Merge branch 'sb/submodule-short-status'Libravatar Junio C Hamano5-40/+218
The output from "git status --short" has been extended to show various kinds of dirtyness in submodules differently; instead of to "M" for modified, 'm' and '?' can be shown to signal changes only to the working tree of the submodule but not the commit that is checked out. * sb/submodule-short-status: submodule.c: correctly handle nested submodules in is_submodule_modified short status: improve reporting for submodule changes submodule.c: stricter checking for submodules in is_submodule_modified submodule.c: port is_submodule_modified to use porcelain 2 submodule.c: convert is_submodule_modified to use strbuf_getwholeline submodule.c: factor out early loop termination in is_submodule_modified submodule.c: use argv_array in is_submodule_modified
2017-04-19push: document & test --force-with-lease with multiple remotesLibravatar Ævar Arnfjörð Bjarmason2-0/+70
Document & test for cases where there are two remotes pointing to the same URL, and a background fetch & subsequent `git push --force-with-lease` shouldn't clobber un-updated references we haven't fetched. Some editors like Microsoft's VSC have a feature to auto-fetch in the background, this bypasses the protections offered by --force-with-lease & --force-with-lease=<refname>, as noted in the documentation being added here. See the 'Tools that do an automatic fetch defeat "git push --force-with-lease"' (<1491617750.2149.10.camel@mattmccutchen.net>) git mailing list thread for more details. Jakub Narębski suggested this method of adding another remote to bypass this edge case, document that & add a test for it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-19config: correct file reading order in read_early_config()Libravatar Nguyễn Thái Ngọc Duy2-14/+30
Config file reading order is important because each file can override values in the previous files and this is expected behavior. Normally we read in this order, all in do_git_config_sequence(): 1. $HOME/.gitconfig 2. $GIT_DIR/config 3. config from command line However in read_early_config() the order may be swapped a bit if setup_git_directory() has not been called: 1. $HOME/.gitconfig 2. $GIT_DIR/config is NOT read because .git dir is not found _yet_ 3. config from command line 4. $GIT_DIR/config is now READ (after discover_git_directory() call) The reading at step 4 could override config at step 3, which is not the expectation. Now that we could pass the .git dir around, we could feed discover_git_directory() back to step 2, so that it works again, and remove step 4. Noticed-by: Jeff King <peff@peff.net> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-18rebase: pass --[no-]signoff option to git amLibravatar Giuseppe Bilotta3-1/+53
This makes it easy to sign off a whole patchset before submission. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-18xgethostname: handle long hostnamesLibravatar David Turner6-4/+19
If the full hostname doesn't fit in the buffer supplied to gethostname, POSIX does not specify whether the buffer will be null-terminated, so to be safe, we should do it ourselves. Introduce new function, xgethostname, which ensures that there is always a \0 at the end of the buffer. Signed-off-by: David Turner <dturner@twosigma.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-18use HOST_NAME_MAX to size buffers for gethostname(2)Libravatar René Scharfe6-10/+14
POSIX limits the length of host names to HOST_NAME_MAX. Export the fallback definition from daemon.c and use this constant to make all buffers used with gethostname(2) big enough for any possible result and a terminating NUL. Inspired-by: David Turner <dturner@twosigma.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: David Turner <dturner@twosigma.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-18p0004: make perf test executableLibravatar Christian Couder1-0/+0
It looks like in 89c3b0ad43 (name-hash: add perf test for lazy_init_name_hash, 2017-03-23) p0004 was not created with the execute unix rights. Let's fix that. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Acked-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>