summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2013-01-23Merge branch 'mo/cvs-server-updates'Libravatar Junio C Hamano1-0/+551
Various git-cvsserver updates. * mo/cvs-server-updates: t9402: Use TABs for indentation t9402: Rename check.cvsCount and check.list t9402: Simplify git ls-tree t9402: Add missing &&; Code style t9402: No space after IO-redirection t9402: Dont use test_must_fail cvs t9402: improve check_end_tree() and check_end_full_tree() t9402: sed -i is not portable cvsserver Documentation: new cvs ... -r support cvsserver: add t9402 to test branch and tag refs cvsserver: support -r and sticky tags for most operations cvsserver: Add version awareness to argsfromdir cvsserver: generalize getmeta() to recognize commit refs cvsserver: implement req_Sticky and related utilities cvsserver: add misc commit lookup, file meta data, and file listing functions cvsserver: define a tag name character escape mechanism cvsserver: cleanup extra slashes in filename arguments cvsserver: factor out git-log parsing logic
2013-01-22Merge branch 'mz/reset-misc'Libravatar Junio C Hamano3-7/+73
Various 'reset' optimizations and clean-ups, followed by a change to allow "git reset" to work even on an unborn branch. * mz/reset-misc: reset: update documentation to require only tree-ish with paths reset [--mixed]: use diff-based reset whether or not pathspec was given reset: allow reset on unborn branch reset $sha1 $pathspec: require $sha1 only to be treeish reset.c: inline update_index_refresh() reset.c: finish entire cmd_reset() whether or not pathspec is given reset [--mixed]: only write index file once reset.c: move lock, write and commit out of update_index_refresh() reset.c: move update_index_refresh() call out of read_from_tree() reset.c: replace switch by if-else reset: avoid redundant error message reset --keep: only write index file once reset.c: share call to die_if_unmerged_cache() reset.c: extract function for updating {ORIG_,}HEAD reset.c: remove unnecessary variable 'i' reset.c: extract function for parsing arguments reset: don't allow "git reset -- $pathspec" in bare repo reset.c: pass pathspec around instead of (prefix, argv) pair reset $pathspec: exit with code 0 if successful reset $pathspec: no need to discard index
2013-01-21Merge branch 'pw/p4-branch-fixes'Libravatar Junio C Hamano2-9/+128
Fix "git p4" around branch handling. * pw/p4-branch-fixes: git p4: fix submit when no master branch git p4 test: keep P4CLIENT changes inside subshells git p4: fix sync --branch when no master branch git p4: fail gracefully on sync with no master branch git p4: rearrange self.initialParent use git p4: allow short ref names to --branch git p4 doc: fix branch detection example git p4: clone --branch should checkout master git p4: verify expected refs in clone --bare test git p4: create p4/HEAD on initial clone git p4: inline listExistingP4GitBranches git p4: add comments to p4BranchesInGit git p4: rearrange and simplify hasOrigin handling git p4: test sync/clone --branch behavior
2013-01-20Merge branch 'rt/commit-cleanup-config'Libravatar Junio C Hamano2-7/+82
Add a configuration variable to set default clean-up mode other than "strip". * rt/commit-cleanup-config: commit: make default of "cleanup" option configurable
2013-01-20Merge branch 'ap/log-mailmap'Libravatar Junio C Hamano1-0/+56
Teach commands in the "log" family to optionally pay attention to the mailmap. * ap/log-mailmap: log --use-mailmap: optimize for cases without --author/--committer search log: add log.mailmap configuration option log: grep author/committer using mailmap test: add test for --use-mailmap option log: add --use-mailmap option pretty: use mailmap to display username and email mailmap: add mailmap structure to rev_info and pp mailmap: simplify map_user() interface mailmap: remove email copy and length limitation Use split_ident_line to parse author and committer string-list: allow case-insensitive string list
2013-01-18Merge branch 'nd/fix-perf-parameters-in-tests'Libravatar Junio C Hamano1-1/+1
Allow GIT_PERF_* environment variables to be passed through the test framework. * nd/fix-perf-parameters-in-tests: test-lib.sh: unfilter GIT_PERF_*
2013-01-15test-lib.sh: unfilter GIT_PERF_*Libravatar Nguyễn Thái Ngọc Duy1-1/+1
These variables are user parameters to control how to run the perf tests. Allow users to do so. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: fix submit when no master branchLibravatar Pete Wyckoff1-0/+25
It finds its upstream and applies the commit properly, but the sync step will fail unless it is told which branch to work on. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4 test: keep P4CLIENT changes inside subshellsLibravatar Pete Wyckoff1-2/+5
Tests assume that this is set to something valid. Make sure that the 'clone --use-client-spec' does not leak its changes out into the rest of the tests. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: fix sync --branch when no master branchLibravatar Pete Wyckoff1-4/+4
It is legal to sync a branch with a different name than refs/remotes/p4/master, and to do so even when master does not exist. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: fail gracefully on sync with no master branchLibravatar Pete Wyckoff1-5/+4
If --branch was used to build a repository with no refs/remotes/p4/master, future syncs will not know which branch to sync. Notice this situation and print a helpful error message. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: allow short ref names to --branchLibravatar Pete Wyckoff1-0/+21
For a clone or sync, --branch says where the newly imported branch should go, or which existing branch to sync up. It takes an argument, which is currently either something that starts with "refs/", or if not, "refs/heads/p4" is prepended. Putting it in heads seems like a bad default; these should go in remotes/p4/ in most situations. Make that the new default, and be more liberal in the form of the branch name. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: clone --branch should checkout masterLibravatar Pete Wyckoff1-1/+1
When using the --branch argument to "git p4 clone", one might specify a destination for p4 changes different from the default refs/remotes/p4/master. Both cases should create a master branch and checkout files. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: verify expected refs in clone --bare testLibravatar Pete Wyckoff1-3/+6
Make sure that the standard branches are created as expected. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: create p4/HEAD on initial cloneLibravatar Pete Wyckoff1-0/+23
There is code to create a symbolic reference from p4/HEAD to p4/master. This allows saying "git show p4" as a shortcut to "git show p4/master", for example. But this reference was only created on the second "git p4 sync" (or first sync after a clone). Make it work on the initial clone or sync. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15git p4: test sync/clone --branch behaviorLibravatar Pete Wyckoff1-4/+49
Add failing tests to document behavior when there are multiple p4 branches, as created using the --branch option. In particular: Using clone --branch populates the specified branch correctly, but dies with an error when trying to checkout master. Calling sync without a master branch dies with an error looking for master. When there are two or more branches, a sync does nothing due to branch detection code, but that is expected. Using sync --branch to try to update just a particular branch updates no branch, but appears to succeed. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15reset: allow reset on unborn branchLibravatar Martin von Zweigbergk1-0/+52
Some users seem to think, knowingly or not, that being on an unborn branch is like having a commit with an empty tree checked out, but when run on an unborn branch, "git reset" currently fails with: fatal: Failed to resolve 'HEAD' as a valid ref. Instead of making users figure out that they should run git rm --cached -r . , let's teach "git reset" without a revision argument, when on an unborn branch, to behave as if the user asked to reset to an empty tree. Don't take the analogy with an empty commit too far, though, but still disallow explictly referring to HEAD in "git reset HEAD". Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15reset $sha1 $pathspec: require $sha1 only to be treeishLibravatar Martin von Zweigbergk1-0/+8
Resetting with paths does not update HEAD and there is nothing else that a commit should be needed for. Relax the argument parsing so only a tree is required. The sha1 is only passed to read_from_tree(), which already only requires a tree. The "rev" variable we pass to run_add_interactive() will resolve to a tree. This is fine since interactive_reset only needs the parameter to be a treeish and doesn't use it for display purposes. Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15reset $pathspec: exit with code 0 if successfulLibravatar Martin von Zweigbergk2-7/+13
"git reset $pathspec" currently exits with a non-zero exit code if the worktree is dirty after resetting, which is inconsistent with reset without pathspec, and it makes it harder to know whether the command really failed. Change it to exit with code 0 regardless of whether the worktree is dirty so that non-zero indicates an error. This makes the 4 "disambiguation" test cases in t7102 clearer since they all used to "fail", 3 of which "failed" due to changes in the work tree. Now only the ambiguous one fails. Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-14Merge branch 'fc/remote-testgit-feature-done'Libravatar Junio C Hamano1-0/+21
In the longer term, tightening rules is a good thing to do, and because nobody who has worked in the remote helper area seems to be interested in reviewing this, I would assume they do not think such a retroactive tightening will affect their remote helpers. So let's advance this topic to see what happens. * fc/remote-testgit-feature-done: remote-testgit: properly check for errors
2013-01-14Merge branch 'ap/status-ignored-in-ignored-directory'Libravatar Junio C Hamano1-0/+146
Output from "git status --ignored" showed an unexpected interaction with "--untracked". * ap/status-ignored-in-ignored-directory: status: always report ignored tracked directories git-status: Test --ignored behavior dir.c: Make git-status --ignored more consistent
2013-01-14Merge branch 'jk/unify-exit-code-by-receiving-signal' into maintLibravatar Junio C Hamano1-1/+1
* jk/unify-exit-code-by-receiving-signal: run-command: encode signal death as a positive integer
2013-01-14Merge branch 'jl/interrupt-clone-remove-separate-git-dir' into maintLibravatar Junio C Hamano1-1/+11
When "git clone --separate-git-dir=$over_there" is interrupted, it failed to remove the real location of the $GIT_DIR it created. This was most visible when interrupting a submodule update. * jl/interrupt-clone-remove-separate-git-dir: clone: support atomic operation with --separate-git-dir
2013-01-14Merge branch 'mk/maint-graph-infinity-loop' into maintLibravatar Junio C Hamano1-0/+10
* mk/maint-graph-infinity-loop: graph.c: infinite loop in git whatchanged --graph -m
2013-01-11Merge branch 'rs/zip-tests'Libravatar Junio C Hamano5-80/+140
Update zip tests to skip some that cannot be handled on platform unzip. * rs/zip-tests: t5003: check if unzip supports symlinks t5000, t5003: move ZIP tests into their own script t0024, t5000: use test_lazy_prereq for UNZIP t0024, t5000: clear variable UNZIP, use GIT_UNZIP instead
2013-01-11Merge branch 'jk/unify-exit-code-by-receiving-signal'Libravatar Junio C Hamano1-1/+1
The internal logic had to deal with two representations of a death of a child process by a signal. * jk/unify-exit-code-by-receiving-signal: run-command: encode signal death as a positive integer
2013-01-11Merge branch 'jc/merge-blobs'Libravatar Junio C Hamano1-0/+44
Update the disused merge-tree proof-of-concept code. * jc/merge-blobs: merge-tree: fix d/f conflicts merge-tree: add comments to clarify what these functions are doing merge-tree: lose unused "resolve_directories" merge-tree: lose unused "flags" from merge_list Which merge_file() function do you mean?
2013-01-11Merge branch 'jc/format-patch-reroll'Libravatar Junio C Hamano1-0/+16
Teach "format-patch" to prefix v4- to its output files for the fourth iteration of a patch series, to make it easier for the submitter to keep separate copies for iterations. * jc/format-patch-reroll: format-patch: give --reroll-count a short synonym -v format-patch: document and test --reroll-count format-patch: add --reroll-count=$N option get_patch_filename(): split into two functions get_patch_filename(): drop "just-numbers" hack get_patch_filename(): simplify function signature builtin/log.c: stop using global patch_suffix builtin/log.c: drop redundant "numbered_files" parameter from make_cover_letter() builtin/log.c: drop unused "numbered" parameter from make_cover_letter()
2013-01-11Merge branch 'jk/enable-test-lint-by-default' into maintLibravatar Junio C Hamano1-0/+1
We have two simple and quick tests to catch common mistakes when writing test scripts, but we did not run them by default when running tests. * jk/enable-test-lint-by-default: tests: turn on test-lint by default
2013-01-11Merge branch 'ap/merge-stop-at-prepare-commit-msg-failure' into maintLibravatar Junio C Hamano1-0/+14
"git merge" started calling prepare-commit-msg hook like "git commit" does some time ago, but forgot to pay attention to the exit status of the hook. * ap/merge-stop-at-prepare-commit-msg-failure: merge: Honor prepare-commit-msg return code
2013-01-11Merge branch 'as/test-name-alias-uniquely' into maintLibravatar Junio C Hamano1-6/+6
* as/test-name-alias-uniquely: Use longer alias names in subdirectory tests
2013-01-11Merge branch 'ja/directory-attrs' into maintLibravatar Junio C Hamano1-0/+57
The attribute mechanism didn't allow limiting attributes to be applied to only a single directory itself with "path/" like the exclude mechanism does. * ja/directory-attrs: Add directory pattern matching to attributes
2013-01-11Merge branch 'jc/fetch-ignore-symref' into maintLibravatar Junio C Hamano1-0/+42
"git fetch --mirror" and fetch that uses other forms of refspec with wildcard used to attempt to update a symbolic ref that match the wildcard on the receiving end, which made little sense (the real ref that is pointed at by the symbolic ref would be updated anyway). Symbolic refs no longer are affected by such a fetch. * jc/fetch-ignore-symref: fetch: ignore wildcarded refspecs that update local symbolic refs
2013-01-10Merge branch 'tb/test-t9810-no-sed-i' into maintLibravatar Junio C Hamano1-10/+14
* tb/test-t9810-no-sed-i: t9810: Do not use sed -i
2013-01-10Merge branch 'tb/test-t9020-no-which' into maintLibravatar Junio C Hamano1-2/+2
* tb/test-t9020-no-which: t9020: which is not portable
2013-01-10Merge branch 'sp/shortlog-missing-lf' into maintLibravatar Junio C Hamano1-0/+24
* sp/shortlog-missing-lf: strbuf_add_wrapped*(): Remove unused return value shortlog: fix wrapping lines of wraplen
2013-01-10Merge branch 'nd/invalidate-i-t-a-cache-tree' into maintLibravatar Junio C Hamano1-0/+20
* nd/invalidate-i-t-a-cache-tree: cache-tree: invalidate i-t-a paths after generating trees cache-tree: fix writing cache-tree when CE_REMOVE is present cache-tree: replace "for" loops in update_one with "while" loops cache-tree: remove dead i-t-a code in verify_cache()
2013-01-10Merge branch 'jl/interrupt-clone-remove-separate-git-dir'Libravatar Junio C Hamano1-1/+11
When "git clone --separate-git-dir" is interrupted, we failed to remove the real location we created the repository. * jl/interrupt-clone-remove-separate-git-dir: clone: support atomic operation with --separate-git-dir
2013-01-10Merge branch 'nd/wildmatch'Libravatar Junio C Hamano3-0/+250
Allows pathname patterns in .gitignore and .gitattributes files with double-asterisks "foo/**/bar" to match any number of directory hierarchies. * nd/wildmatch: wildmatch: replace variable 'special' with better named ones compat/fnmatch: respect NO_FNMATCH* even on glibc wildmatch: fix "**" special case t3070: Disable some failing fnmatch tests test-wildmatch: avoid Windows path mangling Support "**" wildcard in .gitignore and .gitattributes wildmatch: make /**/ match zero or more directories wildmatch: adjust "**" behavior wildmatch: fix case-insensitive matching wildmatch: remove static variable force_lower_case wildmatch: make wildmatch's return value compatible with fnmatch t3070: disable unreliable fnmatch tests Integrate wildmatch to git wildmatch: follow Git's coding convention wildmatch: remove unnecessary functions Import wildmatch from rsync ctype: support iscntrl, ispunct, isxdigit and isprint ctype: make sane_ctype[] const array Conflicts: Makefile
2013-01-10Merge branch 'tb/test-shell-lint'Libravatar Junio C Hamano2-2/+33
Check for common mistakes in the test scripts, based on simple pattern-matching. * tb/test-shell-lint: test: Add check-non-portable-shell.pl
2013-01-10Merge branch 'mz/pick-unborn'Libravatar Junio C Hamano9-40/+32
Allow "git cherry-pick $commit" even when you do not have any history behind HEAD yet. * mz/pick-unborn: learn to pick/revert into unborn branch tests: move test_cmp_rev to test-lib-functions
2013-01-10log: add log.mailmap configuration optionLibravatar Antoine Pelisse1-0/+24
Teach "log.mailmap" configuration variable to turn "--use-mailmap" option on to "git log", "git show" and "git whatchanged". The "--no-use-mailmap" option from the command line can countermand the setting. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10log: grep author/committer using mailmapLibravatar Antoine Pelisse1-0/+18
Currently you can use mailmap to display log authors and committers but you can't use the mailmap to find commits with mapped values. This commit allows you to run: git log --use-mailmap --author mapped_name_or_email git log --use-mailmap --committer mapped_name_or_email Of course it only works if the --use-mailmap option is used. The new name and email are copied only when necessary. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10test: add test for --use-mailmap optionLibravatar Antoine Pelisse1-0/+14
The new option '--use-mailmap' can be used to make sure that mailmap file is used to convert name when running log commands. The test is simple and checks that the Author line is correctly replaced when running log. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10commit: make default of "cleanup" option configurableLibravatar Ralf Thielow2-7/+82
The default of the "cleanup" option in "git commit" is not configurable. Users who don't want to use the default have to pass this option on every commit since there's no way to configure it. This commit introduces a new config option "commit.cleanup" which can be used to change the default of the "cleanup" option in "git commit". Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-09Merge branch 'nd/maint-branch-desc-doc'Libravatar Junio C Hamano1-0/+42
Teach various forms of "format-patch" command line to identify what branch the patches are taken from, so that the branch description is picked up in more cases. * nd/maint-branch-desc-doc: format-patch: pick up branch description when no ref is specified format-patch: pick up correct branch name from symbolic ref t4014: a few more tests on cover letter using branch description branch: delete branch description if it's empty config.txt: a few lines about branch.<name>.description
2013-01-09Merge branch 'jk/enable-test-lint-by-default'Libravatar Junio C Hamano1-0/+1
We have two simple and quick tests to catch common mistakes when writing test scripts, but we did not run them by default when running tests. * jk/enable-test-lint-by-default: tests: turn on test-lint by default
2013-01-09Merge branch 'ap/merge-stop-at-prepare-commit-msg-failure'Libravatar Junio C Hamano1-0/+14
"git merge" started calling prepare-commit-msg hook like "git commit" does some time ago, but forgot to pay attention to the exit status of the hook. t7505 may want a general clean-up but that is a different topic. * ap/merge-stop-at-prepare-commit-msg-failure: merge: Honor prepare-commit-msg return code
2013-01-08Merge branch 'maint'Libravatar Junio C Hamano1-2/+4
* maint: t1402: work around shell quoting issue on NetBSD remote-hg: Fix biridectionality -> bidirectionality typos
2013-01-08Merge branch 'as/test-name-alias-uniquely'Libravatar Junio C Hamano1-6/+6
A few short-and-bland aliases used in the tests were interfering with git-custom command in user's $PATH. * as/test-name-alias-uniquely: Use longer alias names in subdirectory tests