Commits
- Commit:
41f13ea5f1c5014b2868a2d6165f377fb3df8ce1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix build with PROFILE=1
- Commit:
ca6fcbdce0110845f1195d2d1f5a14ed52a45baf
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
patience: make it easy to switch impls for mark_unique
- Commit:
926387ed74169349bdfa40445192f2b23d815244
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
fix myers_divide max-effort cut, wrong x for backwards coordinate
- Commit:
40fa9110668d1077088748f2be2bf9d5d9813b86
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
add test019 showing max-effort bug
- Commit:
f579bf773398809ee97341a20c91eadd918bc1ad
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
debug output fixes
- fix compilation error with DEBUG 1, after moving patience state out of
diff_atom, and after renaming diff_data.d to diff_data.root.
- add some missing newlines.
- also debug "HIT" on a max-effort cut, like when finding a mid snake, which
eases finding all the places where boxes get cut.
- Commit:
ca85e8bc8fc561d9c93cf1c7d59b4ac8a25f94c1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix off-by-one in the off-by-one fix made in bdfcb086
- Commit:
f486745273f4d3c8f6b15d7041d7ab5b3e58b071
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
don't require both + and - chunks in diff_chunk_context_load_change()
- Commit:
bdfcb0869a9b731044cf3b1acc797a805dd8eed9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix off-by-one access beyond mapped file in diff_data_atomize_text_lines_mmap()
Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000013992a89eca in diff_data_atomize_text_lines_mmap (d=0x13b9b455668) \
at /home/stsp/src/got/got/../lib/diff_atomize_text.c:134
134 if (line_end[0] == '\r'
(gdb) p pos
$1 = (const uint8_t *) 0x13be402006d ""
(gdb) p end
$2 = (const uint8_t *) 0x13be4023000 <error: Cannot access memory at \
address 0x13be4023000>
(gdb) p end-1
$3 = (const uint8_t *) 0x13be4022fff ""
(gdb) p line_end
$4 = (const uint8_t *) 0x13be4023000 <error: Cannot access memory at \
address 0x13be4023000>
- Commit:
e6435d8f03f5310b07425d7d0acee7f0b8f52d8c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
search for prototypes above, not at, the first line touched by the diff chunk
- Commit:
13e2caa3edcc68a62e29b4d5503254cd5bf80b2b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add support for showing function prototypes in unidiff hunk headers
- 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