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-06-03blame: correctly handle a path that used to be a directoryJunio C Hamano
When trying to see if the same path exists in the parent, we ran "diff-tree" with pathspec set to the path we are interested in with the parent, and expect either to have exactly one resulting filepair (either "changed from the parent", "created when there was none") or nothing (when there is no change from the parent). If the path used to be a directory, however, we will also see unbounded number of entries that talk about the files that used to exist underneath the directory in question. Correctly pick only the entry that describes the path we are interested in in such a case (namely, the creation of the path as a regular file). Noticed by Ben Willard. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-02Merge branch 'cb/maint-1.6.0-xdl-merge-fix' into maintJunio C Hamano
* cb/maint-1.6.0-xdl-merge-fix: Change xdl_merge to generate output even for null merges t6023: merge-file fails to output anything for a degenerate merge Conflicts: xdiff/xmerge.c
2009-06-02Merge branch 'rs/maint-grep-word-regexp-fix' into maintJunio C Hamano
* rs/maint-grep-word-regexp-fix: grep: fix colouring of matches with zero length grep: fix word-regexp at the beginning of lines
2009-06-02Merge branch 'sb/maint-1.6.2-opt-filename-fix' into maintJunio C Hamano
* sb/maint-1.6.2-opt-filename-fix: apply, fmt-merge-msg: use relative filenames commit: -F overrides -t
2009-06-02Merge branch 'jc/maint-add-p-coalesce-fix' into maintJunio C Hamano
* jc/maint-add-p-coalesce-fix: t3701: ensure correctly set up repository after skipped tests Revert "git-add--interactive: remove hunk coalescing" Splitting a hunk that adds a line at the top fails in "add -p"
2009-05-28fix segfault showing an empty remoteClemens Buchacher
In case of an empty list, the search for its tail caused a NULL-pointer dereference. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Reported-by: Erik Faye-Lund <kusmabite@googlemail.com> Acked-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-26Merge branch 'jm/format-patch-no-auto-n-when-k-is-given' into maintJunio C Hamano
* jm/format-patch-no-auto-n-when-k-is-given: format-patch let -k override a config-specified format.numbered
2009-05-26Merge branch 'do/maint-merge-recursive-fix' into maintJunio C Hamano
* do/maint-merge-recursive-fix: merge-recursive: never leave index unmerged while recursing
2009-05-25t3701: ensure correctly set up repository after skipped testsJohannes Sixt
There are two tests that are skipped if file modes are not obeyed by the file system. In this case, the subsequent test failed because the repository was in an unexpected state. This corrects it. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Change xdl_merge to generate output even for null mergesCharles Bailey
xdl_merge used to have a check to ensure that there was at least some change in one or other side being merged but this suppressed output for the degenerate case when base, local and remote contents were all identical. Removing this check enables correct output in the degenerate case and xdl_free_script handles freeing NULL scripts so there is no need to have the check for these calls. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25t6023: merge-file fails to output anything for a degenerate mergeCharles Bailey
In the case that merge-file is passed three files with identical contents it wipes the contents of the output file instead of leaving it unchanged. Althought merge-file is porcelain and this will never happen in normal usage, it is still wrong. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24grep: fix word-regexp at the beginning of linesRené Scharfe
After bol is forwarded, it doesn't represent the beginning of the line any more. This means that the beginning-of-line marker (^) mustn't match, i.e. the regex flag REG_NOTBOL needs to be set. This bug was introduced by fb62eb7fab97cea880ea7fe4f341a4dfad14ab48 ("grep -w: forward to next possible position after rejected match"). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24apply, fmt-merge-msg: use relative filenamesStephen Boyd
Commit dbd0f5c7 (Files given on the command line are relative to $cwd, 2008-08-06) only fixed git-commit and git-tag. But, git-apply and git-fmt-merge-msg didn't get the update and exhibit the same behavior. Fix them and add tests for "apply --build-fake-ancestor" and "fmt-merge-msg -F". Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-24commit: -F overrides -tStephen Boyd
Commit dbd0f5c7 (Files given on the command line are relative to $cwd, 2008-08-06) introduced parse_options_fix_filename() as a quick fix for filename arguments used in the parse options API. git-commit was still broken. This means git commit -F log -t temp in a subdirectory would make git think the log message should be taken from temp instead of log. This is because parse_options_fix_filename() calls prefix_filename() which uses a single static char buffer to do its work. Making two calls with two char pointers causes the pointers to alias. To prevent aliasing, we duplicate the string returned by parse_options_fix_filename(). Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-17test: checkout shouldn't say that HEAD has moved if it didn'tNanako Shiraishi
Signed-off-by: しらいしななこ <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-17Revert "git-add--interactive: remove hunk coalescing"Junio C Hamano
This reverts commit 0beee4c6dec15292415e3d56075c16a76a22af54 but with a bit of twist, as we have added "edit hunk manually" hack and we cannot rely on the original line numbers of the hunks that were manually edited. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-17Splitting a hunk that adds a line at the top fails in "add -p"Matt Graham
Splitting a hunk into two in add -p doesn't work for a diff that adds a new line at the top of the file with other add in the same hunk. Signed-off-by: Matthew Graham <mdg149@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-16tests: Add tests for missing format-patch long optionsStephen Boyd
Exercise format-patch's --signoff, --in-reply-to and --start-number long options. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-12Merge branch 'maint-1.6.2' into maintJunio C Hamano
* maint-1.6.2: Revert "checkout branch: prime cache-tree fully"
2009-05-12Merge branch 'jc/maint-read-tree-multi' into maint-1.6.2Junio C Hamano
* jc/maint-read-tree-multi: Revert "checkout branch: prime cache-tree fully"
2009-05-12Revert "checkout branch: prime cache-tree fully"Junio C Hamano
The logic in 83ae209 (checkout branch: prime cache-tree fully, 2009-04-20) is bogus; checkout can switch branches with a dirty index and in such a case the tree won't match HEAD. Add t2014-switch to catch this breakage. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-10merge-recursive: never leave index unmerged while recursingDave Olszewski
When you are trying to come up with the final result (i.e. depth=0), you want to record how the conflict arose by registering the state of the common ancestor, your branch and the other branch in the index, hence you want to do update_stages(). When you are merging with positive depth, that is because of a criss-cross merge situation. In such a case, you would need to record the tentative result, with conflict markers and all, as if the merge went cleanly, even if there are conflicts, in order to write it out as a tree object later to be used as a common ancestor tree. update_file() calls update_file_flags() with update_cache=1 to signal that the result needs to be written to the index at stage #0 (i.e. merged), and the code should not clobber the index further by calling update_stages(). The codepath to deal with rename/delete conflict in a recursive merge however left the index unmerged. Signed-off-by: Dave Olszewski <cxreg@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09format-patch let -k override a config-specified format.numberedJim Meyering
Let a command-line --keep-subject (-k) override a config-specified format.numbered (--numbered (-n)), rather than provoking the "-n and -k are mutually exclusive" failure. * t4021-format-patch-numbered.sh: Test for the above Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-07t4029: use sh instead of bashNguyễ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-05-07t4200: convert sed expression which operates on non-text file to perlBrandon Casey
POSIX only requires sed to work on text files and MERGE_RR is not a text file. Some versions of sed complain that this file is not newline terminated, and exit non-zero. Use perl instead which does not have a problem with it. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-07t4200: remove two unnecessary linesBrandon Casey
These two lines appear to be unnecessary. They set variables which are not used afterwards. The primary motivation to remove them is that the sed invocation exits non-zero for seds which require newline termination of input files. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-06t/annotate-tests.sh: avoid passing a non-newline terminated file to sedBrandon Casey
Some versions of sed exit non-zero if the file they are supplied is not newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed. So rework this test to avoid doing so. This affects tests t8001-annotate.sh and t8002-blame.sh. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-06t4118: avoid sed invocation on file without terminating newlineBrandon Casey
Some versions of sed exit non-zero if the file they are supplied is not newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed. In this case the sed invocation can be avoided entirely since the resulting file is equivalent to a previously created file. So, just copy that file into place instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-06t4118: add missing '&&'Brandon Casey
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-06t8005: use egrep when extended regular expressions are requiredBrandon Casey
Not all versions of grep understand backslashed extended regular expressions. Possibly only gnu grep does. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-06Merge branch 'maint'Junio C Hamano
* maint: improve error message in config.c t4018-diff-funcname: add cpp xfuncname pattern to syntax test Work around BSD whose typeof(tv.tv_sec) != time_t git-am.txt: reword extra headers in message body git-am.txt: Use date or value instead of time or timestamp git-am.txt: add an 'a', say what 'it' is, simplify a sentence dir.c: Fix two minor grammatical errors in comments git-svn: fix a sloppy Getopt::Long usage
2009-05-06t4018-diff-funcname: add cpp xfuncname pattern to syntax testBrandon Casey
Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-04Merge branch 'mk/maint-apply-swap' into maintJunio C Hamano
* mk/maint-apply-swap: tests: make test-apply-criss-cross-rename more robust builtin-apply: keep information about files to be deleted tests: test applying criss-cross rename patch
2009-04-30Merge branch 'maint'Junio C Hamano
* maint: diff -c -p: do not die on submodules Conflicts: combine-diff.c
2009-04-30merge-recursive: do not die on a conflicting submoduleJunio C Hamano
We cannot represent the 3-way conflicted state in the work tree for these entries, but it is normal not to have commit objects for them in our repository. Just update the index and the life will be good. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-30Merge branch 'maint-1.6.1' into maintJunio C Hamano
* maint-1.6.1: diff -c -p: do not die on submodules
2009-04-30Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano
* maint-1.6.0: diff -c -p: do not die on submodules
2009-04-29diff -c -p: do not die on submodulesJunio C Hamano
The combine diff logic knew only about blobs (and their checked-out form in the work tree, either regular files or symlinks), and barfed when fed submodules. This "externalizes" gitlinks in the same way as the normal patch generation codepath does (i.e. "Subproject commit Xxx\n") to fix the issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-28Merge branch 'maint'Junio C Hamano
* maint: grep: fix segfault when "git grep '('" is given Documentation: fix a grammatical error in api-builtin.txt builtin-merge: fix a typo in an error message
2009-04-28Merge branch 'maint-1.6.1' into maintJunio C Hamano
* maint-1.6.1: grep: fix segfault when "git grep '('" is given Documentation: fix a grammatical error in api-builtin.txt builtin-merge: fix a typo in an error message
2009-04-28Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano
* maint-1.6.0: grep: fix segfault when "git grep '('" is given Documentation: fix a grammatical error in api-builtin.txt builtin-merge: fix a typo in an error message
2009-04-28grep: fix segfault when "git grep '('" is givenLinus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-28t5701: do not get stuck in empty-push/Johannes Schindelin
A test might happen to be the last one in the script, but other people later may want to add more tests after your test is done. Do not surprise them by going in a subdirectory to run a part of your test and never coming out of it. This fixes a162e78 in that respect. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-27t4202: fix typov1.6.3-rc3Linus Torvalds
While I did a make -j64 test > ~/t.out to check my previous patch (in case some test actually tested 'trustctime' or something), I noticed this one. Somebody has speeling trouble: t4202-log.sh: line 345: test_expect_sucess: command not found Fixed thus. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-25t7700-repack: repack -a now works properly, expect success from testBrandon Casey
Since the recent rework of the object listing mechanism of pack-objects/rev-list, git-repack now properly packs objects from alternate repositories even when the local repository contains packs. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-25t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'Brandon Casey
The '--no-thread' option is a Getopt::Long boolean option. The '--no-' prefix (as in --no-thread) for boolean options is not supported in Getopt::Long version 2.32 which was released with Perl 5.8.0. This version only supports '--no' as in '--nothread'. More recent versions of Getopt::Long, such as version 2.34, support either prefix. So use the older form in the tests. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-24t7800: respect NO_PERLJeff King
Difftool is written in perl, so we don't build it if NO_PERL is set. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-23graph API: fix a bug in the rendering of octopus mergesAllan Caffee
An off by one error was causing octopus merges with 3 parents to not be rendered correctly. This regression was introduced by 427fc5. Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-23t4202-log: extend test coverage of graphingAllan Caffee
Extend this test to cover the rendering of graphs with octopus merges and pre_commit lines. Signed-off-by: Allan Caffee <allan.caffee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-21test-lib.sh: Help test_create_repo() find the templates dirMichael J Gruber
Currently, test_create_repo() expects that templates can be found below `pwd`/.. This assumption fails when tests are run against a git installed somewhere else or test_create_repo() is called from subdirectiories (several tests do this). Therefore, use $TEST_DIRECTORY as introduced in 2d84e9fb and expect templates to be present in $TEST_DIRECTORY/.. which should be the root dir of the git checkout. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>