summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2013-04-21Merge branch 'jk/doc-http-backend'Libravatar Junio C Hamano2-0/+48
Improve documentation to illustrate "push authenticated, fetch anonymous" configuration for smart HTTP servers. * jk/doc-http-backend: doc/http-backend: match query-string in apache half-auth example doc/http-backend: give some lighttpd config examples doc/http-backend: clarify "half-auth" repo configuration
2013-04-19Merge branch 'rt/commentchar-fmt-merge-msg'Libravatar Junio C Hamano1-3/+3
A test fix for recent update. * rt/commentchar-fmt-merge-msg: t6200: avoid path mangling issue on Windows
2013-04-19Merge branch 'mv/sequencer-pick-error-diag'Libravatar Junio C Hamano1-0/+6
"git cherry-pick $blob $tree" is diagnosed as a nonsense. * mv/sequencer-pick-error-diag: cherry-pick: make sure all input objects are commits
2013-04-18Merge branch 'jk/test-trash'Libravatar Junio C Hamano1-9/+9
Fix longstanding issues with the test harness when used with --root=<there> option. * jk/test-trash: t/test-lib.sh: drop "$test" variable t/test-lib.sh: fix TRASH_DIRECTORY handling
2013-04-18Merge branch 'th/t9903-symlinked-workdir'Libravatar Junio C Hamano1-5/+5
* th/t9903-symlinked-workdir: t9903: Don't fail when run from path accessed through symlink
2013-04-18Merge branch 'jk/merge-tree-added-identically'Libravatar Junio C Hamano1-10/+0
The resolution of some corner cases by "git merge-tree" were inconsistent between top-of-the-tree and in a subdirectory. * jk/merge-tree-added-identically: merge-tree: don't print entries that match "local"
2013-04-18Merge branch 'jk/http-dumb-namespaces'Libravatar Junio C Hamano2-0/+29
Allow smart-capable HTTP servers to be restricted via the GIT_NAMESPACE mechanism when talking with commit-walker clients (they already do so when talking with smart HTTP clients). * jk/http-dumb-namespaces: http-backend: respect GIT_NAMESPACE with dumb clients
2013-04-18Merge branch 'rs/empty-archive'Libravatar Junio C Hamano1-1/+1
Implementations of "tar" of BSD descend have found to have trouble with reading an otherwise empty tar archive with pax headers and causes an unnecessary test failure. * rs/empty-archive: t5004: fix issue with empty archive test and bsdtar
2013-04-18Merge branch 'fc/send-email-annotate'Libravatar Junio C Hamano1-0/+33
Allows format-patch --cover-letter to be configurable; the most notable is the "auto" mode to create cover-letter only for multi patch series. * fc/send-email-annotate: rebase-am: explicitly disable cover-letter format-patch: trivial cleanups format-patch: add format.coverLetter configuration variable log: update to OPT_BOOL format-patch: refactor branch name calculation format-patch: improve head calculation for cover-letter send-email: make annotate configurable
2013-04-18Merge branch 'jc/push-2.0-default-to-simple' (early part)Libravatar Junio C Hamano12-16/+24
Adjust our tests for upcoming migration of the default value for the "push.default" configuration variable to "simple" from "mixed". * 'jc/push-2.0-default-to-simple' (early part): t5570: do not assume the "matching" push is the default t5551: do not assume the "matching" push is the default t5550: do not assume the "matching" push is the default t9401: do not assume the "matching" push is the default t9400: do not assume the "matching" push is the default t7406: do not assume the "matching" push is the default t5531: do not assume the "matching" push is the default t5519: do not assume the "matching" push is the default t5517: do not assume the "matching" push is the default t5516: do not assume the "matching" push is the default t5505: do not assume the "matching" push is the default t5404: do not assume the "matching" push is the default
2013-04-18Merge branch 'fc/completion'Libravatar Junio C Hamano1-2/+63
In addition to a user visible change to offer more options to cherry-pick, generally cleans up and simplifies the code. * fc/completion: completion: small optimization completion: inline __gitcomp_1 to its sole callsite completion: get rid of compgen completion: add __gitcomp_nl tests completion: add new __gitcompadd helper completion: get rid of empty COMPREPLY assignments completion: trivial test improvement completion: add more cherry-pick options
2013-04-18t6200: avoid path mangling issue on WindowsLibravatar Johannes Sixt1-3/+3
MSYS bash interprets the slash in the argument core.commentchar="/" as root directory and mangles it into a Windows style path. Use a different core.commentchar to dodge the issue. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15Merge branch 'rt/commentchar-fmt-merge-msg'Libravatar Junio C Hamano1-0/+18
The new core.commentchar configuration was not applied to a few places. * rt/commentchar-fmt-merge-msg: fmt-merge-msg: use core.commentchar in tag signatures completely fmt-merge-msg: respect core.commentchar in people credits
2013-04-15Merge branch 'lf/bundle-with-tip-wo-message'Libravatar Junio C Hamano1-0/+10
"git bundle" did not like a bundle created using a commit without any message as its one of the prerequistes. * lf/bundle-with-tip-wo-message: bundle: Accept prerequisites without commit messages
2013-04-15Merge branch 'tr/perl-keep-stderr-open'Libravatar Junio C Hamano1-1/+2
Closing (not redirecting to /dev/null) the standard error stream is not a very smart thing to do. Later open may return file descriptor #2 for unrelated purpose, and error reporting code may write into them. * tr/perl-keep-stderr-open: t9700: do not close STDERR perl: redirect stderr to /dev/null instead of closing
2013-04-14t/test-lib.sh: drop "$test" variableLibravatar Jeff King1-5/+5
The $test variable is used as an interim buffer for constructing $TRASH_DIRECTORY, and is almost compatible with it (the exception being that $test has not been converted to an absolute path). Let's get rid of it entirely so that later code does not accidentally use it, thinking the two are interchangeable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-14t/test-lib.sh: fix TRASH_DIRECTORY handlingLibravatar John Keeping1-4/+4
After the location of $TRASH_DIRECTORY is adjusted by $TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the trash directory and cd into it. This means that when $TEST_OUTPUT_DIRECTORY is not "." and an absolute --root has not been specified, we do not remove the trash directory once the tests are complete (remove_trash is set to $TRASH_DIRECTORY). Fix this by always referring to the trash directory as $TRASH_DIRECTORY. Signed-off-by: John Keeping <john@keeping.me.uk> Acked-by: Jeff King <peff@peff.net> Acked-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-14completion: get rid of compgenLibravatar Felipe Contreras1-3/+3
The functionality we use from compgen is not much, we can do the same manually, with drastic improvements in speed, especially when dealing with only a few words. This patch also has the sideffect that brekage reported by Jeroen Meijer and SZEDER Gábor gets fixed because we no longer expand the resulting words. Here are some numbers filtering N amount of words: == 1 == original: 0.002s new: 0.000s == 10 == original: 0.002s new: 0.000s == 100 == original: 0.003s new: 0.002s == 1000 == original: 0.012s new: 0.011s == 10000 == original: 0.056s new: 0.066s == 100000 == original: 2.669s new: 0.622s If the results are not narrowed: == 1 == original: 0.002s new: 0.000s == 10 == original: 0.002s new: 0.001s == 100 == original: 0.004s new: 0.004s == 1000 == original: 0.020s new: 0.015s == 10000 == original: 0.101s new: 0.355s == 100000 == original: 2.850s new: 31.941s So, unless 'git checkout <tab>' usually gives you more than 10000 results, you'll get an improvement :) Other possible solutions perform better after 1000 words, but worst if less than that: COMPREPLY=($(awk -v cur="$3" -v pre="$2" -v suf="$4" '$0 ~ cur { print pre$0suf }' <<< "$1" )) COMPREPLY=($(printf -- "$2%s$4\n" $1 | grep "^$2$3")) Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-14completion: add __gitcomp_nl testsLibravatar Felipe Contreras1-0/+60
Original patch by SZEDER Gábor. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-13doc/http-backend: match query-string in apache half-auth exampleLibravatar Jeff King2-0/+48
When setting up a "half-auth" repository in which reads can be done anonymously but writes require authentication, it is best if the server can require authentication for both the ref advertisement and the actual receive-pack POSTs. This alleviates the need for the admin to set http.receivepack in the repositories, and means that the client is challenged for credentials immediately, instead of partway through the push process (and git clients older than v1.7.11.7 had trouble handling these challenges). Since detecting a push during the ref advertisement requires matching the query string, and this is non-trivial to do in Apache, we have traditionally punted and instructed users to just protect "/git-receive-pack$". This patch provides the mod_rewrite recipe to actually match the ref advertisement, which is preferred. While we're at it, let's add the recipe to our test scripts so that we can be sure that it works, and doesn't get broken (either by our changes or by changes in Apache). Signed-off-by: Jeff King <peff@peff.net> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12Sync with 'maint'Libravatar Junio C Hamano8-12/+12
* maint: Correct common spelling mistakes in comments and tests kwset: fix spelling in comments precompose-utf8: fix spelling of "want" in error message compat/nedmalloc: fix spelling in comments compat/regex: fix spelling and grammar in comments obstack: fix spelling of similar contrib/subtree: fix spelling of accidentally git-remote-mediawiki: spelling fixes doc: various spelling fixes fast-export: fix argument name in error messages Documentation: distinguish between ref and offset deltas in pack-format i18n: make the translation of -u advice in one go
2013-04-12Merge branch 'rr/test-3200-style' into maintLibravatar Junio C Hamano1-253/+267
* rr/test-3200-style: t3200 (branch): modernize style Conflicts: t/t3200-branch.sh
2013-04-12Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into maintLibravatar Junio C Hamano1-3/+3
* jc/t5516-pushInsteadOf-vs-pushURL: t5516: test interaction between pushURL and pushInsteadOf correctly
2013-04-12Correct common spelling mistakes in comments and testsLibravatar Stefano Lattarini8-12/+12
Most of these were found using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12completion: trivial test improvementLibravatar Felipe Contreras1-1/+2
Instead of passing a dummy "", let's check if the last character is a space, and then move the _cword accordingly. Apparently we were passing "" all the way to compgen, which fortunately expanded it to nothing. Lets do the right thing though. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-11Merge branch 'maint'Libravatar Junio C Hamano4-17/+14
* maint: Typo fix: replacing it's -> its t: make PIPE a standard test prerequisite archive: clarify explanation of --worktree-attributes t/README: --immediate skips cleanup commands for failed tests
2013-04-11Merge branch 'ap/combine-diff-coalesce-lost'Libravatar Junio C Hamano1-0/+129
Attempts to minimize "diff -c/--cc" output by coalescing the same lines removed from the parents better, but with an O(n^2) complexity. * ap/combine-diff-coalesce-lost: combine-diff: coalesce lost lines optimally
2013-04-11Merge branch 'sr/log-SG-no-textconv'Libravatar Junio C Hamano1-0/+28
"git log -S/-G" started paying attention to textconv filter, but there was no way to disable this. Make it honor --no-textconv option. * sr/log-SG-no-textconv: diffcore-pickaxe: unify code for log -S/-G diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>" diffcore-pickaxe: port optimization from has_changes() to diff_grep() diffcore-pickaxe: respect --no-textconv diffcore-pickaxe: remove fill_one() diffcore-pickaxe: remove unnecessary call to get_textconv()
2013-04-11Merge branch 'js/rerere-forget-protect-against-NUL'Libravatar Junio C Hamano1-0/+25
A few bugfixes to "git rerere" working on corner case merge conflicts. * js/rerere-forget-protect-against-NUL: rerere forget: do not segfault if not all stages are present rerere forget: grok files containing NUL
2013-04-11t: make PIPE a standard test prerequisiteLibravatar Adam Spiers4-16/+10
The 'PIPE' test prerequisite was already defined identically by t9010 and t9300, therefore it makes sense to make it a predefined prerequisite. Signed-off-by: Adam Spiers <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-11t9903: Don't fail when run from path accessed through symlinkLibravatar Torstein Hegge1-5/+5
When the git directory is accessed through a symlink like ln -s /tmp/git /tmp/git-symlink cd /tmp/git-symlink/t make -C .. && ./t9903-bash-prompt.sh $TRASH_DIRECTORY is /tmp/git-symlink/t/trash directory.t9903-bash-prompt and $(pwd -P) is /tmp/git/t/trash directory.t9903-bash-prompt. When __gitdir looks up the path through 'git rev-parse --git-dir', it will return paths similar to $(pwd -P). This behavior is already tested in t9903 'gitdir - resulting path avoids symlinks'. Signed-off-by: Torstein Hegge <hegge@resisty.net> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-11cherry-pick: make sure all input objects are commitsLibravatar Miklos Vajna1-0/+6
When a single argument was a non-commit, the error message used to be: fatal: BUG: expected exactly one commit from walk For multiple arguments, when none of the arguments was a commit, the error was: fatal: empty commit set passed Finally, when some of the arguments were non-commits, we ignored those arguments. Fix this bug and make sure all arguments are commits, and for the first non-commit, error out with: fatal: <name>: Can't cherry-pick a <type> Signed-off-by: Miklos Vajna <vmiklos@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-10t5004: fix issue with empty archive test and bsdtarLibravatar René Scharfe1-1/+1
bsdtar, which is the default tar on Mac OS X, handles empty archives just fine but reports archives containing only a pax extended header comment as damaged. Work around the issue by explicitly generating the archive for the tree and not the commit, which causes git archive to omit the commit hash comment record from the tar file. Reported-by: BJ Hargrave <bj@bjhargrave.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-09http-backend: respect GIT_NAMESPACE with dumb clientsLibravatar John Koleszar2-0/+29
Filter the list of refs returned via the dumb HTTP protocol according to the active namespace, consistent with other clients of the upload-pack service. Signed-off-by: John Koleszar <jkoleszar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-09t/README: --immediate skips cleanup commands for failed testsLibravatar Simon Ruderich1-1/+4
Signed-off-by: Simon Ruderich <simon@ruderich.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-08Revert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side ↵Libravatar Junio C Hamano1-3/+9
branch, 2013-01-17) Kevin Bracey reports that the change regresses a case shown in the user manual. Trading one fix with another breakage is not worth it. Just keep the test to document the existing breakage, and revert the change for now. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-08merge-tree: don't print entries that match "local"Libravatar John Keeping1-10/+0
The documentation says: the output from the command omits entries that match the <branch1> tree. But currently "added in branch1" and "removed in branch1" (both while unchanged in branch2) do print output. Change this so that the behaviour matches the documentation. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07bundle: Accept prerequisites without commit messagesLibravatar Lukas Fleischer1-0/+10
While explicitly stating that the commit message in a prerequisite line is optional, we required all lines with 40 or more characters to contain a space after the object name, bailing out if a line consisted of an object name only. This was to allow bundling a history to a commit without an message, but the code forgot that it already called rtrim() to remove that whitespace. As a workaround, only check for SP when the line has more than 40 characters. Signed-off-by: Lukas Fleischer <git@cryptocrack.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07Merge branch 'jk/rm-removed-paths'Libravatar Junio C Hamano1-0/+65
A handful of test cases and a corner case bugfix for "git rm". * jk/rm-removed-paths: t3600: document failure of rm across symbolic links t3600: test behavior of reverse-d/f conflict rm: do not complain about d/f conflicts during deletion
2013-04-07Merge branch 'rr/triangle'Libravatar Junio C Hamano1-138/+184
Support "pull from one place, push to another place" workflow better by introducing remote.pushdefault (overrides the "origin" thing) and branch.*.pushremote (overrides the branch.*.remote). * rr/triangle: remote.c: introduce branch.<name>.pushremote remote.c: introduce remote.pushdefault remote.c: introduce a way to have different remotes for fetch/push t5516 (fetch-push): drop implicit arguments from helper functions t5516 (fetch-push): update test description remote.c: simplify a bit of code using git_config_string()
2013-04-07Merge branch 'mm/status-during-revert'Libravatar Junio C Hamano1-0/+58
"git status" learned to report that you are in the middle of a revert session, just like it does for a cherry-pick and a bisect session. * mm/status-during-revert: status: show commit sha1 in "You are currently reverting" message status: show 'revert' state and status hint
2013-04-07Merge branch 'jk/set-upstream-error-cases'Libravatar Junio C Hamano1-0/+12
The handing by "git branch --set-upstream-to" against various forms of errorneous inputs were suboptimal. * jk/set-upstream-error-cases: branch: give advice when tracking start-point is missing branch: mention start_name in set-upstream error messages branch: improve error message for missing --set-upstream-to ref branch: factor out "upstream is not a branch" error messages t3200: test --set-upstream-to with bogus refs
2013-04-07Merge branch 'jk/filter-branch-come-back-to-original'Libravatar Junio C Hamano1-0/+14
When used with "-d temporary-directory" option, "git filter-branch" failed to come back to the original working tree to perform the final clean-up procedure. * jk/filter-branch-come-back-to-original: filter-branch: return to original dir after filtering
2013-04-07format-patch: add format.coverLetter configuration variableLibravatar Felipe Contreras1-0/+28
Also, add a new option: 'auto', so if there's more than one patch, the cover letter is generated, otherwise it's not. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07format-patch: improve head calculation for cover-letterLibravatar Felipe Contreras1-0/+5
If we do it after the revision traversal we can be sure that this is indeed a commit that will be processed (i.e. not a merge) and it's the top most one (thus removing the NEEDSWORK comment, at least we show the same as 'git diff --stat' output that appears in the cover-letter). While we are at it, since we know there's nothing to generate, exit sooner in all cases, like --cover-letter currently does. Also, if there's nothing to generate and cover-letter is specified, a different code-path might be triggered that is not currently covered in the test-case, so add a test for it. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07Sync with 1.8.1.6Libravatar Junio C Hamano1-0/+27
2013-04-07fmt-merge-msg: respect core.commentchar in people creditsLibravatar Ralf Thielow1-0/+18
Commit eff80a9 (Allow custom "comment char") introduced a custom comment character for commit messages but forgot to use it in people credits which can be a part of a commit message. With this commit, the custom comment character is also used in people credits. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07Merge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1Libravatar Junio C Hamano1-0/+27
A pattern "dir" (without trailing slash) in the attributes file stopped matching a directory "dir" by mistake with an earlier change that wanted to allow pattern "dir/" to also match. * jc/directory-attrs-regression-fix: t: check that a pattern without trailing slash matches a directory dir.c::match_pathname(): pay attention to the length of string parameters dir.c::match_pathname(): adjust patternlen when shifting pattern dir.c::match_basename(): pay attention to the length of string parameters attr.c::path_matches(): special case paths that end with a slash attr.c::path_matches(): the basename is part of the pathname
2013-04-05Merge branch 'sg/gpg-sig'Libravatar Junio C Hamano5-0/+61
Teach "merge/pull" to optionally verify and reject commits that are not signed properly. * sg/gpg-sig: pretty printing: extend %G? to include 'N' and 'U' merge/pull Check for untrusted good GPG signatures merge/pull: verify GPG signatures of commits being merged commit.c/GPG signature verification: Also look at the first GPG status line Move commit GPG signature verification to commit.c
2013-04-05Merge branch 'jl/submodule-deinit'Libravatar Junio C Hamano1-5/+16
A finishing touch to the new topic in 1.8.3. * jl/submodule-deinit: submodule deinit: clarify work tree removal message