summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-11commit: copy saved getenv() resultLibravatar Jeff King1-1/+2
We save the result of $GIT_INDEX_FILE so that we can restore it after setting it to a new value and running add--interactive. However, the pointer returned by getenv() is not guaranteed to be valid after calling setenv(). This _usually_ works fine, but can fail if libc needs to reallocate the environment block during the setenv(). Let's just duplicate the string, so we know that it remains valid. In the long run it may be more robust to teach interactive_add() to take a set of environment variables to pass along to run-command when it execs add--interactive. And then we would not have to do this save/restore dance at all. But this is an easy fix in the meantime. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-11get_super_prefix(): copy getenv() resultLibravatar Jeff King1-2/+2
The return value of getenv() is not guaranteed to remain valid across multiple calls (nor across calls to setenv()). Since this function caches the result for the length of the program, we must make a copy to ensure that it is still valid when we need it. Reported-by: Yngve N. Pettersen <yngve@vivaldi.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21Git 2.19.2Libravatar Junio C Hamano3-2/+110
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21Merge branch 'sg/test-rebase-editor-fix' into maintLibravatar Junio C Hamano2-7/+7
* sg/test-rebase-editor-fix: t3404-rebase-interactive: test abbreviated commands
2018-11-21Merge branch 'tb/char-may-be-unsigned' into maintLibravatar Junio C Hamano1-1/+1
Build portability fix. * tb/char-may-be-unsigned: path.c: char is not (always) signed
2018-11-21Merge branch 'jk/uploadpack-packobjectshook-fix' into maintLibravatar Junio C Hamano1-3/+6
Code clean-up that results in a small bugfix. * jk/uploadpack-packobjectshook-fix: upload-pack: fix broken if/else chain in config callback
2018-11-21Merge branch 'uk/merge-subtree-doc-update' into maintLibravatar Junio C Hamano1-1/+1
Belated documentation update to adjust to a new world order that happened a yew years ago. * uk/merge-subtree-doc-update: howto/using-merge-subtree: mention --allow-unrelated-histories
2018-11-21Merge branch 'jc/cocci-preincr' into maintLibravatar Junio C Hamano2-1/+6
Code cleanup. * jc/cocci-preincr: fsck: s/++i > 1/i++/ cocci: simplify "if (++u > 1)" to "if (u++)"
2018-11-21Merge branch 'ah/doc-updates' into maintLibravatar Junio C Hamano12-79/+92
Doc updates. * ah/doc-updates: doc: fix formatting in git-update-ref doc: fix indentation of listing blocks in gitweb.conf.txt doc: fix descripion for 'git tag --format' doc: fix inappropriate monospace formatting doc: fix ASCII art tab spacing doc: clarify boundaries of 'git worktree list --porcelain'
2018-11-21Merge branch 'sg/doc-show-branch-typofix' into maintLibravatar Junio C Hamano1-1/+1
Docfix. * sg/doc-show-branch-typofix: doc: fix small typo in git show-branch
2018-11-21Merge branch 'tq/branch-style-fix' into maintLibravatar Junio C Hamano1-2/+1
Code clean-up. * tq/branch-style-fix: branch: trivial style fix
2018-11-21Merge branch 'tq/branch-create-wo-branch-get' into maintLibravatar Junio C Hamano1-5/+0
Code clean-up. * tq/branch-create-wo-branch-get: builtin/branch.c: remove useless branch_get
2018-11-21Merge branch 'sb/strbuf-h-update' into maintLibravatar Junio C Hamano1-67/+81
Code clean-up to serve as a BCP example. Further clean-up patches may want to follow soon. * sb/strbuf-h-update: strbuf.h: format according to coding guidelines
2018-11-21Merge branch 'du/cherry-is-plumbing' into maintLibravatar Junio C Hamano2-12/+1
Doc update to mark "git cherry" as a plumbing command. * du/cherry-is-plumbing: doc: move git-cherry to plumbing
2018-11-21Merge branch 'du/get-tar-commit-id-is-plumbing' into maintLibravatar Junio C Hamano1-1/+1
Doc update to mark "git get-tar-commit-id" as a plumbing command. * du/get-tar-commit-id-is-plumbing: doc: move git-get-tar-commit-id to plumbing
2018-11-21Merge branch 'mm/doc-no-dashed-git' into maintLibravatar Junio C Hamano2-3/+3
Doc update. * mm/doc-no-dashed-git: doc: fix a typo and clarify a sentence
2018-11-21Merge branch 'du/rev-parse-is-plumbing' into maintLibravatar Junio C Hamano1-1/+1
Doc update. * du/rev-parse-is-plumbing: doc: move git-rev-parse from porcelain to plumbing
2018-11-21Merge branch 'ma/t7005-bash-workaround' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * ma/t7005-bash-workaround: t7005-editor: quote filename to fix whitespace-issue
2018-11-21Merge branch 'jc/how-to-document-api' into maintLibravatar Junio C Hamano1-1/+4
Doc update. * jc/how-to-document-api: CodingGuidelines: document the API in *.h files
2018-11-21Merge branch 'mw/doc-typofixes' into maintLibravatar Junio C Hamano2-3/+2
Typofixes. * mw/doc-typofixes: docs: typo: s/isimilar/similar/ docs: graph: remove unnecessary `graph_update()' call docs: typo: s/go/to/
2018-11-21Merge branch 'rs/sequencer-oidset-insert-avoids-dups' into maintLibravatar Junio C Hamano1-3/+1
Code clean-up. * rs/sequencer-oidset-insert-avoids-dups: sequencer: use return value of oidset_insert()
2018-11-21Merge branch 'ma/mailing-list-address-in-git-help' into maintLibravatar Junio C Hamano1-1/+3
Doc update. * ma/mailing-list-address-in-git-help: git doc: direct bug reporters to mailing list archive
2018-11-21Merge branch 'nd/packobjectshook-doc-fix' into maintLibravatar Junio C Hamano1-4/+4
Doc update. * nd/packobjectshook-doc-fix: config.txt: correct the note about uploadpack.packObjectsHook
2018-11-21Merge branch 'ma/t1400-undebug-test' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * ma/t1400-undebug-test: t1400: drop debug `echo` to actually execute `test`
2018-11-21Merge branch 'ma/commit-graph-docs' into maintLibravatar Junio C Hamano2-19/+20
Doc update. * ma/commit-graph-docs: Doc: refer to the "commit-graph file" with dash git-commit-graph.txt: refer to "*commit*-graph file" git-commit-graph.txt: typeset more in monospace git-commit-graph.txt: fix bullet lists
2018-11-21Merge branch 'dz/credential-doc-url-matching-rules' into maintLibravatar Junio C Hamano1-0/+6
Doc update. * dz/credential-doc-url-matching-rules: doc: clarify gitcredentials path component matching
2018-11-21Merge branch 'jk/check-everything-connected-is-long-gone' into maintLibravatar Junio C Hamano1-1/+1
Comment fix. * jk/check-everything-connected-is-long-gone: receive-pack: update comment with check_everything_connected
2018-11-21Merge branch 'fe/doc-updates' into maintLibravatar Junio C Hamano3-5/+39
Doc updates. * fe/doc-updates: git-describe.1: clarify that "human readable" is also git-readable git-column.1: clarify initial description, provide examples git-archimport.1: specify what kind of Arch we're talking about
2018-11-21Merge branch 'tg/t5551-with-curl-7.61.1' into maintLibravatar Junio C Hamano1-34/+34
Test update. Supersedes tz/t5551-with-curl-7.61.1 topic * tg/t5551-with-curl-7.61.1: t5551: compare sorted cookies files t5551: move setup code inside test_expect blocks
2018-11-21Merge branch 'tq/refs-internal-comment-fix' into maintLibravatar Junio C Hamano1-1/+1
Fix for typo in a sample code in comment. * tq/refs-internal-comment-fix: refs: docstring typo
2018-11-21Merge branch 'sg/split-index-test' into maintLibravatar Junio C Hamano2-8/+11
Test updates. * sg/split-index-test: t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index t1700-split-index: drop unnecessary 'grep'
2018-11-21Merge branch 'bw/protocol-v2' into maintLibravatar Junio C Hamano1-0/+2
Doc fix. * bw/protocol-v2: config: document value 2 for protocol.version
2018-11-21Merge branch 'sb/string-list-remove-unused' into maintLibravatar Junio C Hamano2-18/+0
Code clean-up. * sb/string-list-remove-unused: string-list: remove unused function print_string_list
2018-11-21Merge branch 'jk/dev-build-format-security' into maintLibravatar Junio C Hamano1-0/+1
Build tweak to help developers. * jk/dev-build-format-security: config.mak.dev: add -Wformat-security
2018-11-21Merge branch 'sg/t3701-tighten-trace' into maintLibravatar Junio C Hamano1-1/+1
Test update. * sg/t3701-tighten-trace: t3701-add-interactive: tighten the check of trace output
2018-11-21Merge branch 'en/double-semicolon-fix' into maintLibravatar Junio C Hamano3-3/+3
Code clean-up. * en/double-semicolon-fix: Remove superfluous trailing semicolons
2018-11-21Merge branch 'tb/void-check-attr' into maintLibravatar Junio C Hamano9-69/+57
Code clean-up. * tb/void-check-attr: Make git_check_attr() a void function
2018-11-21Merge branch 'sg/doc-trace-appends' into maintLibravatar Junio C Hamano1-2/+2
Docfix. * sg/doc-trace-appends: Documentation/git.txt: clarify that GIT_TRACE=/path appends
2018-11-21Merge branch 'tg/conflict-marker-size' into maintLibravatar Junio C Hamano1-0/+4
Developer aid. * tg/conflict-marker-size: .gitattributes: add conflict-marker-size for relevant files
2018-11-21Merge branch 'ts/doc-build-manpage-xsl-quietly' into maintLibravatar Junio C Hamano1-1/+1
Build tweak. * ts/doc-build-manpage-xsl-quietly: Documentation/Makefile: make manpage-base-url.xsl generation quieter
2018-11-21Merge branch 'jk/detect-truncated-zlib-input' into maintLibravatar Junio C Hamano3-7/+35
A regression in Git 2.12 era made "git fsck" fall into an infinite loop while processing truncated loose objects. * jk/detect-truncated-zlib-input: cat-file: handle streaming failures consistently check_stream_sha1(): handle input underflow t1450: check large blob in trailing-garbage test
2018-11-21Merge branch 'sg/test-verbose-log' into maintLibravatar Junio C Hamano2-2/+3
Our test scripts can now take the '-V' option as a synonym for the '--verbose-log' option. * sg/test-verbose-log: test-lib: introduce the '-V' short option for '--verbose-log'
2018-11-21Merge branch 'ss/travis-ci-force-vm-mode' into maintLibravatar Junio C Hamano1-2/+0
The "container" mode of TravisCI is going away. Our .travis.yml file is getting prepared for the transition. * ss/travis-ci-force-vm-mode: travis-ci: no longer use containers
2018-11-21Merge branch 'md/exclude-promisor-objects-fix' into maintLibravatar Junio C Hamano8-2/+15
Operations on promisor objects make sense in the context of only a small subset of the commands that internally use the revisions machinery, but the "--exclude-promisor-objects" option were taken and led to nonsense results by commands like "log", to which it didn't make much sense. This has been corrected. * md/exclude-promisor-objects-fix: exclude-promisor-objects: declare when option is allowed Documentation/git-log.txt: do not show --exclude-promisor-objects
2018-11-21Merge branch 'js/shallow-and-fetch-prune' into maintLibravatar Junio C Hamano5-8/+54
"git repack" in a shallow clone did not correctly update the shallow points in the repository, leading to a repository that does not pass fsck. * js/shallow-and-fetch-prune: repack -ad: prune the list of shallow commits shallow: offer to prune only non-existing entries repack: point out a bug handling stale shallow info
2018-11-21Merge branch 'jc/receive-deny-current-branch-fix' into maintLibravatar Junio C Hamano2-4/+16
The receive.denyCurrentBranch=updateInstead codepath kicked in even when the push should have been rejected due to other reasons, such as it does not fast-forward or the update-hook rejects it, which has been corrected. * jc/receive-deny-current-branch-fix: receive: denyCurrentBranch=updateinstead should not blindly update
2018-11-21Merge branch 'js/diff-notice-has-drive-prefix' into maintLibravatar Junio C Hamano2-2/+12
Under certain circumstances, "git diff D:/a/b/c D:/a/b/d" on Windows would strip initial parts from the paths because they were not recognized as absolute, which has been corrected. * js/diff-notice-has-drive-prefix: diff: don't attempt to strip prefix from absolute Windows paths
2018-11-21Merge branch 'js/pack-objects-mutex-init-fix' into maintLibravatar Junio C Hamano4-2/+36
A mutex used in "git pack-objects" were not correctly initialized and this caused "git repack" to dump core on Windows. * js/pack-objects-mutex-init-fix: pack-objects (mingw): initialize `packing_data` mutex in the correct spot pack-objects (mingw): demonstrate a segmentation fault with large deltas pack-objects: fix typo 'detla' -> 'delta'
2018-11-21Merge branch 'jk/run-command-notdot' into maintLibravatar Junio C Hamano2-5/+29
The implementation of run_command() API on the UNIX platforms had a bug that caused a command not on $PATH to be found in the current directory. * jk/run-command-notdot: run-command: mark path lookup errors with ENOENT
2018-11-21Merge branch 'np/log-graph-octopus-fix' into maintLibravatar Junio C Hamano2-15/+145
"git log --graph" showing an octopus merge sometimes miscounted the number of display columns it is consuming to show the merge and its parent commits, which has been corrected. * np/log-graph-octopus-fix: log: fix coloring of certain octopus merge shapes