summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2011-09-02Merge branch 'en/merge-recursive-2'Libravatar Junio C Hamano5-46/+1454
* en/merge-recursive-2: (57 commits) merge-recursive: Don't re-sort a list whose order we depend upon merge-recursive: Fix virtual merge base for rename/rename(1to2)/add-dest t6036: criss-cross + rename/rename(1to2)/add-dest + simple modify merge-recursive: Avoid unnecessary file rewrites t6022: Additional tests checking for unnecessary updates of files merge-recursive: Fix spurious 'refusing to lose untracked file...' messages t6022: Add testcase for spurious "refusing to lose untracked" messages t3030: fix accidental success in symlink rename merge-recursive: Fix working copy handling for rename/rename/add/add merge-recursive: add handling for rename/rename/add-dest/add-dest merge-recursive: Have conflict_rename_delete reuse modify/delete code merge-recursive: Make modify/delete handling code reusable merge-recursive: Consider modifications in rename/rename(2to1) conflicts merge-recursive: Create function for merging with branchname:file markers merge-recursive: Record more data needed for merging with dual renames merge-recursive: Defer rename/rename(2to1) handling until process_entry merge-recursive: Small cleanups for conflict_rename_rename_1to2 merge-recursive: Fix rename/rename(1to2) resolution for virtual merge base merge-recursive: Introduce a merge_file convenience function merge-recursive: Fix modify/delete resolution in the recursive case ...
2011-09-01git-svn: Teach dcommit --mergeinfo to handle multiple linesLibravatar Bryan Jacobs1-0/+13
"svn dcommit --mergeinfo" replaces the svn:mergeinfo property in an upstream SVN repository with the given text. The svn:mergeinfo property may contain commits originating on multiple branches, separated by newlines. Cause space characters in the mergeinfo to be replaced by newlines, allowing a user to create history representing multiple branches being merged into one. Update the corresponding documentation and add a test for the new functionality. Signed-off-by: Bryan Jacobs <bjacobs@woti.com> Acked-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-09-01git-svn: New flag to emulate empty directoriesLibravatar Ray Chen1-0/+153
Adds a --preserve-empty-dirs flag to the clone operation that will detect empty directories in the remote Subversion repository and create placeholder files in the corresponding local Git directories. This allows "empty" directories to exist in the history of a Git repository. Also adds the --placeholder-file flag to control the name of any placeholder files created. Default value is ".gitignore". Signed-off-by: Ray Chen <rchen@cs.umd.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-08-28Merge branch 'nd/maint-clone-gitdir'Libravatar Junio C Hamano1-0/+4
* nd/maint-clone-gitdir: clone: allow to clone from .git file read_gitfile_gently(): rename misnamed function to read_gitfile()
2011-08-28Merge branch 'ci/forbid-unwanted-current-branch-update'Libravatar Junio C Hamano2-0/+29
* ci/forbid-unwanted-current-branch-update: Show interpreted branch name in error messages Prevent force-updating of the current branch
2011-08-28Merge branch 'jk/pager-with-external-command'Libravatar Junio C Hamano1-0/+36
* jk/pager-with-external-command: support pager.* for external commands
2011-08-28Merge branch 'jc/maint-clone-alternates'Libravatar Junio C Hamano1-0/+23
* jc/maint-clone-alternates: clone: clone from a repository with relative alternates clone: allow more than one --reference Conflicts: builtin/clone.c
2011-08-28Merge branch 'jk/color-and-pager'Libravatar Junio C Hamano2-23/+61
* jk/color-and-pager: want_color: automatically fallback to color.ui diff: don't load color config in plumbing config: refactor get_colorbool function color: delay auto-color decision until point of use git_config_colorbool: refactor stdout_is_tty handling diff: refactor COLOR_DIFF from a flag into an int setup_pager: set GIT_PAGER_IN_USE t7006: use test_config helpers test-lib: add helper functions for config t7006: modernize calls to unset Conflicts: builtin/commit.c parse-options.c
2011-08-28Merge branch 'di/fast-import-tagging'Libravatar Junio C Hamano1-0/+67
* di/fast-import-tagging: fast-import: allow to tag newly created objects fast-import: add tests for tagging blobs
2011-08-28Merge branch 'di/fast-import-deltified-tree'Libravatar Junio C Hamano1-0/+41
* di/fast-import-deltified-tree: fast-import: prevent producing bad delta fast-import: add a test for tree delta base corruption
2011-08-28Merge branch 'di/fast-import-ident'Libravatar Junio C Hamano2-0/+135
* di/fast-import-ident: fsck: improve committer/author check fsck: add a few committer name tests fast-import: check committer name more strictly fast-import: don't fail on omitted committer name fast-import: add input format tests
2011-08-28Merge branch 'va/p4-branch-import'Libravatar Junio C Hamano1-0/+200
* va/p4-branch-import: git-p4: Add simple test case for branch import git-p4: Allow branch definition with git config git-p4: Allow filtering Perforce branches by user git-p4: Correct branch base depot path detection git-p4: Process detectCopiesHarder with --bool git-p4: Add test case for copy detection git-p4: Add test case for rename detection git-p4: Add description of rename/copy detection options git-p4: Allow setting rename/copy detection threshold
2011-08-25Merge branch 'jc/merge-reword'Libravatar Junio C Hamano1-3/+3
* jc/merge-reword: merge: reword the final message
2011-08-25Merge branch 'mg/branch-set-upstream-previous'Libravatar Junio C Hamano1-0/+14
* mg/branch-set-upstream-previous: branch.c: use the parsed branch name
2011-08-25Merge branch 'di/fast-import-doc'Libravatar Junio C Hamano1-0/+47
* di/fast-import-doc: doc/fast-import: document feature import-marks-if-exists
2011-08-25Merge branch 'jn/plug-empty-tree-leak'Libravatar Junio C Hamano1-1/+26
* jn/plug-empty-tree-leak: merge-recursive: take advantage of hardcoded empty tree revert: plug memory leak in "cherry-pick root commit" codepath
2011-08-23Merge branch 'rt/zlib-smaller-window'Libravatar Junio C Hamano22-7/+73
* rt/zlib-smaller-window: test: consolidate definition of $LF Tolerate zlib deflation with window size < 32Kb
2011-08-23Merge branch 'jn/maint-test-return'Libravatar Junio C Hamano2-9/+13
* jn/maint-test-return: t3900: do not reference numbered arguments from the test script test: cope better with use of return for errors test: simplify return value of test_run_
2011-08-23Merge branch 'cb/maint-ls-files-error-report'Libravatar Junio C Hamano1-0/+70
* cb/maint-ls-files-error-report: ls-files: fix pathspec display on error
2011-08-23fast-import: allow to tag newly created objectsLibravatar Dmitry Ivankov1-0/+26
fast-import allows to tag objects by sha1 and to query sha1 of objects being imported. So it should allow to tag these objects, make it do so. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-23fast-import: add tests for tagging blobsLibravatar Dmitry Ivankov1-0/+41
fast-import allows to create an annotated tag that annotates a blob, via mark or direct sha1 specification. For mark it works, for sha1 it tries to read the object. It tries to do so via read_sha1_file, and then checks the size to be at least 46. That's weird, let's just allow to (annotated) tag any object referenced by sha1. If the object originates from our packfile, we still fail though. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-23clone: clone from a repository with relative alternatesLibravatar Junio C Hamano1-1/+9
Cloning from a local repository blindly copies or hardlinks all the files under objects/ hierarchy. This results in two issues: - If the repository cloned has an "objects/info/alternates" file, and the command line of clone specifies --reference, the ones specified on the command line get overwritten by the copy from the original repository. - An entry in a "objects/info/alternates" file can specify the object stores it borrows objects from as a path relative to the "objects/" directory. When cloning a repository with such an alternates file, if the new repository is not sitting next to the original repository, such relative paths needs to be adjusted so that they can be used in the new repository. This updates add_to_alternates_file() to take the path to the alternate object store, including the "/objects" part at the end (earlier, it was taking the path to $GIT_DIR and was adding "/objects" itself), as it is technically possible to specify in objects/info/alternates file the path of a directory whose name does not end with "/objects". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22git-p4: Add simple test case for branch importLibravatar Vitor Antunes1-0/+64
Create a basic branch structure in P4 and clone it with git-p4. Also, make an update on P4 side and check if git-p4 imports it correctly. The branch structure is created in such a way that git-p4 will fail to import updates if patch "git-p4: Correct branch base depot path detection" is not applied. Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22clone: allow more than one --referenceLibravatar Junio C Hamano1-0/+15
Also add a test to expose a long-standing bug that is triggered when cloning with --reference option from a local repository that has its own alternates. The alternate object stores specified on the command line are lost, and only alternates copied from the source repository remain. The bug will be fixed in the next patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22Show interpreted branch name in error messagesLibravatar Conrad Irwin1-0/+9
Change the error message when doing: "git branch @{-1}", "git checkout -b @{-1}", or "git branch -m foo @{-1}" * was: A branch named '@{-1}' already exists. * now: A branch named 'bar' already exists. Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22Prevent force-updating of the current branchLibravatar Conrad Irwin2-0/+20
"git branch -M <foo> <current-branch>" allows updating the current branch which HEAD points, without the necessary house-keeping that git reset normally does to make this operation sensible. It also leaves the reflog in a confusing state (you would be warned when trying to read it). "git checkout -B <current branch> <foo>" is also partly vulnerable to this bug; due to inconsistent pre-flight checks it would perform half of its task and then abort just before rewriting the branch. Again this manifested itself as the index file getting out-of-sync with HEAD. "git branch -f" already guarded against this problem, and aborts with a fatal error. Update "git branch -M", "git checkout -B" and "git branch -f" to share the same check before allowing a branch to be created. These prevent you from updating the current branch. We considered suggesting the use of "git reset" in the failure message but concluded that it was not possible to discern what the user was actually trying to do. Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22clone: allow to clone from .git fileLibravatar Nguyễn Thái Ngọc Duy1-0/+4
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22git-p4: Add test case for copy detectionLibravatar Vitor Antunes1-0/+83
Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-22git-p4: Add test case for rename detectionLibravatar Vitor Antunes1-0/+53
Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19support pager.* for external commandsLibravatar Jeff King1-0/+36
Without this patch, any commands that are not builtin would not respect pager.* config. For example: git config pager.stash false git stash list would still use a pager. With this patch, pager.stash now has an effect. If it is not specified, we will still fall back to pager.log when we invoke "log" from "stash list". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19color: delay auto-color decision until point of useLibravatar Jeff King1-0/+12
When we read a color value either from a config file or from the command line, we use git_config_colorbool to convert it from the tristate always/never/auto into a single yes/no boolean value. This has some timing implications with respect to starting a pager. If we start (or decide not to start) the pager before checking the colorbool, everything is fine. Either isatty(1) will give us the right information, or we will properly check for pager_in_use(). However, if we decide to start a pager after we have checked the colorbool, things are not so simple. If stdout is a tty, then we will have already decided to use color. However, the user may also have configured color.pager not to use color with the pager. In this case, we need to actually turn off color. Unfortunately, the pager code has no idea which color variables were turned on (and there are many of them throughout the code, and they may even have been manipulated after the colorbool selection by something like "--color" on the command line). This bug can be seen any time a pager is started after config and command line options are checked. This has affected "git diff" since 89d07f7 (diff: don't run pager if user asked for a diff style exit code, 2007-08-12). It has also affect the log family since 1fda91b (Fix 'git log' early pager startup error case, 2010-08-24). This patch splits the notion of parsing a colorbool and actually checking the configuration. The "use_color" variables now have an additional possible value, GIT_COLOR_AUTO. Users of the variable should use the new "want_color()" wrapper, which will lazily determine and cache the auto-color decision. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19branch.c: use the parsed branch nameLibravatar Michael J Gruber1-0/+14
When setting up tracking info, branch.c uses the given branch specifier ("name"). Use the parsed name ("ref.buf") instead so that git branch --set-upstream @{-1} foo sets up tracking info for the previous branch rather than for a branch named "@{-1}". Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-18Merge branch 'db/am-skip-blank-at-the-beginning'Libravatar Junio C Hamano1-0/+18
* db/am-skip-blank-at-the-beginning: am: ignore leading whitespace before patch
2011-08-18setup_pager: set GIT_PAGER_IN_USELibravatar Jeff King1-0/+11
We have always set a global "spawned_pager" variable when we start the pager. This lets us make the auto-color decision later in the program as as "we are outputting to a terminal, or to a pager which can handle colors". Commit 6e9af86 added support for the GIT_PAGER_IN_USE environment variable. An external program calling git (e.g., git-svn) could set this variable to indicate that it had already started the pager, and that the decision about auto-coloring should take that into account. However, 6e9af86 failed to do the reverse, which is to tell external programs when git itself has started the pager. Thus a git command implemented as an external script that has the pager turned on (e.g., "git -p stash show") would not realize it was going to a pager, and would suppress colors. This patch remedies that; we always set GIT_PAGER_IN_USE when we start the pager, and the value is respected by both this program and any spawned children. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-18t7006: use test_config helpersLibravatar Jeff King1-21/+18
In some cases, this is just making the test script a little shorter and easier to read. However, there are several places where we didn't take proper precautions against polluting downstream tests with our config; this fixes them, too. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-18test-lib: add helper functions for configLibravatar Jeff King1-0/+18
There are a few common tasks when working with configuration variables in tests; this patch aims to make them a little easier to write and less error-prone. When setting a variable, you should typically make sure to clean it up after the test is finished, so as not to pollute other tests. Like: test_when_finished 'git config --unset foo.bar' && git config foo.bar baz This patch lets you just write: test_config foo.bar baz When clearing a variable that does not exist, git-config will report a specific non-zero error code. Meaning that tests which call "git config --unset" often either rely on the prior tests having actually set it, or must use test_might_fail. With this patch, the previous: test_might_fail git config --unset foo.bar becomes: test_unconfig foo.bar Not only is this easier to type, but it is more robust; it will correctly detect errors from git-config besides "key was not set". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-18t7006: modernize calls to unsetLibravatar Jeff King1-2/+2
These tests break &&-chaining to deal with broken "unset" implementations. Instead, they should just use sane_unset. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-17Merge branch 'mh/check-attr-relative'Libravatar Junio C Hamano1-21/+69
* mh/check-attr-relative: (29 commits) test-path-utils: Add subcommand "prefix_path" test-path-utils: Add subcommand "absolute_path" git-check-attr: Normalize paths git-check-attr: Demonstrate problems with relative paths git-check-attr: Demonstrate problems with unnormalized paths git-check-attr: test that no output is written to stderr Rename git_checkattr() to git_check_attr() git-check-attr: Fix command-line handling to match docs git-check-attr: Drive two tests using the same raw data git-check-attr: Add an --all option to show all attributes git-check-attr: Error out if no pathnames are specified git-check-attr: Process command-line args more systematically git-check-attr: Handle each error separately git-check-attr: Extract a function error_with_usage() git-check-attr: Introduce a new variable git-check-attr: Extract a function output_attr() Allow querying all attributes on a file Remove redundant check Remove redundant call to bootstrap_attr_stack() Extract a function collect_all_attrs() ...
2011-08-17Merge branch 'js/bisect-no-checkout'Libravatar Junio C Hamano1-3/+172
* js/bisect-no-checkout: bisect: add support for bisecting bare repositories bisect: further style nitpicks bisect: replace "; then" with "\n<tab>*then" bisect: cleanup whitespace errors in git-bisect.sh. bisect: add documentation for --no-checkout option. bisect: add tests for the --no-checkout option. bisect: introduce --no-checkout support into porcelain. bisect: introduce support for --no-checkout option. bisect: add tests to document expected behaviour in presence of broken trees. bisect: use && to connect statements that are deferred with eval. bisect: move argument parsing before state modification.
2011-08-17Merge branch 'rc/histogram-diff'Libravatar Junio C Hamano3-159/+180
* rc/histogram-diff: xdiff/xhistogram: drop need for additional variable xdiff/xhistogram: rely on xdl_trim_ends() xdiff/xhistogram: rework handling of recursed results xdiff: do away with xdl_mmfile_next() Make test number unique xdiff/xprepare: use a smaller sample size for histogram diff xdiff/xprepare: skip classification teach --histogram to diff t4033-diff-patience: factor out tests xdiff/xpatience: factor out fall-back-diff function xdiff/xprepare: refactor abort cleanups xdiff/xprepare: use memset()
2011-08-17Merge branch 'js/ref-namespaces'Libravatar Junio C Hamano1-0/+85
* js/ref-namespaces: ref namespaces: tests ref namespaces: documentation ref namespaces: Support remote repositories via upload-pack and receive-pack ref namespaces: infrastructure Fix prefix handling in ref iteration functions
2011-08-17doc/fast-import: document feature import-marks-if-existsLibravatar Dmitry Ivankov1-0/+47
fast-import command-line option --import-marks-if-exists was introduced in commit dded4f1 (fast-import: Introduce --import-marks-if-exists, 2011-01-15) --import-marks option can be set via a "feature" command in a fast-import stream and --import-marks-if-exists had support for such specification from the very beginning too due to some shared codebase. Though the documentation for this feature wasn't written in dded4f1. Add the documentation for "feature import-marks-if-exists=<file>". Also add a minimalistic test for it. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-16Merge branch 'jk/tag-list-multiple-patterns' into maintLibravatar Junio C Hamano1-0/+5
* jk/tag-list-multiple-patterns: tag: accept multiple patterns for --list
2011-08-16Merge branch 'jl/submodule-update-quiet' into maintLibravatar Junio C Hamano1-2/+4
* jl/submodule-update-quiet: submodule: update and add must honor --quiet flag
2011-08-16Merge branch 'jl/submodule-add-relurl-wo-upstream' into maintLibravatar Junio C Hamano1-0/+10
* jl/submodule-add-relurl-wo-upstream: submodule add: clean up duplicated code submodule add: allow relative repository path even when no url is set submodule add: test failure when url is not configured in superproject Conflicts: git-submodule.sh
2011-08-16Merge branch 'js/ls-tree-error' into maintLibravatar Junio C Hamano1-0/+24
* js/ls-tree-error: Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails. Add a test to check that git ls-tree sets non-zero exit code on error.
2011-08-16Merge branch 'jk/fast-export-quote-path' into maintLibravatar Junio C Hamano1-1/+27
* jk/fast-export-quote-path: fast-export: quote paths in output
2011-08-16Merge branch 'jc/maint-reset-unmerged-path' into maintLibravatar Junio C Hamano1-0/+15
* jc/maint-reset-unmerged-path: reset [<commit>] paths...: do not mishandle unmerged paths
2011-08-16Merge branch 'jc/submodule-sync-no-auto-vivify' into maintLibravatar Junio C Hamano1-2/+13
* jc/submodule-sync-no-auto-vivify: submodule add: always initialize .git/config entry submodule sync: do not auto-vivify uninteresting submodule
2011-08-16Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4' into maintLibravatar Junio C Hamano1-0/+18
* bc/submodule-foreach-stdin-fix-1.7.4: git-submodule.sh: preserve stdin for the command spawned by foreach t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin