1
0
Commit graph

12 Commits

Autor SHA1 Nachricht Datum
John Keeping
7552266aac ui-patch: match git-format-patch(1) output
Using (DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH) causes Git to emit a
"---" line between the commit message and the body of the patch, which
fixes a regression introduced in commit 455b598 (ui-patch.c: Use
log_tree_commit() to generate diffs, 2013-08-20), prior to which we
inserted the "---" line ourselves.

DIFF_FORMAT_SUMMARY is added so that we match the output of
git-format-patch(1) without the "-p" option.

Signed-off-by: John Keeping <john@keeping.me.uk>
2014-12-28 14:44:44 +01:00
John Keeping
ce8f490229 t0108: modernize style
* &&-chaining
* use test_cmp instead of cmp
* use strip_headers instead of knowing how many lines there will be

Signed-off-by: John Keeping <john@keeping.me.uk>
2014-12-28 14:43:51 +01:00
Lukas Fleischer
5a8862723f t0108: Add tests for revision ranges
Add tests to check whether generating multiple patches at once works.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
2013-08-26 21:03:53 +02:00
Lukas Fleischer
b5b1f0715a t0108: Compare output with git-format-patch(1)
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
2013-08-26 21:03:35 +02:00
Lukas Fleischer
840858594e ui-patch.c: Add additional newline after each patch
For consistency with git-format-patch(1).

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
2013-08-26 21:03:23 +02:00
Lukas Fleischer
370535fc70 t0108: Avoid unnecessary fork()
Use `git rev-list --max-parents=0 HEAD` instead of `git rev-list HEAD |
tail -1` to get the root commit. This works since Git 1.7.4.2.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
2013-08-26 21:01:11 +02:00
John Keeping
c95cc5ec56 tests: use Git's test framework
This allows tests to run in parallel as well as letting us use "prove"
or another TAP harness to run the tests.

Git's test framework requires Git to be fully built before letting any
tests run, so add a new target to the top-level Makefile which builds
all of Git instead of just libgit.a and make the "test" target depend on
that.

Signed-off-by: John Keeping <john@keeping.me.uk>
2013-04-08 22:27:11 +02:00
John Keeping
f9b801a174 tests: make whitespace consistent
Signed-off-by: John Keeping <john@keeping.me.uk>
2013-03-04 19:39:07 -05:00
John Keeping
392e07d28a tests: "grep -e" is not portable to all platforms
The "-e" option to grep is not needed unless specifying more than one
pattern, which we don't do.  Remove it to avoid restricting the tests on
platforms that do not have a grep that recognises "-e".

Signed-off-by: John Keeping <john@keeping.me.uk>
2013-03-04 19:38:44 -05:00
Ferry Huberts
f8492f79a3 tests: handle paths with whitespace
v2: incorporate remarks of Lukas

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2012-03-18 10:54:42 +00:00
Mark Lodato
c94414a4c8 t0108-patch: add 'tests_done' to end
Signed-off-by: Mark Lodato <lodatom@gmail.com>
2010-08-29 17:27:40 +02:00
Lars Hjemli
e01f1403b9 Fix segfault in patch view for root commit
The code for patch view assumed the current commit would always have a parent,
which made cgit segfault when that wasn't the case.

This fixes the bug and adds a test-script for patch view which includes a test
for the inital commit.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-03-17 23:51:47 +01:00