Commits
- Commit:
5ed6e4d2a7519005ddb8c8b7f47a02f6085df3fe
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
don't hex-escape non-printable ASCII in diff_output_lines(); UTF-8 must pass
- Commit:
b229234e62efcc9119fc7b321ca1e3846d678b12
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix missing allocaion failure check in diff_algo_patience()
- Commit:
7187fe972091ffb934d90ab11967d006868f8d7c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add diff_chunk_context_load_change() for use with diff_output_unidiff_chunk()
- Commit:
2f26640c77e9b4d1a303b6c3c7776ff75ad51111
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
revert db941c24; callers would also need private structs for that idea to work
- Commit:
66ea8e5adfb496de581ba4b78479f3258692ee9e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
avoid printing the --- +++ diff header in diff_output_unidiff_chunk()
- Commit:
37f62f5d4e914963adfbf2085f5fd9294d79b497
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix another format string issue in results_test.c
Cast ARRAYLIST_IDX result to unsigned long and use %lu in the format string.
Clang 10.0.1 complained as follows:
results_test.c:148:9: warning: format specifies type 'int' but the
argument has type 'long' [-Wformat]
ARRAYLIST_IDX(c, result->chunks),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Commit:
6fc23bd07d48a9fe01f057ca64e870cd8ebd6025
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix a format string issue in results_test.c
Use explicit casts to long long and use %lld in the format string.
Clang 10.0.1 complained as follows:
results_test.c:78:9: warning: format specifies type 'int' but the
argument has type 'long long' [-Wformat]
c->left_start ? c->left_start->pos : -1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Commit:
cdaa991d59b6083bab30f1bd86345f57717a5670
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix a format string issue in array test
ARRAYLIST_IDX deals with the head pointer. Explicitly cast to unsigned long
and use %lu in the format string.
Clang 10.0.1 used to complain as follows:
arraylist_test.c:19:2: warning: format specifies type 'int' but the
argument has type 'long' [-Wformat]
arraylist_test.c:15:24: note: expanded from macro 'dump'
printf("[%d] %d\n", ARRAYLIST_IDX(p, list), *p); \
~~ ^~~~~~~~~~~~~~~~~~~~~~
- Commit:
db941c245fd5f7b8e8ca2f9b6ebaf0c3dcecda48
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
put functions required for using diff_output_unidiff_chunk() into public API
They will be needed to implement 'got stage -p' and 'got revert -p', etc.
Chunks stored in diff_result still need post-processing in order to be
displayed as expected by diff_output_unidiff_chunk().
Exposing these functions allows API consumers to implement the same chunk
merging loop as used internally by output_unidiff() and output_edscript().
(Perhaps, ideally, the public diff API would provide pre-merged chunks at
some point in the future? Then this commit could probably be reverted.)
Change return values from bool to int to avoid making stdbool.h a requirement
for the public diff API.
- Commit:
cbf93b702bb81f143354b53125c64579a5040fcc
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
expose chunk_context_empty() via diff_internal.h and use it in edscript output
- Commit:
12c5bde7b2b0371050910b2446b9aaad5fc44573
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use mergesort(3) instead of qsort(3) in patience diff
Fixes test failures on OpenBSD due to unstable results of qsort if
two or more elements are equal.
Add a compat copy of OpenBSD mergesort(3) for Linux.
- Commit:
f087e96869b35f67db93f1a9a3df95d0dc9da883
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
check for allocation failure in diff_atoms_mark_unique_in_both_by_qsort()
- Commit:
34570dbeba22613374809c75a8ed2f119db01ec5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
initialize to NULL instead of ""; allows pointer check to see if file is mapped
- Commit:
40dba3d841ef97bc452f734f6945dff48bc2f925
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
revert 1ea185225fc4897fdfbe0043837b43ddab3f1449 which caused an infinite loop
- Commit:
1b3c539b2dd85be56e0b40125774b3d621db6351
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
atoms are stored in an array, not a list; use direct indexing instead of loop
- Commit:
1ea185225fc4897fdfbe0043837b43ddab3f1449
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix a segfault: d->data may point to "", this cannot be checked for NULL
- Commit:
7021523c6d7788c452572f0b48f0dcba23199dac
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
print "\ No newline at end of file" message like UNIX diff(1) does
Not adding new tests since this behaviour is covered by tests in Got.
- Commit:
26595c7df947f97507904fa391034b6a52bfca7d
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
in ed output mode, show changed lines as XXcYY etc. as UNIX diff(1) does
- Commit:
227cd87e537c560f428629cf170b0f19422b1c56
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
wrap a comment that had overlong lines
- Commit:
70fb5a47142d240e33700b734a57433248225624
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
diff_myers: fix some uninitialized warnings
- Commit:
65688edf4c58356b6a78c043dae1a4832532b84f
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
patience: fix uninitialized rc in diff_atoms_qsort_compar
- Commit:
2c12b171fbb19e2b5423c046fbb9cb86b60632eb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add -Wuninitialized to CFLAGS on Linux build; exposes some bugs already
- Commit:
99193dbfc9c01d4924eae992a6819d0bb998f2c8
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
add test for -T option
This uncovered a bug in diff_algo_none(), so let's keep it.
- Commit:
6c8c5d3f0b6b2ba6c23acd67179fd37e8f2af66b
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
move patience data out of struct diff_atom
Now allocating patience specific data only when patience is going to be used.
This may allow using forward-Myers more often, since the state size per line is
significantly smaller.
Patience instead allocates an array, puts it in the current diff_data, and also
place a pointer of the current diff_data in the root diff_data (since each atom
points to the root diff_data).
- Commit:
c8846eb959c22c43dd5f8d9193b7e0c83c31b8af
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
add patience tests