Commit Graph

41421 Commits

Author SHA1 Message Date
Jeff King
e0dd81b08e Merge branch 'js/test-modernize-t9300'
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-01 18:54:37 -05:00
Jeff King
d0e8377b90 Merge branch 'jk/send-email-expand-paths'
Expand paths in some send-email config variables.

* jk/send-email-expand-paths:
  send-email: expand path in sendemail.smtpsslcertpath config
2015-12-01 18:54:34 -05:00
Jeff King
30fe9b2f9a Merge branch 'dg/subtree-test-cleanup'
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-01 18:54:31 -05:00
Jeff King
23bc35f3dc Merge branch 'dt/http-range'
Portability fix for a topic already in 'master'.

* dt/http-range:
  http: fix some printf format warnings
2015-12-01 18:54:28 -05:00
Jeff King
40fdcc5357 Merge branch 'maint'
* 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-01 17:32:38 -05:00
Jeff King
908a6e4156 Merge branch 'eg/p4-submit-catch-failure' into maint
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-01 17:24:21 -05:00
Jeff King
35f263545c Merge branch 'dk/check-ignore-docs' into maint
Documentation clarification for "check-ignore" without "--verbose".

* dk/check-ignore-docs:
  check-ignore: correct documentation about output
2015-12-01 17:21:32 -05:00
Jeff King
5b228f956a Merge branch 'ld/p4-detached-head' into maint
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-01 17:21:29 -05:00
Jeff King
978b5760a1 Merge branch 'sg/filter-branch-dwim-ambiguity' into maint
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-01 17:21:17 -05:00
Jeff King
2cc36407df Merge branch 'mg/doc-word-diff-example' into maint
* mg/doc-word-diff-example:
  Documentation/diff: give --word-diff-regex=. example
2015-12-01 17:21:11 -05:00
Jeff King
712a12e506 Merge branch 'cb/ssl-config-pathnames' into maint
Allow tilde-expansion in some http config variables.

* cb/ssl-config-pathnames:
  http: treat config options sslCAPath and sslCAInfo as paths
2015-12-01 17:21:01 -05:00
Jeff King
76fdb0640e Merge branch 'dk/t5813-unc-paths' into maint
Test portability fix for a topic in v2.6.1.

* dk/t5813-unc-paths:
  t5813: avoid creating urls that break on cygwin
2015-12-01 17:20:52 -05:00
Jeff King
3840d2d617 Merge branch 'dk/rerere-train-quoting' into maint
Fix shell quoting in contrib script.

* dk/rerere-train-quoting:
  Escape Git's exec path in contrib/rerere-train.sh script
2015-12-01 17:20:46 -05:00
Jeff King
347acea06a Merge branch 'cb/hook-sigpipe' into maint
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-01 17:19:52 -05:00
Jeff King
45e330f512 Merge branch 'fm/shell-path-whitespace' into maint
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-01 17:19:37 -05:00
Jeff King
2945adcc2d Merge branch 'ar/doc-env-variable-format' into maint
Minor documentation fixup.

* ar/doc-env-variable-format:
  Documentation: make environment variable formatting more consistent
2015-12-01 17:19:33 -05:00
Jeff King
92b9bf4a15 Merge branch 'pt/http-socks-proxy' into maint
Add support for talking http/https over socks proxy.

* pt/http-socks-proxy:
  remote-http(s): support SOCKS proxies
2015-12-01 17:19:12 -05:00
Jeff King
cd76778049 Merge branch 'rc/configure-use-libs-when-checking-a-lib' into maint
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-12-01 17:19:06 -05:00
Jeff King
1bc8feaa7c Merge branch 'fp/subtree-todo-update'
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-24 19:06:54 -05:00
Jeff King
a3824e7145 Merge branch 'rc/configure-use-libs-when-checking-a-lib'
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-24 19:06:33 -05:00
Jeff King
718a9e67b6 Merge branch 'maint'
* maint:
  Documentation/git-update-index: add missing opts to synopsys
