Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2015-03-20Merge branch 'mg/verify-commit'Junio C Hamano
Workarounds for certain build of GPG that triggered false breakage in a test. * mg/verify-commit: t7510: do not fail when gpg warns about insecure memory
2015-03-20Merge branch 'km/bsd-shells'Junio C Hamano
Portability fixes and workarounds for shell scripts have been added to help BSD-derived systems. * km/bsd-shells: t5528: do not fail with FreeBSD shell help.c: use SHELL_PATH instead of hard-coded "/bin/sh" git-compat-util.h: move SHELL_PATH default into header git-instaweb: use @SHELL_PATH@ instead of /bin/sh git-instaweb: allow running in a working tree subdirectory
2015-03-20Merge branch 'mg/detached-head-report'Junio C Hamano
"git branch" on a detached HEAD always said "(detached from xyz)", even when "git status" would report "detached at xyz". The HEAD is actually at xyz and haven't been moved since it was detached in such a case, but the user cannot read what the current value of HEAD is when "detached from" is used. * mg/detached-head-report: branch: name detached HEAD analogous to status wt-status: refactor detached HEAD analysis
2015-03-20Merge branch 'kn/git-cd-to-empty'Junio C Hamano
"git -C '' subcmd" refused to work in the current directory, unlike "cd ''" which silently behaves as a no-op. * kn/git-cd-to-empty: git: treat "git -C '<path>'" as a no-op when <path> is empty
2015-03-20Merge branch 'nd/versioncmp-prereleases'Junio C Hamano
The versionsort.prerelease configuration variable can be used to specify that v1.0-pre1 comes before v1.0. * nd/versioncmp-prereleases: config.txt: update versioncmp.prereleaseSuffix versionsort: support reorder prerelease suffixes
2015-03-18Merge branch 'mg/status-v-v'Junio C Hamano
"git status" now allows the "-v" to be given twice to show the differences that are left in the working tree not to be committed. * mg/status-v-v: commit/status: show the index-worktree diff with -v -v t7508: test git status -v t7508: .gitignore 'expect' and 'output' files
2015-03-18Merge branch 'mg/sequencer-commit-messages-always-verbatim'Junio C Hamano
"git cherry-pick" used to clean-up the log message even when it is merely replaying an existing commit. It now replays the message verbatim unless you are editing the message of resulting commits. * mg/sequencer-commit-messages-always-verbatim: sequencer: preserve commit messages
2015-03-18Merge branch 'sg/completion-remote'Junio C Hamano
Code simplification. * sg/completion-remote: completion: simplify __git_remotes() completion: add a test for __git_remotes() helper function
2015-03-18Merge branch 'es/rebase-i-count-todo'Junio C Hamano
"git rebase -i" recently started to include the number of commits in the insn sheet to be processed, but on a platform that prepends leading whitespaces to "wc -l" output, the numbers are shown with extra whitespaces that aren't necessary. * es/rebase-i-count-todo: rebase-interactive: re-word "item count" comment rebase-interactive: suppress whitespace preceding item count
2015-03-18Merge branch 'rs/zip-text'Junio C Hamano
"git archive" can now be told to set the 'text' attribute in the resulting zip archive. * rs/zip-text: archive-zip: mark text files in archives
2015-03-11t7510: do not fail when gpg warns about insecure memoryKyle J. McKay
Depending on how gpg was built, it may issue the following message to stderr when run: Warning: using insecure memory! When the test is collecting gpg output it is therefore not enough to just match on a "gpg: " prefix it must also match on a "Warning: " prefix wherever it needs to match lines that have been produced by gpg. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-11t5528: do not fail with FreeBSD shellKyle J. McKay
The FreeBSD shell converts this expression: git ${1:+-c push.default="$1"} push to this when "$1" is not empty: git "-c push.default=$1" push which causes git to fail. To avoid this we simply break up the expansion into two parts so that the whitespace which creates two arguments instead of one is outside the ${...} like so: git ${1:+-c} ${1:+push.default="$1"} push This has the desired effect on all platforms allowing the test to pass on FreeBSD. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10Merge branch 'jk/diffcore-rename-duplicate'Junio C Hamano
A corrupt input to "git diff -M" can cause us to segfault. * jk/diffcore-rename-duplicate: diffcore-rename: avoid processing duplicate destinations diffcore-rename: split locate_rename_dst into two functions
2015-03-07git: treat "git -C '<path>'" as a no-op when <path> is emptyKarthik Nayak
'git -C ""' unhelpfully dies with error "Cannot change to ''", whereas the shell treats `cd ""' as a no-op. Taking the shell's behavior as a precedent, teach git to treat `-C ""' as a no-op, as well. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-07Merge branch 'ak/t5516-typofix'Junio C Hamano
* ak/t5516-typofix: t5516: correct misspelled pushInsteadOf
2015-03-07Merge branch 'mk/diff-shortstat-dirstat-fix'Junio C Hamano
"git diff --shortstat --dirstat=changes" showed a dirstat based on lines that was never asked by the end user in addition to the dirstat that the user asked for. * mk/diff-shortstat-dirstat-fix: diff --shortstat --dirstat: remove duplicate output
2015-03-07Merge branch 'km/send-email-getopt-long-workarounds' into maintJunio C Hamano
Even though we officially haven't dropped Perl 5.8 support, the Getopt::Long package that came with it does not support "--no-" prefix to negate a boolean option; manually add support to help people with older Getopt::Long package. * km/send-email-getopt-long-workarounds: git-send-email.perl: support no- prefix with older GetOptions
2015-03-06completion: add a test for __git_remotes() helper functionSZEDER Gábor
The test checks that both remotes under '$GIT_DIR/remotes' and remotes in the config file are listed. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06rebase-interactive: suppress whitespace preceding item countEric Sunshine
97f05f43 (Show number of TODO items for interactive rebase, 2014-12-10) taught rebase-interactive to compute an item count with 'wc -l' and display it in the instruction list comments: # Rebase 46640c6..5568fd5 onto 46640c6 (4 TODO item(s)) On Mac OS X, however, it renders as: # Rebase 46640c6..5568fd5 onto 46640c6 ( 4 TODO item(s)) since 'wc -l' indents its output with leading spaces. Fix this. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06branch: name detached HEAD analogous to statusMichael J Gruber
"git status" carefully names a detached HEAD "at" resp. "from" a rev or ref depending on whether the detached HEAD has moved since. "git branch" always uses "from", which can be confusing, because a status-aware user would interpret this as moved detached HEAD. Make "git branch" use the same logic and wording. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06sequencer: preserve commit messagesMichael J Gruber
sequencer calls "commit" with default options, which implies "--cleanup=default" unless the user specified something else in their config. This leads to cherry-picked commits getting a cleaned up commit message, which is usually not an intended side-effect. Make the sequencer use "--cleanup=verbatim" so that it preserves commit messages independent of the default, unless the user has set config for "commit" or the message is amended with -s or -x. Reported-by: Christoph Anton Mitterer <calestyo@scientia.net> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06commit/status: show the index-worktree diff with -v -vMichael J Gruber
git commit and git status in long format show the diff between HEAD and the index when given -v. This allows previewing a commit to be made. They also list tracked files with unstaged changes, but without a diff. Introduce '-v -v' which shows the diff between the index and the worktree in addition to the HEAD index diff. This allows a review of unstaged changes which might be missing from the commit. In the case of '-v -v', additonal header lines Changes to be committed: and Changes not staged for commit: are inserted before the diffs, which are equal to those in the status part; the latter preceded by 50*"-" to make it stick out more. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06t7508: test git status -vMichael J Gruber
"status -v" had no test. Include one. This also requires changing the .gitignore subtests, which is a good thing: they include testing a .gitignore pattern now. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06t7508: .gitignore 'expect' and 'output' filesJunio C Hamano
These files are used to observe the behaviour of the 'status' command and if there weren't any such observer, the expected output from 'status' wouldn't even mention them. Place them in .gitignore to unclutter the output expected by the tests. An added benefit is that future tests can add such files that are purely for use by the observer, i.e. the tests themselves, by naming them as expect-foo and/or output-bar. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06archive-zip: mark text files in archivesRené Scharfe
Set the text flag for ZIP archive entries that look like text files so that unzip -a can be used to perform end-of-line conversions. Info-ZIP zip does the same. Detect binary files the same way as git diff and git grep do, namely by checking for the attribute "diff" and its negation "-diff", and if none is found by falling back to checking for the presence of NUL bytes in the first few bytes of the file contents. 7-Zip, Windows' built-in ZIP functionality and Info-ZIP unzip without the switch -a are not affected by the change and still extract text files without doing any end-of-line conversions. NB: The actual end-of-line style used in the archive entries doesn't matter to unzip -a, as it converts any CR, CRLF and LF to the line end characters appropriate for the platform it is running on. Suggested-by: Ulrike Fischer <luatex@nililand.de> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06Merge branch 'ab/merge-file-prefix' into maintJunio C Hamano
"git merge-file" did not work correctly in a subdirectory. * ab/merge-file-prefix: merge-file: correctly open files when in a subdir
2015-03-06Merge branch 'ps/submodule-sanitize-path-upon-add' into maintJunio C Hamano
"git submodule add" failed to squash "path/to/././submodule" to "path/to/submodule". * ps/submodule-sanitize-path-upon-add: git-submodule.sh: fix '/././' path normalization
2015-03-06Merge branch 'jk/prune-mtime' into maintJunio C Hamano
In v2.2.0, we broke "git prune" that runs in a repository that borrows from an alternate object store. * jk/prune-mtime: sha1_file: fix iterating loose alternate objects for_each_loose_file_in_objdir: take an optional strbuf path
2015-03-06Merge branch 'ch/new-gpg-drops-rfc-1991' into maintJunio C Hamano
Older GnuPG implementations may not correctly import the keyring material we prepare for the tests to use. * ch/new-gpg-drops-rfc-1991: t/lib-gpg: sanity-check that we can actually sign t/lib-gpg: include separate public keys in keyring.gpg
2015-03-06Merge branch 'jk/config-no-ungetc-eof' into maintJunio C Hamano
Reading configuration from a blob object, when it ends with a lone CR, use to confuse the configuration parser. * jk/config-no-ungetc-eof: config_buf_ungetc: warn when pushing back a random character config: do not ungetc EOF
2015-03-06Merge branch 'mh/deref-symref-over-helper-transport' into maintJunio C Hamano
"git fetch" over a remote-helper that cannot respond to "list" command could not fetch from a symbolic reference e.g. HEAD. * mh/deref-symref-over-helper-transport: transport-helper: do not request symbolic refs to remote helpers
2015-03-06Merge branch 'ks/rebase-i-abbrev' into maintJunio C Hamano
The insn sheet "git rebase -i" creates did not fully honor core.abbrev settings. * ks/rebase-i-abbrev: rebase -i: use full object name internally throughout the script
2015-03-06Merge branch 'jk/sanity' into maintJunio C Hamano
The tests that wanted to see that file becomes unreadable after running "chmod a-r file", and the tests that wanted to make sure it is not run as root, we used "can we write into the / directory?" as a cheap substitute, but on some platforms that is not a good heuristics. The tests and their prerequisites have been updated to check what they really require. * jk/sanity: test-lib.sh: set prerequisite SANITY by testing what we really need tests: correct misuses of POSIXPERM t/lib-httpd: switch SANITY check for NOT_ROOT
2015-03-05Merge branch 'tb/connect-ipv6-parse-fix'Junio C Hamano
We did not parse username followed by literal IPv6 address in SSH transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git correctly. * tb/connect-ipv6-parse-fix: t5500: show user name and host in diag-url t5601: add more test cases for IPV6 connect.c: allow ssh://user@[2001:db8::1]/repo.git
2015-03-05Merge branch 'jc/diff-test-updates'Junio C Hamano
Test clean-up. * jc/diff-test-updates: test_ln_s_add: refresh stat info of fake symbolic links t4008: modernise style t/diff-lib: check exact object names in compare_diff_raw tests: do not borrow from COPYING and README from the real source t4010: correct expected object names t9300: correct expected object names t4008: correct stale comments
2015-03-05Merge branch 'mh/refs-have-new'Junio C Hamano
Simplify the ref transaction API around how "the ref should be pointing at this object" is specified. * mh/refs-have-new: refs.h: remove duplication in function docstrings update_ref(): improve documentation ref_transaction_verify(): new function to check a reference's value ref_transaction_delete(): check that old_sha1 is not null_sha1 ref_transaction_create(): check that new_sha1 is valid commit: avoid race when creating orphan commits commit: add tests of commit races ref_transaction_delete(): remove "have_old" parameter ref_transaction_update(): remove "have_old" parameter struct ref_update: move "have_old" into "flags" refs.c: change some "flags" to "unsigned int" refs: remove the gap in the REF_* constant values refs: move REF_DELETING to refs.c
2015-03-04Merge branch 'jk/daemon-interpolate'Junio C Hamano
The "interpolated-path" option of "git daemon" inserted any string client declared on the "host=" capability request without checking. Sanitize and limit %H and %CH to a saner and a valid DNS name. * jk/daemon-interpolate: daemon: sanitize incoming virtual hostname t5570: test git-daemon's --interpolated-path option git_connect: let user override virtual-host we send to daemon
2015-03-04Merge branch 'km/send-email-getopt-long-workarounds'Junio C Hamano
Even though we officially haven't dropped Perl 5.8 support, the Getopt::Long package that came with it does not support "--no-" prefix to negate a boolean option; manually add support to help people with older Getopt::Long package. * km/send-email-getopt-long-workarounds: git-send-email.perl: support no- prefix with older GetOptions
2015-03-04Merge branch 'jc/apply-beyond-symlink'Junio C Hamano
"git apply" was not very careful about reading from, removing, updating and creating paths outside the working tree (under --index/--cached) or the current directory (when used as a replacement for GNU patch). * jc/apply-beyond-symlink: apply: do not touch a file beyond a symbolic link apply: do not read from beyond a symbolic link apply: do not read from the filesystem under --index apply: reject input that touches outside the working area
2015-03-03t5516: correct misspelled pushInsteadOfAnders Kaseorg
A future breakage to "git push" to make it incorrectly pay attention to pushInsteadOf when it should not will be left uncaught without this change. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-02diff --shortstat --dirstat: remove duplicate outputMårten Kongstad
When --shortstat is used in conjunction with --dirstat=changes, git diff will output the dirstat information twice: first as calculated by the 'lines' algorithm, then as calculated by the 'changes' algorithm: $ git diff --dirstat=changes,10 --shortstat v2.2.0..v2.2.1 23 files changed, 453 insertions(+), 54 deletions(-) 33.5% Documentation/RelNotes/ 26.2% t/ 46.6% Documentation/RelNotes/ 16.6% t/ The same duplication happens for --shortstat together with --dirstat=files, but not for --shortstat together with --dirstat=lines. Limit output to only include one dirstat part, calculated as specified by the --dirstat parameter. Also, add test for this. Signed-off-by: Mårten Kongstad <marten.kongstad@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-28diffcore-rename: avoid processing duplicate destinationsJeff King
The rename code cannot handle an input where we have duplicate destinations (i.e., more than one diff_filepair in the queue with the same string in its pair->two->path). We end up allocating only one slot in the rename_dst mapping. If we fill in the diff_filepair for that slot, when we re-queue the results, we may queue that filepair multiple times. When the diff is finally flushed, the filepair is processed and free()d multiple times, leading to heap corruption. This situation should only happen when a tree diff sees duplicates in one of the trees (see the added test for a detailed example). Rather than handle it, the sanest thing is just to turn off rename detection altogether for the diff. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-28versionsort: support reorder prerelease suffixesNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-26Merge branch 'jk/sanity'Junio C Hamano
The tests that wanted to see that file becomes unreadable after running "chmod a-r file", and the tests that wanted to make sure it is not run as root, we used "can we write into the / directory?" as a cheap substitute, but on some platforms that is not a good heuristics. The tests and their prerequisites have been updated to check what they really require. * jk/sanity: test-lib.sh: set prerequisite SANITY by testing what we really need tests: correct misuses of POSIXPERM t/lib-httpd: switch SANITY check for NOT_ROOT
2015-02-25Merge branch 'jc/apply-ws-fix-expands' into maintJunio C Hamano
"git apply --whitespace=fix" used to under-allocate the memory when the fix resulted in a longer text than the original patch. * jc/apply-ws-fix-expands: apply: count the size of postimage correctly apply: make update_pre_post_images() sanity check the given postlen apply.c: typofix
2015-02-25Merge branch 'jk/dumb-http-idx-fetch-fix' into maintJunio C Hamano
A broken pack .idx file in the receiving repository prevented the dumb http transport from fetching a good copy of it from the other side. * jk/dumb-http-idx-fetch-fix: dumb-http: do not pass NULL path to parse_pack_index
2015-02-25Merge branch 'dk/format-patch-ignore-diff-submodule' into maintJunio C Hamano
Setting diff.submodule to 'log' made "git format-patch" produce broken patches. * dk/format-patch-ignore-diff-submodule: format-patch: ignore diff.submodule setting t4255: test am submodule with diff.submodule
2015-02-23test_ln_s_add: refresh stat info of fake symbolic linksJohannes Sixt
We have a helper function test_ln_s_add that inserts a symbolic link into the index even if the file system does not support symbolic links. There is a small flaw in the emulation path: the added entry does not pick up stat information of the fake symbolic link from the file system, as a consequence, the index is not exactly the same as for the "regular" path (where symbolic links are available). To fix this, just call git update-index again. This flaw was revealed by the earlier change that tightened compare_diff_raw(), because a test case in t4008 depends on the correctly updated index. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-22Merge branch 'jk/prune-mtime'Junio C Hamano
In v2.2.0, we broke "git prune" that runs in a repository that borrows from an alternate object store. * jk/prune-mtime: sha1_file: fix iterating loose alternate objects for_each_loose_file_in_objdir: take an optional strbuf path
2015-02-22Merge branch 'ps/submodule-sanitize-path-upon-add'Junio C Hamano
"git submodule add" failed to squash "path/to/././submodule" to "path/to/submodule". * ps/submodule-sanitize-path-upon-add: git-submodule.sh: fix '/././' path normalization