summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-07Sync with 1.8.1.6Libravatar Junio C Hamano1-0/+27
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
2013-04-05Merge branch 'jc/merge-tag-object'Libravatar Junio C Hamano1-32/+68
"git merge $(git rev-parse v1.8.2)" behaved quite differently from "git merge v1.8.2" as if v1.8.2 were written as v1.8.2^0 and did not pay much attention to the annotated tag payload. This makes the code notice the type of the tag object, in addition to the dwim_ref() based classification the current code uses (i.e. the name appears in refs/tags/) to decide when to special case merging of tags. * jc/merge-tag-object: t6200: test message for merging of an annotated tag t6200: use test_config/test_unconfig merge: a random object may not necssarily be a commit
2013-04-05diffcore-pickaxe: respect --no-textconvLibravatar Simon Ruderich1-0/+28
git log -S doesn't respect --no-textconv: $ echo '*.txt diff=wrong' > .gitattributes $ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo error: cannot run xxx: No such file or directory fatal: unable to read files to diff Reported-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Simon Ruderich <simon@ruderich.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04t3600: document failure of rm across symbolic linksLibravatar Jeff King1-0/+28
If we have a symlink "d" that points to a directory, we should not be able to remove "d/f". In the normal case, where "d/f" does not exist in the index, we already disallow this, as we only remove things that git knows about in the index. So for something like: ln -s /outside/repo foo git add foo git rm foo/bar we will properly produce an error (as there is no index entry for foo/bar). However, if there is an index entry for the path (e.g., because the movement is due to working tree changes that have not yet been reflected in the index), we will happily delete it, even though the path we delete from the filesystem is not the same as the path in the index. This patch documents that failure with a test. While this is a bug, it should not be possible to cause serious data loss with it. For any path that does not have an index entry, we will complain and bail. For a path which does have an index entry, we will do the usual up-to-date content check. So even if the deleted path in the filesystem is not the same as the one we are removing from the index, we do know that they at least have the same content, and that the content is included in HEAD. That means the worst case is not the accidental loss of content, but rather confusion by the user when a copy of a file another part of the tree is removed. Which makes this bug a minor and hard-to-trigger annoyance rather than a data-loss bug (and hence the fix can be saved for a rainy day when somebody feels like working on it). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04Merge branch 'jk/peel-ref' into maintLibravatar Junio C Hamano1-0/+9
* jk/peel-ref: upload-pack: load non-tip "want" objects from disk upload-pack: make sure "want" objects are parsed upload-pack: drop lookup-before-parse optimization
2013-04-04t3600: test behavior of reverse-d/f conflictLibravatar Jeff King1-0/+12
The previous commit taught "rm" that it is safe to consider "d/f" removed when "d" has become a non-directory. This patch adds a test for the opposite: a file "d" that becomes a directory. In this case, "git rm" does need to complain, because we should not be removing arbitrary content under "d". Git already behaves correctly, but let's make sure that remains the case by protecting the behavior with a test. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04rm: do not complain about d/f conflicts during deletionLibravatar Jeff King1-0/+25
If we used to have an index entry "d/f", but "d" has been replaced by a non-directory entry, the user may still want to run "git rm" to delete the stale index entry. They could use "git rm --cached" to just touch the index, but "git rm" should also work: we explicitly try to handle the case that the file has already been removed from the working tree. However, because unlinking "d/f" in this case will not yield ENOENT, but rather ENOTDIR, we do not notice that the file is already gone. Instead, we report it as an error. The simple solution is to treat ENOTDIR in this case exactly like ENOENT; all we want to know is whether the file is already gone, and if a leading path is no longer a directory, then by definition the sub-path is gone. Reported-by: jpinheiro <7jpinheiro@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-04rerere forget: do not segfault if not all stages are presentLibravatar Johannes Sixt1-0/+13
The loop that fills in the buffers that are later passed to the merge driver exits early when not all stages of a path are present in the index. But since the buffer pointers are not initialized in advance, the subsequent accesses are undefined. Initialize buffer pointers in advance to avoid undefined behavior later. That is not sufficient, though, to get correct operation of handle_cache(). The function replays a conflicted merge to extract the part inside the conflict markers. As written, the loop exits early when a stage is missing. Consequently, the buffers for later stages that would be present in the index are not filled in and the merge is replayed with incomplete data. Fix it by investigating all stages of the given path. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-03Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL'Libravatar Junio C Hamano1-3/+3
Update a test to match the documented interaction between pushURL and pushInsteadOf. * jc/t5516-pushInsteadOf-vs-pushURL: t5516: test interaction between pushURL and pushInsteadOf correctly
2013-04-03Merge branch 'tr/valgrind'Libravatar Junio C Hamano4-17/+44
Let us use not just memgrind but other *grind debuggers. * tr/valgrind: tests: notice valgrind error in test_must_fail tests --valgrind: provide a mode without --track-origins tests: parameterize --valgrind option t/README: --valgrind already implies -v
2013-04-03Merge branch 'jm/branch-rename-nothing-error'Libravatar Junio C Hamano1-1/+1
"git branch -m" without any argument noticed an error, but with an incorrect error message. * jm/branch-rename-nothing-error: branch: give better message when no names specified for rename
2013-04-03Merge branch 'jk/check-corrupt-objects-carefully'Libravatar Junio C Hamano2-7/+105
Have the streaming interface and other codepaths more carefully examine for corrupt objects. * jk/check-corrupt-objects-carefully: clone: leave repo in place after checkout errors clone: run check_everything_connected clone: die on errors from unpack_trees add tests for cloning corrupted repositories streaming_write_entry: propagate streaming errors add test for streaming corrupt blobs avoid infinite loop in read_istream_loose read_istream_filtered: propagate read error from upstream check_sha1_signature: check return value from read_istream stream_blob_to_fd: detect errors reading from stream
2013-04-03Merge branch 'jc/apply-ws-fix-tab-in-indent'Libravatar Junio C Hamano3-1/+31
"git apply --whitespace=fix" was not prepared to see a line getting longer after fixing whitespaces (e.g. tab-in-indent aka Python). * jc/apply-ws-fix-tab-in-indent: test: resurrect q_to_tab apply --whitespace=fix: avoid running over the postimage buffer
2013-04-03Merge branch 'jk/difftool-no-overwrite-on-copyback'Libravatar Junio C Hamano1-37/+68
Try to be careful when difftool backend allows the user to write into the temporary files being shown *and* the user makes changes to the working tree at the same time. One of the changes has to be lost in such a case, but at least tell the user what he did. * jk/difftool-no-overwrite-on-copyback: t7800: run --dir-diff tests with and without symlinks t7800: fix tests when difftool uses --no-symlinks t7800: don't hide grep output difftool: don't overwrite modified files t7800: move '--symlinks' specific test to the end
2013-04-03Merge branch 'jc/directory-attrs-regression-fix'Libravatar Junio C Hamano1-0/+27
Fix 1.8.1.x regression that stopped matching "dir" (without trailing slash) to a directory "dir". * 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-03Merge branch 'nd/checkout-paths-reduce-match-pathspec-calls'Libravatar Junio C Hamano1-0/+22
Consolidate repeated pathspec matches on the same paths, while fixing a bug in "git checkout dir/" code started from an unmerged index. * nd/checkout-paths-reduce-match-pathspec-calls: checkout: avoid unnecessary match_pathspec calls
2013-04-03Merge branch 'bc/commit-complete-lines-given-via-m-option' into maintLibravatar Junio C Hamano1-4/+12
'git commit -m "$msg"' used to add an extra newline even when $msg already ended with one. * bc/commit-complete-lines-given-via-m-option: Documentation/git-commit.txt: rework the --cleanup section git-commit: only append a newline to -m mesg if necessary t7502: demonstrate breakage with a commit message with trailing newlines t/t7502: compare entire commit message with what was expected
2013-04-03Merge branch 'jk/alias-in-bare' into maintLibravatar Junio C Hamano1-0/+19
An aliased command spawned from a bare repository that does not say it is bare with "core.bare = yes" is treated as non-bare by mistake. * jk/alias-in-bare: setup: suppress implicit "." work-tree for bare repos environment: add GIT_PREFIX to local_repo_env cache.h: drop LOCAL_REPO_ENV_SIZE
2013-04-03Merge branch 'ks/rfc2047-one-char-at-a-time' into maintLibravatar Junio C Hamano1-13/+14
When "format-patch" quoted a non-ascii strings on the header files, it incorrectly applied rfc2047 and chopped a single character in the middle of it. * ks/rfc2047-one-char-at-a-time: format-patch: RFC 2047 says multi-octet character may not be split
2013-04-03Merge branch 'jk/empty-archive' into maintLibravatar Junio C Hamano5-12/+108
"git archive" reports a failure when asked to create an archive out of an empty tree. It would be more intuitive to give an empty archive back in such a case. * jk/empty-archive: archive: handle commits with an empty tree test-lib: factor out $GIT_UNZIP setup
2013-04-03Merge branch 'ph/tag-force-no-warn-on-creation' into maintLibravatar Junio C Hamano1-0/+12
"git tag -f <tag>" always said "Updated tag '<tag>'" even when creating a new tag (i.e. not overwriting nor updating). * ph/tag-force-no-warn-on-creation: tag: --force does not have to warn when creating tags
2013-04-03Sync with 1.8.1 maintenance trackLibravatar Junio C Hamano4-73/+193
* maint-1.8.1: Start preparing for 1.8.1.6 git-tag(1): we tag HEAD by default Fix revision walk for commits with the same dates t2003: work around path mangling issue on Windows pack-refs: add fully-peeled trait pack-refs: write peeled entry for non-tags use parse_object_or_die instead of die("bad object") avoid segfaults on parse_object failure entry: fix filter lookup t2003: modernize style name-hash.c: fix endless loop with core.ignorecase=true
2013-04-03Merge branch 'kb/name-hash' into maint-1.8.1Libravatar Junio C Hamano1-0/+20
* kb/name-hash: name-hash.c: fix endless loop with core.ignorecase=true
2013-04-03Merge branch 'kk/revwalk-slop-too-many-commit-within-a-second' into maint-1.8.1Libravatar Junio C Hamano1-0/+13
* kk/revwalk-slop-too-many-commit-within-a-second: Fix revision walk for commits with the same dates
2013-04-03Merge branch 'jk/checkout-attribute-lookup' into maint-1.8.1Libravatar Junio C Hamano1-73/+96
* jk/checkout-attribute-lookup: t2003: work around path mangling issue on Windows entry: fix filter lookup t2003: modernize style
2013-04-03Merge branch 'jk/fully-peeled-packed-ref' into maint-1.8.1Libravatar Junio C Hamano1-0/+64
* jk/fully-peeled-packed-ref: pack-refs: add fully-peeled trait pack-refs: write peeled entry for non-tags use parse_object_or_die instead of die("bad object") avoid segfaults on parse_object failure
2013-04-03Merge branch 'ap/maint-diff-rename-avoid-overlap' into maint-1.8.1Libravatar Junio C Hamano1-0/+54
* ap/maint-diff-rename-avoid-overlap: tests: make sure rename pretty print works diff: prevent pprint_rename from underrunning input diff: Fix rename pretty-print when suffix and prefix overlap
2013-04-02t3200: test --set-upstream-to with bogus refsLibravatar Jeff King1-0/+12
These tests pass with the current code, but let's make sure we don't accidentally break the behavior in the future. Note that our tests expect failure when we try to set the upstream to or from a missing branch. Technically we are just munging config here, so we do not need the refs to exist. But seeing that they do exist is a good check that the user has not made a typo. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-02Merge branch 'jk/config-with-empty-section'Libravatar Junio C Hamano1-0/+35
Document that "git config --unset" does not remove an empty section head after removing the last variable in a section, and adding a new variable does not try to reuse a leftover empty section head. * jk/config-with-empty-section: t1300: document some aesthetic failures of the config editor
2013-04-02status: show commit sha1 in "You are currently reverting" messageLibravatar Matthieu Moy1-3/+4
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-02status: show 'revert' state and status hintLibravatar Matthieu Moy1-0/+57
This is the logical equivalent for "git status" of 3ee4452 (bash: teach __git_ps1 about REVERT_HEAD). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-02filter-branch: return to original dir after filteringLibravatar Jeff King1-0/+14
The first thing filter-branch does is to create a temporary directory, either ".git-rewrite" in the current directory (which may be the working tree or the repository if bare), or in a directory specified by "-d". We then chdir to $tempdir/t as our temporary working directory in which to run tree filters. After finishing the filter, we then attempt to go back to the original directory with "cd ../..". This works in the .git-rewrite case, but if "-d" is used, we end up in a random directory. The only thing we do after this chdir is to run git-read-tree, but that means that: 1. The working directory is not updated to reflect the filtered history. 2. We dump random files into "$tempdir/.." (e.g., if you use "-d /tmp/foo", we dump junk into /tmp). Fix it by recording the full path to the original directory and returning there explicitly. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-02rerere forget: grok files containing NULLibravatar Johannes Sixt1-0/+12
Using 'git rerere forget .' after a merge that involved binary files runs into an infinite loop if the binary file contains a zero byte. Replace a strchrnul by memchr because the former does not make progress as soon as the NUL is encountered. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-02remote.c: introduce branch.<name>.pushremoteLibravatar Ramkumar Ramachandra1-0/+15
This new configuration variable overrides `remote.pushdefault` and `branch.<name>.remote` for pushes. When you pull from one place (e.g. your upstream) and push to another place (e.g. your own publishing repository), you would want to set `remote.pushdefault` to specify the remote to push to for all branches, and use this option to override it for a specific branch. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-02remote.c: introduce remote.pushdefaultLibravatar Ramkumar Ramachandra1-0/+12
This new configuration variable defines the default remote to push to, and overrides `branch.<name>.remote` for all branches. It is useful in the typical triangular-workflow setup, where the remote you're fetching from is different from the remote you're pushing to. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>