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
2009-08-24Teach Git to respect skip-worktree bit (writing part)Nguyễn Thái Ngọc Duy
This part is mainly to remove CE_VALID shortcuts (and as a consequence, ce_uptodate() shortcuts as it may be turned on by CE_VALID) in writing code path if skip-worktree is used. Various tests are added to avoid future breakages. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-24Teach Git to respect skip-worktree bit (reading part)Nguyễn Thái Ngọc Duy
grep: turn on --cached for files that is marked skip-worktree ls-files: do not check for deleted file that is marked skip-worktree update-index: ignore update request if it's skip-worktree, while still allows removing diff*: skip worktree version Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-24Introduce "skip-worktree" bit in index, teach Git to get/set this bitNguyễn Thái Ngọc Duy
Detail about this bit is in Documentation/git-update-index.txt. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12Prevent diff machinery from examining assume-unchanged entries on worktreeNguyễ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>
2009-08-11Merge branch 'jc/maint-merge-recursive-fix'Junio C Hamano
* jc/maint-merge-recursive-fix: merge-recursive: don't segfault while handling rename clashes
2009-08-11Merge branch 'ns/am-raw-email'Junio C Hamano
* ns/am-raw-email: git-am: print fair error message when format detection fails am: allow individual e-mail files as input
2009-08-11Merge branch 'jp/symlink-dirs'Junio C Hamano
* jp/symlink-dirs: t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite git-checkout: be careful about untracked symlinks lstat_cache: guard against full match of length of 'name' parameter Demonstrate bugs when a directory is replaced with a symlink
2009-08-11Merge branch 'mk/grep-max-depth'Junio C Hamano
* mk/grep-max-depth: grep: Add --max-depth option.
2009-08-11Merge branch 'js/run-command-updates'Junio C Hamano
* js/run-command-updates: api-run-command.txt: describe error behavior of run_command functions run-command.c: squelch a "use before assignment" warning receive-pack: remove unnecessary run_status report run_command: report failure to execute the program, but optionally don't run_command: encode deadly signal number in the return value run_command: report system call errors instead of returning error codes run_command: return exit code as positive value MinGW: simplify waitpid() emulation macros
2009-08-10git-svn: ignore leading blank lines in svn:ignoreMichael Haggerty
Subversion ignores all blank lines in svn:ignore properties. The old git-svn code ignored blank lines everywhere except for the first line of the svn:ignore property. This patch makes the "git svn show-ignore" and "git svn create-ignore" commands ignore leading blank lines, too. Also include leading blank lines in the test suite. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-08-10svn: Add && to t9107-git-svn-migrate.shAdam Brewster
It was probably intended for the test to fail unless all of the commands succeed. [ew: fixed tests to actually work] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-08-09t/Makefile: include config.makJeff King
This is useful if you want to specify GIT_TEST_OPTS that you always use. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09tests: allow user to specify trash directory locationJeff King
The tests generate a large amount of I/O activity creating and destroying repositories and files. We can improve the time it takes to run the test suite by creating trash directories on filesystems with better performance characteristic, even though we may not want the rest of the git repository on those filesystems (e.g., because they are not network connected, or because they are temporary ramdisks). For example, on a dual processor system: $ cd t && time make -j32 real 1m51.562s user 0m59.260s sys 1m20.933s # /dev/shm is tmpfs $ cd t && time make -j32 GIT_TEST_OPTS="--root=/dev/shm" real 1m1.484s user 0m53.555s sys 1m5.264s We almost halve the wall clock time, and we utilize the dual processors much better. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09tests: provide $TRASH_DIRECTORY variableJeff King
Most scripts don't care about the absolute path to the trash directory. The one exception was t4014 script, which pieced together $TEST_DIRECTORY and $test itself to get an absolute directory. Instead, let's provide a $TRASH_DIRECTORY which specifies the same thing. This keeps the $test variable internal to test-lib.sh and paves the way for trash directories in other locations. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09tests: use "$TEST_DIRECTORY" instead of ".."Jeff King
The $TEST_DIRECTORY variable allows tests to find the top-level test directory regardless of the current working directory. In the past, this has been used to accomodate tests which change directories, but it is also the first step to being able to move trash directories outside of the $TEST_DIRECTORY hierarchy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09t0001-init: split the existence test from the permission testJohannes Sixt
The test for correct permissions after init created a deep directory must be guarded by POSIXPERM. But testing that the deep dirctory exists is good even on platforms that do not provide the POSIXPERM prerequiste. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09t0001-init: fix a file nameJohannes Sixt
Without this change, grep fails because it does not find the file instead of because it does not find the text in the file. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09t6035-merge-dir-to-symlink depends on SYMLINKS prerequisiteJohannes Sixt
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-08Merge branch 'maint'Junio C Hamano
* maint: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-08Merge branch 'maint-1.6.3' into maintJunio C Hamano
* maint-1.6.3: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-08Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano
* maint-1.6.2: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-08Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano
* maint-1.6.1: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-08Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano
* maint-1.6.0: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-08t5510: harden the way verify-pack is usedJunio C Hamano
The test ignored the exit status from verify pack command, and also relied on not seeing any delta chain statistics. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07am: allow individual e-mail files as inputJunio C Hamano
We traditionally allowed a mbox file or a directory name of a maildir (but never an individual file inside a maildir) to be given to "git am". Even though an individual file in a maildir (or more generally, a piece of RFC2822 e-mail) is not a mbox file, it contains enough information to create a commit out of it, so there is no reason to reject one. Running mailsplit on such a file feels stupid, but it does not hurt. This builds on top of a5a6755 (git-am foreign patch support: introduce patch_format, 2009-05-27) that introduced mailbox format detection. The codepath to deal with a mbox requires it to begin with "From " line and also allows it to begin with "From: ", but a random piece of e-mail can and often do begin with any valid RFC2822 header lines. Instead of checking the first line, we extract all the lines up to the first empty line, and make sure they look like e-mail headers. A test is added to t4150 to demonstrate this feature. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05Merge branch 'jc/apply-epoch-patch'Junio C Hamano
* jc/apply-epoch-patch: apply: notice creation/removal patches produced by GNU diff
2009-08-05Merge branch 'ns/init-mkdir'Junio C Hamano
* ns/init-mkdir: git init: optionally allow a directory argument Conflicts: builtin-init-db.c
2009-08-05Merge branch 'sb/maint-pull-rebase'Junio C Hamano
* sb/maint-pull-rebase: pull: support rebased upstream + fetch + pull --rebase t5520-pull: Test for rebased upstream + fetch + pull --rebase
2009-08-05Merge branch 'ne/futz-upload-pack'Junio C Hamano
* ne/futz-upload-pack: Shift object enumeration out of upload-pack Conflicts: upload-pack.c
2009-08-05Merge branch 'maint'Junio C Hamano
* maint: gitweb/README: Document $base_url Documentation: git submodule: add missing options to synopsis Better usage string for reflog. hg-to-git: don't import the unused popen2 module send-email: remove debug trace config: Keep inner whitespace verbatim
2009-08-05Merge branch 'maint-1.6.3' into maintJunio C Hamano
* maint-1.6.3: Better usage string for reflog. hg-to-git: don't import the unused popen2 module send-email: remove debug trace config: Keep inner whitespace verbatim
2009-08-05git-merge-base/git-show-branch --merge-base: Documentation and testMichael J Gruber
Currently, the documentation suggests that 'git merge-base -a' and 'git show-branch --merge-base' are equivalent (in fact it claims that the former cannot handle more than two revs). Alas, the handling of more than two revs is very different. Document this by tests and correct the documentation to reflect this. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05t6010-merge-base.sh: Depict the octopus test graphMichael J Gruber
...so that it is easier to reuse it for other tests. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-31config: Keep inner whitespace verbatimBjörn Steinbrink
Configuration values are expected to be quoted when they have leading or trailing whitespace, but inner whitespace should be kept verbatim even if the value is not quoted. This is already documented in git-config(1), but the code caused inner whitespace to be collapsed to a single space, breaking, for example, clones from a path that has two consecutive spaces in it, as future fetches would only see a single space. Reported-by: John te Bokkel <tanj.tanj@gmail.com> Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-31merge-recursive: don't segfault while handling rename clashesJunio C Hamano
When a branch moves A to B while the other branch created B (or moved C to B), the code tried to rename one of them to B~something to preserve both versions, and failed to register temporary resolution for the original path B at stage#0 during virtual ancestor computation. This left the index in unmerged state and caused a segfault. A better solution is to merge these two versions of B's in place and use the (potentially conflicting) result as the intermediate merge result in the virtual ancestor. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-30git-checkout: be careful about untracked symlinksLinus Torvalds
This fixes the case where an untracked symlink that points at a directory with tracked paths confuses the checkout logic, demostrated in t6035. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-30lstat_cache: guard against full match of length of 'name' parameterKjetil Barvik
longest_path_match() in symlinks.c does exactly what it's name says, but in some cases that match can be too long, since the has_*_leading_path() functions assumes that the match will newer be as long as the name string given to the function. fix this by adding an extra if test which checks if the match length is equal to the 'len' parameter. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-30Demonstrate bugs when a directory is replaced with a symlinkPickens, James E
This test creates two directories, a/b and a/b-2, then replaces a/b with a symlink to a/b-2, then merges that change into the 'baseline' commit, which contains an unrelated change. There are two bugs: 1. 'git checkout' incorrectly deletes work tree file a/b-2/d. 2. 'git merge' incorrectly deletes work tree file a/b-2/d. The test goes on to create another branch in which a/b-2 is replaced with a symlink to a/b (i.e., the reverse of what was done the first time), and merge it into the 'baseline' commit. There is a different bug: 3. The merge should be clean, but git reports a conflict. Signed-off-by: James Pickens <james.e.pickens@intel.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-29Merge branch 'hv/cvsps-tests'Junio C Hamano
* hv/cvsps-tests: t/t9600: remove exit after test_done cvsimport: extend testcase about patchset order to contain branches cvsimport: add test illustrating a bug in cvsps Add a test of "git cvsimport"'s handling of tags and branches Add some tests of git-cvsimport's handling of vendor branches Test contents of entire cvsimported "master" tree contents Use CVS's -f option if available (ignore user's ~/.cvsrc file) Start a library for cvsimport-related tests
2009-07-29Add a reminder test case for a merge with F/D transitionAlex Riesen
The problem is that if a file was replaced with a directory containing another file with the same content and mode, an attempt to merge it with a branch descended from a commit before this F->D transition will cause merge-recursive to break. It breaks even if there were no conflicting changes on that other branch. Originally reported by Anders Melchiorsen. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-26t9143: do not fail if Compress::Zlib is missingEric Wong
"git svn gc" will not compress unhandled.log files if Compress::Zlib is missing. However, leftover index files should always be removed, so add a test for this behavior as well. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-26Merge branch 'gp/maint-rebase-p-onto'Junio C Hamano
* gp/maint-rebase-p-onto: Fix rebase -p --onto
2009-07-26Merge branch 'en/fast-export'Junio C Hamano
* en/fast-export: fast-export: Document the fact that git-rev-list arguments are accepted Add new fast-export testcases fast-export: Add a --tag-of-filtered-object option for newly dangling tags fast-export: Do parent rewriting to avoid dropping relevant commits fast-export: Make sure we show actual ref names instead of "(null)" fast-export: Omit tags that tag trees fast-export: Set revs.topo_order before calling setup_revisions
2009-07-25t9142: stop httpd after the testEric Wong
Otherwise it would fail in subsequent runs if the same SVN_HTTPD_PORT was used. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: the branch command no longer needs the full pathEric Wong
This was introduced in 0b2af457a49e3b00d47d556d5301934d27909db8 ("Fix branch detection when repository root is inaccessible") but reintroduced in the previous commit. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: revert default behavior for --minimize-urlEric Wong
This reverts the --minimize-url behavior change that appeared recently in commit 0b2af457a49e3b00d47d556d5301934d27909db8 ("Fix branch detection when repository root is inaccessible"). However, we now allow the option to be turned off by allowing "--no-minimize-url" so people with limited-access setups can still take advantage of the fix in 0b2af457a49e3b00d47d556d5301934d27909db8. Also document the behavior and default settings of minimize-url in the manpage for the first time. This introduces a temporary UI regression to allow t9141 to pass that will be reverted (fixed) in the next commit. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: add gc commandRobert Allan Zeh
Add a git svn gc command that gzips all unhandled.log files, and removes all index files under .git/svn. Signed-off-by: Robert Allan Zeh <robert.a.zeh@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git init: optionally allow a directory argumentNanako Shiraishi
When starting a new repository, I see my students often say % git init newrepo and curse git. They could say % mkdir newrepo; cd newrepo; git init but allowing it as an obvious short-cut may be nicer. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-25Merge branch 'maint'Junio C Hamano
* maint: t8005: Nobody writes Russian in shift_jis Conflicts: t/t8005-blame-i18n.sh
2009-07-25t8005: Nobody writes Russian in shift_jisJunio C Hamano
The second and third tests of this script expected that Russian strings are converted between ISO-8859-5 and Shift_JIS in the "blame --porcelain" format output correctly. Sure, many platforms may convert between such a combination, but that is only because one of the base character set of Shift_JIS, JIS X 0208, defines codepoints for Russian characters (among others); I do not think anybody uses Shift_JIS when seriously writing Russian, and it is perfectly understandable if iconv() libraries on some platforms fail converting between this combination, as it does not matter in reality. This patch changes the test to verify Japanese strings are converted correctly between EUC-JP and Shift_JIS in the same procedure. The point of the test is not about verifying the platform's iconv() library, but to see if "git blame" makes correct iconv() library calls when it should. We could instead use ISO-8859-5 and KOI8-R as the combination, because they are both meant to represent Russian, in order to make this test meaningful on more platforms, but we already use Shift_JIS vs EUC-JP combinations to test other programs in our test suite, so this combination is safer from the point of view of the portability. Besides, I do not read nor write Russian; sorry ;-) This change allows tests to pass on my (friend's) Solaris 5.11 box. Signed-off-by: Junio C Hamano <gitster@pobox.com>