2015-11-24 19:04:41 -05:00
Charles Bailey
bf9acba2c1 http: treat config options sslCAPath and sslCAInfo as paths
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-24 18:51:00 -05:00
Michael J Gruber
2c15c00651 Documentation/diff: give --word-diff-regex=. example
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-24 18:38:46 -05:00
SZEDER Gábor
4d2a3646d1 filter-branch: deal with object name vs. pathname ambiguity in tree-filter
'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-24 18:37:50 -05:00
Dennis Kaarsemaker
219cbf091a check-ignore: correct documentation about output
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-24 17:13:36 -05:00
Christian Couder
5cb2e162d2 Documentation/git-update-index: add missing opts to synopsys
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-24 15:44:40 -05:00
GIRARD Etienne
b7638fed42 git-p4: clean up after p4 submit failure
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-24 15:41:59 -05:00
Luke Diamand
00ad6e3182 git-p4: work with a detached head
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-24 15:20:15 -05:00
Luke Diamand
cbff4b25e4 git-p4: add option to system() to return subshell status
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-24 15:20:15 -05:00
Luke Diamand
74b6fe9202 git-p4: add failing test for submit from detached head
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-24 15:20:15 -05:00
Johannes Sixt
68297e0fd8 modernize t9300: move test preparations into test_expect_success
Our usual style these days is to execute everything inside
test_expect_success. Make it so.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
John Keeping
6e07a3b51b send-email: expand path in sendemail.smtpsslcertpath config
As it says in the name, the SSL certificate path is a path so treat it
as one and support tilde-expansion.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Johannes Sixt
0ca2972345 modernize t9300: mark here-doc words to ignore tab indentation
In the next commit, we will indent test case preparations. This will
require that here-documents ignore the tab indentation. Prepare for
this change by marking the here-doc words accordingly. This does not
have an effect now, but will remove some noise from the git diff -b
output of the next commit.

The change here is entirely automated with this perl command:

  perl -i -lpe 's/(cat.*<<) *((EOF|(EXPECT|INPUT)_END).*$)/$1-$2 &&/' t/t9300-fast-import.sh

i.e., inserts a dash between << and the EOF word (and removes blanks
that our style guide abhors) and appends the && that will become
necessary.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Johannes Sixt
93e911f5ae modernize t9300: use test_when_finished for clean-up
A number of clean-ups of test cases are performed outside of
test_expect_success. Replace these cases by using test_when_finished.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Johannes Sixt
ec2c10bef8 modernize t9300: wrap lines after &&
It is customary to have each command in test snippets on its own line.
Fix those instances that do not follow this guideline.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Johannes Sixt
acf3af25fb modernize t9300: use test_must_be_empty
Instead of comparing actual output to an empty file, use
test_must_be_empty. In addition to the better error message provided by
the helper, allocation of an empty file during the setup sequence can be
avoided.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Johannes Sixt
b08d82f0e8 modernize t9300: use test_must_fail
One test case open-codes a test for an expected failure. Replace it by
test_must_fail.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Johannes Sixt
d67824feaa modernize t9300: single-quote placement and indentation
Many test cases do not follow our modern style that places the
single-quotes that surround the shell code snippets before and after
the shell code. Make it so.

Many of the lines changed in this way are indented other than by a
single tab. Change them (and some additional lines) to be indented
with a tab.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 08:02:06 -05:00
Pat Thoyts
6d7afe07f2 remote-http(s): support SOCKS proxies
With this patch we properly support SOCKS proxies, configured e.g. like
this:

	git config http.proxy socks5://192.168.67.1:32767

Without this patch, Git mistakenly tries to use SOCKS proxies as if they
were HTTP proxies, resulting in a error message like:

	fatal: unable to access 'http://.../': Proxy CONNECT aborted

