Commit Graph

878 Commits

Author SHA1 Message Date
Kovid Goyal
4f72bb9894 Replace utils.Once with stdlib sync.OnceValue 2023-08-09 12:08:42 +05:30
Kovid Goyal
49ea26968c Bump go version to 1.21
Allows us to use the much faster builtin min/max functions
for two variable min/max
2023-08-09 11:58:16 +05:30
Kovid Goyal
696ef40e38 Remove already done TODO note 2023-08-08 21:20:16 +05:30
Kovid Goyal
f8b8f68e38 Make wait_for_write_complete more robust
It now actually waits for the expected sentinel id even when there are
no pending writes
2023-08-08 17:17:51 +05:30
Kovid Goyal
8bf5b92cd6 Merge branch 'master-1' of https://github.com/hezhizhen/kitty 2023-08-08 16:47:27 +05:30
Zhizhen He
47e130c4c0 Fix typo 2023-08-08 16:39:00 +08:00
Kovid Goyal
0e87e0c7de Work on refactoring send kitten to fix various issues 2023-08-08 06:28:43 +05:30
Kovid Goyal
0971e8c630 strings.Title works better than cases.Title 2023-08-07 21:49:50 +05:30
Kovid Goyal
04febb20d5 ... 2023-08-07 15:45:46 +05:30
Kovid Goyal
bd68dc75f3 simplify code 2023-08-07 12:57:01 +05:30
Kovid Goyal
2a5a89e01c Speed up write performance to loop
20x speed for large numbers of queued writes by avoiding pinging between
the writer and main goroutines
2023-08-05 13:53:32 +05:30
Kovid Goyal
a3369465dc Remove unused code 2023-08-05 10:11:15 +05:30
Kovid Goyal
ec77d051df Replace another deprecated function 2023-08-04 23:02:55 +05:30
Kovid Goyal
341d845b9a Port calls to slices.Sort functions since they now need a cmp() function rather than a less() function
Also rename os.SEEK_* to io.Seek* as the former has been deprecated
2023-08-04 22:50:13 +05:30
Kovid Goyal
ffd997c338 Detect prompt lines in code blocks 2023-07-30 19:49:47 +05:30
Kovid Goyal
ce593dbb5f lp.Println() should act live fmt.Println()
also use a dedicated error type for signalining perm denied
2023-07-30 19:49:47 +05:30
Kovid Goyal
a55a918d4f Improve stack trace formatting 2023-07-30 19:49:47 +05:30
Kovid Goyal
2cae0ab695 Dont wait for cancel response when user denies permission 2023-07-30 19:49:46 +05:30
Kovid Goyal
ca485cc0f7 Make getting function name a utility function 2023-07-30 19:49:46 +05:30
Kovid Goyal
5881041fcd Ensure shortduration is no more than 8 chars 2023-07-30 19:49:46 +05:30
Kovid Goyal
b60d15fe75 Make short duration formatter re-useable 2023-07-30 19:49:46 +05:30
Kovid Goyal
4d686b2f47 Nicer string repr for operations 2023-07-30 19:49:46 +05:30
Kovid Goyal
d0490672e1 Fix block range coalescing not working in algorithm.c 2023-07-30 19:49:46 +05:30
Kovid Goyal
aff7f19580 DRYer 2023-07-30 19:49:46 +05:30
Kovid Goyal
b3819d3226 Ensure output.Write is not called outside of the stream decompressor function 2023-07-30 19:49:45 +05:30
Kovid Goyal
301f309444 ... 2023-07-30 19:49:45 +05:30
Kovid Goyal
42c9f30618 Change receive code to use new streaming decomp infra 2023-07-30 19:49:45 +05:30
Kovid Goyal
b4d8eaa0fe ... 2023-07-30 19:49:45 +05:30
Kovid Goyal
a210e0c977 Simplify stream decompressor 2023-07-30 19:49:45 +05:30
Kovid Goyal
c8f35019f0 Fix debugprintln to forwarded stdio implementation 2023-07-30 19:49:45 +05:30
Kovid Goyal
d46590c2e6 Fix fd leak in debugprintln 2023-07-30 19:49:45 +05:30
Kovid Goyal
6b5520f07a More work on porting the receive kitten 2023-07-30 19:49:45 +05:30
Kovid Goyal
3d5fdad029 More work on porting receive kitten 2023-07-30 19:49:44 +05:30
Kovid Goyal
73ee5b32c9 A better way to wrap go's zlib into a streaming decompressor 2023-07-30 19:49:44 +05:30
Kovid Goyal
59b47a3a8f A facility to easily have child programs print to kitty stdout
Works better than the kitty-print DCS escape code as that tends to get
interleaved with other writes to the tty since the loop infrastructure
writes in a separate I/O thread.
2023-07-30 19:49:44 +05:30
Kovid Goyal
063c39ea12 Wire up the rsync code in the send kitten 2023-07-30 19:49:43 +05:30
Kovid Goyal
edc1669ced Ported tests all pass 2023-07-30 19:49:43 +05:30
Kovid Goyal
b5498090df Finish the port of the rsync algorithm to C 2023-07-30 19:49:43 +05:30
Kovid Goyal
c84874ca8d Add tests for the xxhash based hashers 2023-07-30 19:49:42 +05:30
Kovid Goyal
08e3dbb8e7 Patcher signature generation implemented 2023-07-30 19:49:42 +05:30
Kovid Goyal
fabb6bd8cc Start work on porting Go rsync implementation to C 2023-07-30 19:49:42 +05:30
Kovid Goyal
85df15bfc3 Add a test that the last op is hash 2023-07-30 19:49:42 +05:30
Kovid Goyal
f64c4f34ac Also use io.Writer for signature iterator 2023-07-30 19:49:42 +05:30
Kovid Goyal
4b5216adcf Change delta creation API to use io.Writer
Simplifies logic and avoids an extra copy if the writer doesnt need to
make its own copy
2023-07-30 19:49:41 +05:30
Kovid Goyal
94b5bedfa5 Add overall file checksum verification to the rsync protocol 2023-07-30 19:49:41 +05:30
Kovid Goyal
e125f803b3 Work on adding overall checksum support 2023-07-30 19:49:41 +05:30
Kovid Goyal
039e17840a Allow users to customize buffer growth strategy 2023-07-30 19:49:41 +05:30
Kovid Goyal
c2ad662bed Use the append paradigm for the delta iterator as well 2023-07-30 19:49:41 +05:30
Kovid Goyal
579ab8551e Add some API docs 2023-07-30 19:49:41 +05:30
Kovid Goyal
77d5fe1be5 Change signature generation API to allow caller to provide storage and control iteration 2023-07-30 19:49:41 +05:30