Commits
- Commit:
123481a5f49c26d4316bfac1b8f5599384e17d11
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
fix patience iteration error; also makes dramatically faster
- Commit:
49307efefc236997dc103c7749064d68b089c88f
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
debug: patience: mark unique debug
- Commit:
74ad6a6944bd0588c940347378cc2b713a89ec95
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
diff_atom_cmp: no special case for ignore whitespace when both atoms empty
- Commit:
8b6ce5317fdcb3b74ddbd460aee729f039fe9aa7
- From:
- Neels Hofmeyr <neels@hofmeyr.de>
- Date:
debug fix: missing space
- Commit:
8be88dfa934d602d1cf29ba3e33162511f08b748
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
cache kd_buf in struct diff_state to avoid repeated allocation + free
- 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