summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-01Merge branch 'rs/fsck-nul-header'Jeff King
Fsck did not correctly detect a NUL-truncated header in a tag. * rs/fsck-nul-header: fsck: treat a NUL in a tag header as an error t1450: add tests for NUL in headers of commits and tags
2015-12-01Merge branch 'ls/p4-test-timeouts'Jeff King
Work around some test flakiness with p4d. * ls/p4-test-timeouts: git-p4: add trap to kill p4d on test exit git-p4: add p4d timeout in tests git-p4: retry kill/cleanup operations in tests with timeout
2015-12-01Merge branch 'js/test-modernize-t9300'Jeff King
Clean up style in an ancient test. * js/test-modernize-t9300: modernize t9300: move test preparations into test_expect_success modernize t9300: mark here-doc words to ignore tab indentation modernize t9300: use test_when_finished for clean-up modernize t9300: wrap lines after && modernize t9300: use test_must_be_empty modernize t9300: use test_must_fail modernize t9300: single-quote placement and indentation
2015-12-01Merge branch 'jk/send-email-expand-paths'Jeff King
Expand paths in some send-email config variables. * jk/send-email-expand-paths: send-email: expand path in sendemail.smtpsslcertpath config
2015-12-01Merge branch 'dg/subtree-test-cleanup'Jeff King
Test cleanups for the subtree project. * dg/subtree-test-cleanup: contrib/subtree: Handle '--prefix' argument with a slash appended contrib/subtree: Make each test self-contained contrib/subtree: Add split tests contrib/subtree: Add merge tests contrib/subtree: Add tests for subtree add contrib/subtree: Add test for missing subtree contrib/subtree: Clean and refactor test code
2015-12-01Merge branch 'dt/http-range'Jeff King
Portability fix for a topic already in 'master'. * dt/http-range: http: fix some printf format warnings
2015-12-01verify_pack: do not ignore return value of verification functionDavid Turner
In verify_pack, a caller-supplied verification function is called. The function returns an int. If that return value is non-zero, verify_pack should fail. The only caller of verify_pack is in builtin/fsck.c, whose verify_fn returns a meaningful error code (which was then ignored). Now, fsck might return a different error code (with more detail). This would happen in the unlikely event that a commit or tree that is a valid git object but not a valid instance of its type gets into a pack. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Jeff King <peff@peff.net>
2015-12-01Make error message after failing commit_lock_file() less confusingSZEDER Gábor
The error message after a failing commit_lock_file() call sometimes looks like this, causing confusion: $ git remote add remote git@server.com/repo.git error: could not commit config file .git/config # Huh?! # I didn't want to commit anything, especially not my config file! While in the narrow context of the lockfile module using the verb 'commit' in the error message makes perfect sense, in the broader context of git the word 'commit' already has a very specific meaning, hence the confusion. Reword these error messages to say "could not write" instead of "could not commit". While at it, include strerror in the error messages after writing the config file or the credential store fails to provide some information about the cause of the failure, and update the style of the error message after writing the reflog fails to match surrounding error messages (i.e. no '' around the pathname and no () around the error description). Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
2015-12-01Merge branch 'maint'Jeff King
* maint: http: treat config options sslCAPath and sslCAInfo as paths Documentation/diff: give --word-diff-regex=. example filter-branch: deal with object name vs. pathname ambiguity in tree-filter check-ignore: correct documentation about output git-p4: clean up after p4 submit failure git-p4: work with a detached head git-p4: add option to system() to return subshell status git-p4: add failing test for submit from detached head remote-http(s): support SOCKS proxies t5813: avoid creating urls that break on cygwin Escape Git's exec path in contrib/rerere-train.sh script allow hooks to ignore their standard input stream rebase-i-exec: Allow space in SHELL_PATH Documentation: make environment variable formatting more consistent
2015-12-01Merge branch 'eg/p4-submit-catch-failure' into maintJeff King
Just like the working tree is cleaned up when the user cancelled submission in P4Submit.applyCommit(), clean up the mess if "p4 submit" fails. * eg/p4-submit-catch-failure: git-p4: clean up after p4 submit failure
2015-12-01Merge branch 'dk/check-ignore-docs' into maintJeff King
Documentation clarification for "check-ignore" without "--verbose". * dk/check-ignore-docs: check-ignore: correct documentation about output
2015-12-01Merge branch 'ld/p4-detached-head' into maintJeff King
Make git-p4 work on a detached head. * ld/p4-detached-head: git-p4: work with a detached head git-p4: add option to system() to return subshell status git-p4: add failing test for submit from detached head
2015-12-01Merge branch 'sg/filter-branch-dwim-ambiguity' into maintJeff King
Fix for a corner case in filter-branch. * sg/filter-branch-dwim-ambiguity: filter-branch: deal with object name vs. pathname ambiguity in tree-filter
2015-12-01Merge branch 'mg/doc-word-diff-example' into maintJeff King
* mg/doc-word-diff-example: Documentation/diff: give --word-diff-regex=. example
2015-12-01Merge branch 'cb/ssl-config-pathnames' into maintJeff King
Allow tilde-expansion in some http config variables. * cb/ssl-config-pathnames: http: treat config options sslCAPath and sslCAInfo as paths
2015-12-01Merge branch 'dk/t5813-unc-paths' into maintJeff King
Test portability fix for a topic in v2.6.1. * dk/t5813-unc-paths: t5813: avoid creating urls that break on cygwin
2015-12-01Merge branch 'dk/rerere-train-quoting' into maintJeff King
Fix shell quoting in contrib script. * dk/rerere-train-quoting: Escape Git's exec path in contrib/rerere-train.sh script
2015-12-01Merge branch 'cb/hook-sigpipe' into maintJeff King
We now consistently allow all hooks to ignore their standard input, rather than having git complain of SIGPIPE. * cb/hook-sigpipe: allow hooks to ignore their standard input stream
2015-12-01Merge branch 'fm/shell-path-whitespace' into maintJeff King
Portability fix for Windows, which may rewrite $SHELL variable using non-POSIX paths. * fm/shell-path-whitespace: rebase-i-exec: Allow space in SHELL_PATH
2015-12-01Merge branch 'ar/doc-env-variable-format' into maintJeff King
Minor documentation fixup. * ar/doc-env-variable-format: Documentation: make environment variable formatting more consistent
2015-12-01Merge branch 'pt/http-socks-proxy' into maintJeff King
Add support for talking http/https over socks proxy. * pt/http-socks-proxy: remote-http(s): support SOCKS proxies
2015-12-01Merge branch 'rc/configure-use-libs-when-checking-a-lib' into maintJeff King
The "configure" script did not test for -lpthread correctly, which upset some linkers. * rc/configure-use-libs-when-checking-a-lib: configure.ac: use $LIBS not $CFLAGS when testing -lpthread
2015-11-28wt-status: correct and simplify check for detached HEADRené Scharfe
If a branch name is longer than four characters then memcmp() reads over the end of the static string "HEAD". This causes the following test failures with AddressSanitizer: t3203-branch-output.sh (Wstat: 256 Tests: 18 Failed: 4) Failed tests: 12, 15-17 Non-zero exit status: 1 t3412-rebase-root.sh (Wstat: 256 Tests: 31 Failed: 3) Failed tests: 28-29, 31 Non-zero exit status: 1 t3507-cherry-pick-conflict.sh (Wstat: 256 Tests: 31 Failed: 4) Failed tests: 14, 29-31 Non-zero exit status: 1 t3510-cherry-pick-sequence.sh (Wstat: 256 Tests: 39 Failed: 14) Failed tests: 17, 22-26, 28-30, 34-35, 37-39 Non-zero exit status: 1 t3420-rebase-autostash.sh (Wstat: 256 Tests: 28 Failed: 4) Failed tests: 24-27 Non-zero exit status: 1 t3404-rebase-interactive.sh (Wstat: 256 Tests: 91 Failed: 57) Failed tests: 17, 19, 21-42, 44, 46-74, 77, 81-82 Non-zero exit status: 1 t3900-i18n-commit.sh (Wstat: 256 Tests: 34 Failed: 1) Failed test: 34 Non-zero exit status: 1 t5407-post-rewrite-hook.sh (Wstat: 256 Tests: 14 Failed: 6) Failed tests: 9-14 Non-zero exit status: 1 t7001-mv.sh (Wstat: 256 Tests: 46 Failed: 5) Failed tests: 39-43 Non-zero exit status: 1 t7509-commit.sh (Wstat: 256 Tests: 12 Failed: 2) Failed tests: 11-12 Non-zero exit status: 1 t7512-status-help.sh (Wstat: 256 Tests: 39 Failed: 35) Failed tests: 5-39 Non-zero exit status: 1 t6030-bisect-porcelain.sh (Wstat: 256 Tests: 70 Failed: 1) Failed test: 13 Non-zero exit status: 1 And if a branch is named "H", "HE", or "HEA" then the current if clause erroneously considers it as matching "HEAD" because it only compares up to the end of the branch name. Fix that by doing the comparison using strcmp() and only after the branch name is extracted. This way neither too less nor too many characters are checked. While at it call strchrnul() to find the end of the branch name instead of open-coding it. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-28ident.c: add support for IPv6Elia Pinto
Add IPv6 support by implementing name resolution with the protocol agnostic getaddrinfo(3) API. The old gethostbyname(3) code is still available when git is compiled with NO_IPV6. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Helped-by: Jeff King <peff@peff.net> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jeff King <peff@peff.net>
2015-11-28Add Travis CI supportLars Schneider
The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang. Perforce and Git-LFS are installed and therefore available for the respective tests. Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
2015-11-28add "ok=sigpipe" to test_must_fail and use it to fix flaky testsLars Schneider
t5516 "75 - deny fetch unreachable SHA1, allowtipsha1inwant=true" is flaky in the following case: 1. remote upload-pack finds out "not our ref" 2. remote sends a response and closes the pipe 3. fetch-pack still tries to write commands to the remote upload-pack 4. write call in wrapper.c dies with SIGPIPE The test is flaky because the sending fetch-pack may or may not have finished writing its output by step (3). If it did, then we see a closed pipe on the next read() call. If it didn't, then we get the SIGPIPE from step (4) above. Both are fine, but the latter fools test_must_fail. t5504 "9 - push with transfer.fsckobjects" is flaky, too, and returns SIGPIPE once in a while. I had to remove the final "To dst..." output check because there is no output if the process dies with SIGPIPE. Accept such a death-with-sigpipe also as OK when we are expecting a failure. Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
2015-11-28implement test_might_fail using a refactored test_must_failLars Schneider
Add an (optional) first parameter "ok=<special case>" to test_must_fail and return success for "<special case>". Add "success" as "<special case>" and use it to implement "test_might_fail". This removes redundancies in test-lib-function.sh. You can pass multiple <special case> arguments divided by comma (e.g. "test_must_fail ok=success,something") Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Jeff King <peff@peff.net>
2015-11-25Merge branch 'fp/subtree-todo-update'Jeff King
Cross completed task off of subtree project's todo list. * fp/subtree-todo-update: contrib/subtree: remove "push" command from the "todo" file
2015-11-25Merge branch 'rc/configure-use-libs-when-checking-a-lib'Jeff King
The "configure" script did not test for -lpthread correctly, which upset some linkers. * rc/configure-use-libs-when-checking-a-lib: configure.ac: use $LIBS not $CFLAGS when testing -lpthread
2015-11-25Merge branch 'maint'Jeff King
* maint: Documentation/git-update-index: add missing opts to synopsys
2015-11-24http: treat config options sslCAPath and sslCAInfo as pathsCharles Bailey
This enables ~ and ~user expansion for these config options. Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24Documentation/diff: give --word-diff-regex=. exampleMichael J Gruber
It's just so useful. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24filter-branch: deal with object name vs. pathname ambiguity in tree-filterSZEDER Gábor
'git filter-branch' fails complaining about an ambiguous argument, if a tree-filter renames a path and the new pathname happens to match an existing object name. After the tree-filter has been applied, 'git filter-branch' looks for changed paths by running: git diff-index -r --name-only --ignore-submodules $commit which then, because of the lack of disambiguating double-dash, can't decide whether to treat '$commit' as revision or path and errors out. Add that disambiguating double-dash after 'git diff-index's revision argument to make sure that '$commit' is interpreted as a revision. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24send-email: die if CA path doesn't existJohn Keeping
If the CA path isn't found it's most likely to indicate a misconfiguration, in which case accepting any certificate is unlikely to be the correct thing to do. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24check-ignore: correct documentation about outputDennis Kaarsemaker
By default git check-ignore shows only the filenames that will be ignored, not the pattern that causes their exclusion. Instead of moving the partial exclude pattern precendence information to the -v option where it belongs, link to gitignore(5) which describes this more thoroughly. Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24blame: fix object casting regressionJeff King
Commit 1b0d400 refactored the prepare_final() function so that it could be reused in multiple places. Originally, the loop had two outputs: a commit to stuff into sb->final, and the name of the commit from the rev->pending array. After the refactor, that loop is put in its own function with a single return value: the object_array_entry from the rev->pending array. This contains both the name and the object, but with one important difference: the object is the _original_ object found by the revision parser, not the dereferenced commit. If one feeds a tag to "git blame", we end up casting the tag object to a "struct commit", which causes a segfault. Instead, let's return the commit (properly casted) directly from the function, and take the "name" as an optional out-parameter. This does the right thing, and actually simplifies the callers, who no longer need to cast or dereference the object_array_entry themselves. [test case by Max Kirillov <max@max630.net>] Signed-off-by: Jeff King <peff@peff.net>
2015-11-24Documentation/git-update-index: add missing opts to synopsysChristian Couder
Untracked cache related options should appear in the synopsis. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24git-p4: clean up after p4 submit failureGIRARD Etienne
When "p4 submit" command fails in P4Submit.applyCommit, the workspace is left with the changes. We already have code to revert the changes to the workspace when the user decides to cancel submission by aborting the editor that edits the change description, and we should treat the "p4 submit" failure the same way. Clean the workspace if p4_write_pipe raised SystemExit, so that the user don't have to do it themselves. Signed-off-by: GIRARD Etienne <egirard@murex.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24bash prompt: indicate dirty index even on orphan branchesSZEDER Gábor
__git_ps1() doesn't indicate dirty index while on an orphan branch. To check the dirtiness of the index, __git_ps1() runs 'git diff-index --cached ... HEAD', which doesn't work on an orphan branch, because HEAD doesn't point to a valid commit. Run 'git diff ... --cached' instead, as it does the right thing both on valid and invalid HEAD, i.e. compares the index to the existing HEAD in the former case and to the empty tree in the latter. This fixes the two failing tests added in the first commit of this series. The dirtiness of the worktree is already checked with 'git diff' and is displayed correctly even on an orphan branch. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24bash prompt: remove a redundant 'git diff' optionSZEDER Gábor
To get the dirty state indicator __git_ps1() runs 'git diff' with '--quiet --exit-code' options. '--quiet' already implies '--exit-code', so the latter is unnecessary and can be removed. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24bash prompt: test dirty index and worktree while on an orphan branchSZEDER Gábor
There is only a single test exercising the dirty state indicator on an orphan branch, and in that test neither the index nor the worktree are dirty. Add two failing tests to check the dirty state indicator while either the index is dirty or while both the index and the worktree are dirty on an orphan branch, and to show that the dirtiness of the index is not displayed in these cases (the fourth combination, i.e. clean index and dirty worktree are impossible on an orphan branch). Update the existing dirty state indicator on clean orphan branch test to match the style of the two new tests, most importantly to use 'git checkout --orphan' instead of cd-ing into a repository that just happens to be empty and clean. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24git-p4: work with a detached headLuke Diamand
When submitting, git-p4 finds the current branch in order to know if it is allowed to submit (configuration "git-p4.allowSubmit"). On a detached head, detecting the branch would fail, and git-p4 would report a cryptic error. This change teaches git-p4 to recognise a detached head and submit successfully. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24git-p4: add option to system() to return subshell statusLuke Diamand
Add an optional parameter ignore_error to the git-p4 system() function. If used, it will return the subshell exit status rather than throwing an exception. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Jeff King <peff@peff.net>
2015-11-24git-p4: add failing test for submit from detached headLuke Diamand
git-p4 can't submit from a detached head. This test case demonstrates the problem. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Jeff King <peff@peff.net>
2015-11-20push: add recurseSubmodules config optionMike Crowe
The --recurse-submodules command line parameter has existed for some time but it has no config file equivalent. Following the style of the corresponding parameter for git fetch, let's invent push.recurseSubmodules to provide a default for this parameter. This also requires the addition of --recurse-submodules=no to allow the configuration to be overridden on the command line when required. The most straightforward way to implement this appears to be to make push use code in submodule-config in a similar way to fetch. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Jeff King <peff@peff.net>
2015-11-20credential-cache: new option to ignore sighupNoam Postavsky
Introduce new option "credentialCache.ignoreSIGHUP" which stops git-credential-cache--daemon from quitting on SIGHUP. This is useful when "git push" is started from Emacs, because all child processes (including the daemon) will receive a SIGHUP when "git push" exits. Signed-off-by: Noam Postavsky <npostavs@users.sourceforge.net> Signed-off-by: Jeff King <peff@peff.net>
2015-11-20show-ref: stop using PARSE_OPT_NO_INTERNAL_HELPRené Scharfe
The flag PARSE_OPT_NO_INTERNAL_HELP is set to allow overriding the option -h, except when it's the only one given. This is the default behavior now, so remove the flag and the hand-rolled --help-all handling. The internal --help-all handler now actually shows hidden options, i.e. -h in this case. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-20fsck: treat a NUL in a tag header as an errorRené Scharfe
We check the return value of verify_header() for commits already, so do the same for tags as well. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-20grep: stop using PARSE_OPT_NO_INTERNAL_HELPRené Scharfe
The flag PARSE_OPT_NO_INTERNAL_HELP is set to allow overriding the option -h, except when it's the only one given. This is the default behavior now, so remove the flag and the hand-rolled --help-all handling. The internal --help-all handler now actually shows hidden options, i.e. --debug in this case. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>
2015-11-20t1450: add tests for NUL in headers of commits and tagsRené Scharfe
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net>