1
0
mirror of https://github.com/git/git.git synced 2024-09-28 04:10:41 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Jonathan Nieder
a48fcd8369 tests: add missing &&
Breaks in a test assertion's && chain can potentially hide
failures from earlier commands in the chain.

Commands intended to fail should be marked with !, test_must_fail, or
test_might_fail.  The examples in this patch do not require that.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-09 11:59:49 -08:00
Brian Gernhardt
25641fcdb0 t7610: cd inside subshell instead of around
Instead of using `cd dir && (...) && cd..` use `(cd dir && ...)`

This ensures that the test doesn't get caught in the subdirectory if
there is an error in the subshell.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-24 09:33:09 -07:00
David Aguilar
bb0a484e98 mergetool: Skip autoresolved paths
When mergetool is run without path limiters it loops
over each entry in 'git ls-files -u'.  This includes
autoresolved paths.

Teach mergetool to only merge files listed in 'rerere status'
when rerere is enabled.

There are some subtle but harmless changes in behavior.
We now call cd_to_toplevel when no paths are given.
We do this because 'rerere status' paths are always relative
to the root.  This is beneficial for the non-rerere use as
well in that mergetool now runs against all unmerged files
regardless of the current directory.

This also slightly tweaks the output when run without paths
to be more readable.

The old output:

Merging the files: foo
bar
baz

The new output:

Merging:
foo
bar
baz

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-17 13:58:13 -07:00
Charles Bailey
ff4a18552a mergetool: fix running mergetool in sub-directories
The previous fix to mergetool to use checkout-index instead of cat-file
broke running mergetool anywhere except the root of the repository.

This fixes it by using the correct relative paths for temporary files
and index paths.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-31 10:28:33 -08:00
Charles Bailey
b9b5078ece mergetool: Add a test for running mergetool in a sub-directory
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-31 10:18:33 -08:00
Charles Bailey
0ec7b6c26d mergetool: respect autocrlf by using checkout-index
Previously, git mergetool used cat-file which does not perform git to
worktree conversion. This changes mergetool to use git checkout-index
instead which means that the temporary files used for mergetool use the
correct line endings for the platform.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-27 01:13:19 -08:00
Nanako Shiraishi
47a528ad24 tests: use "git xyzzy" form (t7200 - t9001)
Converts tests between t7201-t9001.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-03 14:51:48 -07:00
Stephan Beyer
d492b31caf t/: Use "test_must_fail git" instead of "! git"
This patch changes every occurrence of "! git" -- with the meaning
that a git call has to gracefully fail -- into "test_must_fail git".

This is useful to

 - make sure the test does not fail because of a signal,
   e.g. SIGSEGV, and

 - advertise the use of "test_must_fail" for new tests.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-13 13:21:26 -07:00
Junio C Hamano
2b2828b452 Fix executable bits in t/ scripts
Pointed out by Ramsay Jones.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04 01:38:41 -07:00
Charles Bailey
05e934bb9f Add a very basic test script for git mergetool
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 12:07:04 -08:00