lib/object_create.c


Log

Author Commit Date CI Message
Stefan Sperling d7b5a0e8 2022-04-20T14:00:12 inline struct got_object_id in struct got_object_qid Saves us from doing a malloc/free call for every item on the list. ok op@
Stefan Sperling 72840534 2022-01-19T12:04:58 compress delta data from delta_cache directly into pack file
Stefan Sperling 8bd0cdad 2021-12-31T09:11:21 add O_CLOEXEC (close-on-exec) flag to open(2) calls suggested by millert ok thomas_adam
Stefan Sperling ed7cc4a8 2021-12-29T12:03:33 remove outdated comment
Stefan Sperling 5c02d2a5 2021-09-26T17:40:10 for portability, handle errno variations upon open(2) failure with O_NOFOLLOW Problem pointed out by naddy for FreeBSD -portable. Discussed with millert, thomas adam, and naddy.
Stefan Sperling f259c4c1 2021-09-24T19:55:02 add a 'got merge' command for creating merge commits Additional testing by Thomas Adam. ok tracey
Stefan Sperling 5345b4c7 2021-07-06T07:39:36 allow lockfiles to be used in cases where we have a dir_fd and a relative path
Christian Weisgerber dbdddfee 2021-06-23T20:48:35 switch from SIMPLEQ to equivalent STAILQ macros The singly-linked tail queue macros were added to OpenBSD 6.9 and are more widely available on other systems. ok stsp
Stefan Sperling 91b40e30 2021-05-21T20:20:28 add checksum support to got_deflate_to_file() This will eventually be used by 'gotadmin pack'. Checksum init and finalization will need to be done by the caller since many objects will be written out in compressed form while we are computing checksums across the entire pack file. ok millert, naddy
Stefan Sperling 08578a35 2021-01-22T11:05:05 make close(2) failure checks consistent; check 'close() == -1' everywhere ok millert, naddy
Stefan Sperling 56b63ca4 2021-01-22T11:04:47 make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere ok millert, naddy
Christian Weisgerber 3818e3c4 2020-11-01T16:28:46 convert all remaining instances of chmod(2) to fchmod(2) ok stsp
Christian Weisgerber 1367695b 2020-09-26T20:53:13 fix potential type mismatches between format specifiers and arguments Cast printf arguments of type time_t and off_t to long long to match the %lld format specifier on platforms where this might not be the case. In parse.y, switch the number variable to long long because all its interactions are with that type anyway. ok millert stsp
Stefan Sperling 0a22ca1a 2020-09-23T22:31:00 make 'got histedit' collapse folded add+delete operations into a no-op If a merged commit wants to delete a locally added file, and this locally added file matches the content which was deleted in the commit being merged, we can go ahead with the deletion because there is no risk of data loss. fixes the histedit problem reported by jrick on freenode
Stefan Sperling 2f63b34c 2020-07-23T14:21:30 restore 8k buffer size for hashing file contents in got_object_blob_create()
Stefan Sperling 3d9a4ec4 2020-07-23T14:21:30 add symlink support to 'got commit'
Stefan Sperling 7aadece8 2020-05-17T08:23:19 allow creation of commits which carry unmodified submodule tree entries along approach suggested by ori@ and matches how git9 behaves ok semarie@ (who can now work with Rust-related Git repos containing submodules)
Stefan Sperling aaffadfc 2020-05-05T15:26:11 write directory tree entry mode bits in the same way as Git does
Stefan Sperling f7b97ccb 2020-04-14T11:37:39 normalize tree entry modes to 0100644 or 0100755 when writing tree objects semarie@ reported an error from go-git used by Cirrus CI: "57243613255d758e15b0f5ae1c960b970f0435f8: malformed mode (0100640)!" 'git fsck' has no problem with mode 0100640. But writing just the two most commonly used file modes should provide the best compatibility.
Stefan Sperling 2c98ee28 2019-11-29T04:35:09 NAME_MAX does not account for a terminating NUL
Stefan Sperling 56e0773d 2019-11-28T02:32:58 convert tree entries from SIMPLEQ to an array
Stefan Sperling 2575b0eb 2019-08-22T22:51:39 use correct label for author (aka tagger) info when writing tag objects
Stefan Sperling 8e7bd50a 2019-08-22T22:20:56 initial implementation of 'got tag' command
Stefan Sperling dd4a6547 2019-08-17T10:17:49 plug memory leak in sort_tree_entries_the_way_git_likes_it()
Stefan Sperling 6af1ccbd 2019-08-16T13:16:50 sort tree object entries the way git likes it
Stefan Sperling 3ce1b845 2019-07-14T18:59:53 initial 'got import' implementation
Stefan Sperling 10796104 2019-07-12T01:36:02 unsigned char casts for isspace()
Stefan Sperling 787c8eb6 2019-07-11T22:40:44 fix extra whitespace in rebased log messages Trim leading and trailing whitespace from log messages when creating commits. Fixes a rebase issue but should be a good idea in general.
Stefan Sperling 638f9024 2019-05-13T12:40:57 rename got_error_prefix_errno() to got_error_from_errno()
joshua stein 656b1f76 2019-05-11T14:26:12 while (1) -> for (;;)
joshua stein 230a42bd 2019-05-11T13:04:38 got_error_from_errno -> got_error_prefix_errno also add got_error_prefix_errno2 and got_error_prefix_errno3 which should hopefully all be merged into a single function with variadic args (but can't alloc mem)
Stefan Sperling 324d37e7 2019-05-11T09:14:30 make got path APIs available to library consumers
Stefan Sperling 51c32763 2019-05-07T20:58:58 fix bogus sha1 calculation in got_object_tree_create()
Stefan Sperling de18fc63 2019-05-08T18:37:37 write commit objects
Stefan Sperling 76f564d5 2019-04-14T13:01:53 rename create_loose_object() to create_object_file()
Stefan Sperling 4be2a0b4 2019-04-14T12:56:58 eliminate extra memcpy in got_object_{blob,tree}_create()
Stefan Sperling f91abf81 2019-04-14T12:52:43 introduce got_object_tree_create()
Stefan Sperling c6f826b4 2019-04-13T18:08:40 better variable names in create_loose_object()
Stefan Sperling ac1c5662 2019-04-13T18:05:41 move code for creating loose objects to a separate function
Stefan Sperling 51130c02 2019-04-13T16:29:24 create blob's parent dir if missing in got_object_blob_create()
Stefan Sperling f970685c 2019-04-13T16:11:37 flip order of arguments to got_object_blob_create()
Stefan Sperling f488e73c 2019-04-11T22:01:15 fix objpath memleak in got_object_blob_create()
Stefan Sperling 81984c6b 2019-04-11T21:59:42 blob content file doesn't need a path in got_object_blob_create()
Stefan Sperling ffb286fd 2019-04-11T21:54:38 store header length in variable in got_object_blob_create()
Stefan Sperling f16c2465 2019-04-11T21:53:11 don't forget to write header in got_object_blob_create()
Stefan Sperling a14a8cf6 2019-04-11T21:51:15 eliminate unnecessary fdopen() in got_object_blob_create()
Stefan Sperling 45d61019 2019-04-11T14:34:48 avoid double file close in got_object_blob_create()
Stefan Sperling 44edeea7 2019-04-11T14:32:01 introduce got_object_blob_create()