This patch was required to work behind a faulty AP and scraped from
http://stackoverflow.com/questions/15227130/#15228479 and guarded with
an appropriate cURL version check by Johannes Schindelin.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-20 07:31:39 -05:00
Jeff King
0c83680e9c Merge branch 'master' of git://git.bogomips.org/git-svn
* 'master' of git://git.bogomips.org/git-svn:
  git-svn: improve rebase/mkdirs performance
2015-11-20 06:56:58 -05:00
Jeff King
dbba85e46b Merge branch 'lf/ref-is-hidden-namespace'
Extend transfer.hideRefs to work better with use of namespaces.

* lf/ref-is-hidden-namespace:
  t5509: add basic tests for hideRefs
  hideRefs: add support for matching full refs
  upload-pack: strip refs before calling ref_is_hidden()
  config.txt: document the semantics of hideRefs with namespaces
2015-11-20 06:56:11 -05:00
Jeff King
45014beac0 Merge branch 'dk/gc-idx-wo-pack'
Having a leftover .idx file without corresponding .pack file in
the repository hurts performance; "git gc" learned to prune them.

* dk/gc-idx-wo-pack:
  gc: remove garbage .idx files from pack dir
  t5304: test cleaning pack garbage
  prepare_packed_git(): refactor garbage reporting in pack directory
2015-11-20 06:55:34 -05:00
Dennis Kaarsemaker
681390b3f6 t5813: avoid creating urls that break on cygwin
When passed an ssh:// url, git strips ssh://host from the url but does
not remove leading slashes from the path. So when this test used
ssh://remote//path/to/pwd, the path accessed by our fake SSH is
//path/to/pwd, which cygwin interprets as a UNC path, causing the test
to fail.

We may want to actually fix this in git itself, making it remove extra
slashes from urls before feeding them to transports or helpers, but
that's for another topic as it could cause regressions.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 06:46:48 -05:00
Daniel Knittl-Frank
4573a68e9b Escape Git's exec path in contrib/rerere-train.sh script
Whitespace can cause the source command to fail. This is usually not a
problem on Unix systems, but on Windows Git is likely to be installed
under "C:/Program Files/", thus rendering the script broken.

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-20 06:43:00 -05:00
Clemens Buchacher
af65f68cdf allow hooks to ignore their standard input stream
Since ec7dbd145 (receive-pack: allow hooks to ignore its
standard input stream) the pre-receive and post-receive
hooks ignore SIGPIPE. Do the same for the remaining hooks
pre-push and post-rewrite, which read from standard input.
The same arguments for ignoring SIGPIPE apply.

Include test by Jeff King which checks that SIGPIPE does not
cause pre-push hook failure. With the use of git update-ref
--stdin it is fast enough to be enabled by default.

Signed-off-by: Clemens Buchacher <clemens.buchacher@intel.com>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-16 08:59:19 -05:00
Fredrik Medley
fe9394ad3e rebase-i-exec: Allow space in SHELL_PATH
On Windows, when Git is installed under "C:\Program Files\Git",
SHELL_PATH will include a space. Fix "git rebase --interactive --exec"
so that it works with spaces in SHELL_PATH.

Signed-off-by: Fredrik Medley <fredrik.medley@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-13 17:51:39 -05:00
Techlive Zheng
d16031caf1 contrib/subtree: Handle '--prefix' argument with a slash appended
'git subtree merge' will fail if the argument of '--prefix' has a slash
appended.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-13 00:02:56 -05:00
Techlive Zheng
43711746bd contrib/subtree: Make each test self-contained
Each test runs a full repository creation and any subtree actions
needed to perform the test.  Each test starts with a clean slate,
making debugging and post-mortem analysis much easier.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-13 00:02:56 -05:00
Techlive Zheng
4fe2e33cc9 contrib/subtree: Add split tests
Add tests to check various options to split.  Check combinations of
--prefix, --message, --annotate, --branch and --rejoin.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-13 00:02:56 -05:00
Techlive Zheng
4f96fcc9a2 contrib/subtree: Add merge tests
Add some tests for various merge operations.  Test combinations of merge
with --message, --prefix and --squash.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>
2015-11-13 00:02:56 -05:00