lib


Log

Author Commit Date CI Message
Stefan Sperling f6d8c0ac 2020-11-09T16:04:18 fix replacing symlinks with files And add a test case which verifies that the inverse also works, i.e. a symlink being replaced with a regular file. problem reported and fix tested by jrick
Stefan Sperling 63df146d 2020-11-09T16:03:35 fix missing unlink(tmppath) in error cases of install_blob()
Stefan Sperling 2ac8aa02 2020-11-09T16:02:12 clear staged file type in file index entries whenever staged status is cleared
Stefan Sperling 727173c3 2020-11-06T00:20:05 initialize sb.st_mode after stat(2) failure in got_worktree_resolve_path()
Stefan Sperling 01740607 2020-11-04T20:18:53 avoid got_repo_map_path() in 'got blame' 'got blame' does not need access to the work tree. So far the work tree was completely hidden with unveil(). We must now expose the work tree while resolving the path, so unveil() calls are shuffled around slightly. Failing realpath() calls would mess with path resolution otherwise. There's a bug in got_worktree_resolve_path() where it failed to canonicalize a path constructed from a user-specified path that does not exist on disk. Note that this path falls into strncmp() a few lines down. I am fixing this by adding canonicalization. Generally, joining paths with asprintf() and comparing paths with strncmp() is fragile. A more general solution might be needed but I am leaving that for another day. ok naddy
Christian Weisgerber 3818e3c4 2020-11-01T16:28:46 convert all remaining instances of chmod(2) to fchmod(2) ok stsp
Sebastien marie 0843a4ce 2020-10-31T04:54:20 use fchmod(2) instead of chmod(2). it is less racy, and we just opened the descriptor. ok naddy@ stsp@
Stefan Sperling f8c47409 2020-10-28T15:52:46 fix permissions mode bits for fetched pack files; patch by Alisdair MacLeod
Stefan Sperling eef9542c 2020-10-22T20:37:50 preserve what was passed in if got_repo_map_path() can't figure out a path problem found by + ok naddy
Stefan Sperling 20b7abb3 2020-10-22T20:36:23 detect unknown repository format extensions (such as sha256 format) ok millert
Christian Weisgerber 62d463ca 2020-10-20T22:43:59 indentation fixes
Stefan Sperling 2513f20a 2020-10-20T21:09:01 plug memory leaks in error paths; found by naddy
Stefan Sperling 20a2ad1c 2020-10-20T21:09:01 use got_path_dirname() in schedule_for_deletion(); avoids const dirname(3) ok naddy
Stefan Sperling fddefe3b 2020-10-20T21:09:01 use got_path_dirname() in remove_ondisk_file(); avoids const dirname(3) ok naddy
Stefan Sperling f5375317 2020-10-20T21:09:01 use got_path_dirname() in install_blob() to avoid const dirname(3) ok naddy
Stefan Sperling f4994adc 2020-10-20T21:09:01 use got_path_dirname() in install_symlink() to avoid const dirname(3) ok naddy
Stefan Sperling ce031e9e 2020-10-20T21:09:01 use got_path_dirname() in is_bad_symlink_target() ok naddy
Stefan Sperling ed6b5030 2020-10-20T21:09:01 use got_path_dirname() in merge_blob() instead of assuming const dirname(3) ok naddy
Stefan Sperling 3524bbf9 2020-10-20T21:09:01 make merge_file() use got_path_dirname() instead of assuming const dirname(3) ok naddy
Stefan Sperling aedea96d 2020-10-20T21:09:01 adapt got_open_worktree to non-const dirname(3) ok naddy
Stefan Sperling 0c93d204 2020-10-20T21:09:00 tried_root in got_open_repo is not needed ok naddy
Stefan Sperling aff6eea4 2020-10-20T21:09:00 handle non-const dirname in got_repo_open() and plug a memory leak ok naddy
Stefan Sperling 9aceaadf 2020-10-20T21:09:00 properly skip to the end upon error in got_repo_open() ok naddy
Stefan Sperling 0c4004e3 2020-10-20T21:09:00 handle non-const dirname(3) in got_path_dirname() ok naddy
Stefan Sperling d34b633e 2020-10-19T23:14:59 use got_path_basename() in match_deleted_or_modified_ct() ok millert
Stefan Sperling 102b254e 2020-10-19T23:14:59 switch to got_path_basename() in alloc_added_blob_tree_entry() ok millert
Stefan Sperling 1233e6b6 2020-10-19T23:14:59 switch to got_path_basename in revert_file ok millert
Stefan Sperling 0a9483d0 2020-10-19T23:14:59 handle non-const basename in got_path_basename() ok millert
Stefan Sperling dbdd6209 2020-10-19T23:14:59 handle non-const basename in resolve_symlink() ok millert
Stefan Sperling 4a26d3f8 2020-10-07T22:37:48 fix a bug where 'got status' showed an unchanged empty file as changed
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 b8adfa55 2020-09-25T21:35:10 add "branch" keyword to got.conf which specifies a list of branches to fetch ok tracey
Stefan Sperling e03cc834 2020-09-24T16:47:06 handle failed connection attempts to git:// servers; patch by jrick
Stefan Sperling 66cb1a7f 2020-09-24T13:45:36 strip trailing slashes from repository path in got_fetch_parse_uri()
Stefan Sperling 0921e08f 2020-09-24T10:49:36 remove redundant leading slashes from repository path when parsing URIs
Stefan Sperling 5a17689a 2020-09-24T00:28:58 fix matching the object ID of the first object in a pack index An object ID which appears first in a pack index was wrongly ignored by got_packidx_match_id_str_prefix(). The result was a spurious "object not found" error when this object ID was passed on the command line. Reported by jrick on freenode who was lucky enough to this edge case!
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 a1c4175c 2020-09-22T00:42:02 there is no need to grab locks when opening refs in got_ref_delete()
Stefan Sperling 48cae60d 2020-09-22T00:03:02 make dangling symbolic references show up in 'got ref -l' Storing a resolved ID for each reference list item was a bad idea. This ID cannot be resolved if a symbolic references points to a reference which does not exist. Such symrefs were skipped by got ref -l as a result. Just let users of reference lists resolve the IDs as needed.
Stefan Sperling 2a104ff6 2020-09-21T23:37:54 make 'got ref -d' delete both loose and packed representations of the reference
Christian Weisgerber ebc5bf64 2020-09-19T19:26:16 add missing <sys/types.h> include ok stsp
Stefan Sperling 6c13dcd2 2020-09-18T18:24:09 send gitconfig imsg string values the same way as gotconfig ones are sent
Stefan Sperling 5874ea87 2020-09-18T17:58:10 follow-up to be96c417: Do not assume a \0 when receiving GOTCONFIG_STR_VAL.
Stefan Sperling a9705505 2020-09-18T17:51:30 allow NULL pointer argument for got_free_gotconfig()
Christian Weisgerber 23c57b28 2020-09-11T19:44:18 Stop including <sys/syslimits.h> directly. POSIX says the limits defined there are available from <limits.h>, which almost all affected source files already included anyway. ok millert stsp
Stefan Sperling 50b0790e 2020-09-11T17:04:57 add per-worktree got.conf(5) file in the .got directory; ok millert
Christian Weisgerber 0823ffc2 2020-09-10T20:44:40 use modern POSIX timestamp fields in struct stat ok stsp
Stefan Sperling 3168e5da 2020-09-10T00:10:55 zap trailing tabs
Stefan Sperling 257add31 2020-09-09T23:57:40 add got.conf(5) configuration file ok tracey
Christian Weisgerber 78fb0967 2020-09-09T21:41:22 use the POSIX standard endian functions and explicitly include <endian.h> ok stsp
Christian Weisgerber 81a12da5 2020-09-09T19:35:32 do not rely on <zlib.h> to pull in <unistd.h> ok stsp
Stefan Sperling ef744db3 2020-08-27T10:18:21 in got_object_commit_get_logmsg(), handle log messages which lack '\n' found by tracey's scan-build
Stefan Sperling d6b7d054 2020-08-27T10:06:18 exit the loop in got_privsep_recv_tree() upon error found while looking over tracey's scan-build results
Stefan Sperling fca1f6ad 2020-08-27T10:05:38 plug a memory leak in got_privsep_recv_tree() in error case found while looking over tracey's scan-build results
Stefan Sperling 766841c2 2020-08-13T19:12:57 add -s option to 'got remove' which deletes files in a particular status This makes it easy to deal with files that were deleted from disk by external tooling which modified the work tree. Such files are left in missing (!) status and can now be marked for deletion in bulk via 'got rm -s\! -R .' For consistency, modified (M) files can now be removed with 'got rm -s M' which implies 'got rm -f'. Prompted by feedback from krw@
Stefan Sperling f2b0a8b0 2020-07-31T12:54:34 fix committing file additions from a work tree with a path prefix New files were added under the wrong tree in the repository if the work tree has a path prefix. Fix this problem and catch it in the existing commit_with_path_prefix regression test.
Stefan Sperling 69d57f3d 2020-07-31T11:19:29 fix spurious 'got cherrypick' error with a path prefix and an empty tree If the work tree's path prefix does not exist in the first of the two trees, then 'got cherrypick' failed with "no such entry found in tree". But this is a legitimate situation, as shown in the new test added here. The first tree could be the empty tree, for example, which should result in 'got cherrypick' adding all files from the second tree instead of complaining about a non-existent path-prefix directory in the first tree.
Stefan Sperling b66cd6f3 2020-07-31T10:33:34 display more context info in "no such entry found in tree" error messages
Stefan Sperling b2118c49 2020-07-28T20:17:19 Add a 'got info' command which displays work tree meta-data. Remove the alias 'got in' for 'got init'. The 'in' alias was too close to either 'init' or 'info'. ok tracey, millert
Stefan Sperling aa9ad276 2020-07-25T09:17:55 fix use of uninitialized variable in got_fileindex_entry_update()
Stefan Sperling 559d127c 2020-07-23T15:07:52 errant tab found by tracey
Stefan Sperling 283102fc 2020-07-23T14:22:41 remove the symlink conflict header feature; it causes noise for little benefit
Stefan Sperling f9eec9d5 2020-07-23T14:22:40 rename get_symlink_status() to get_symlink_modification_status() for clarity
Stefan Sperling f179e66d 2020-07-23T14:22:40 use a shortcut in get_file_status() for detecting symlinks appearing on disk
Stefan Sperling fda8017d 2020-07-23T14:22:40 move deeply indented code from unstage_path() to a new unstage_hunks() helper
Stefan Sperling 36bf999c 2020-07-23T14:22:40 make 'got unstage -p' work with symlinks
Stefan Sperling aa092692 2020-07-23T14:22:40 initialize output parameter of got_object_blob_read_to_str(); found by ofree
Stefan Sperling dfe9fba0 2020-07-23T14:22:40 remove merge_blob() fallback from merge_symlink(); let callers handle this
Stefan Sperling 75f0a0fb 2020-07-23T14:22:39 stop reinstalling symlinks after commit; 'got update' can handle that
Stefan Sperling 35213c7c 2020-07-23T14:22:39 forbid bad symlinks; add -S option to 'got commit' and 'got stage' to allow them
Stefan Sperling 3c1ec782 2020-07-23T14:22:38 put checks for bad symlink target paths into a dedicated function
Stefan Sperling ea7786be 2020-07-23T14:22:38 make 'got unstage' work with symlinks
Stefan Sperling b7422a2f 2020-07-23T14:22:38 stop using realpath(3) to resolve a symlink target in install_symlink() We should not resolve a symlink target path recursively when installing a symlink in the work tree. We want to handle this symlink's target, not the end result of following a chain of symlinks in case such links already exist.
Stefan Sperling 369fd7e5 2020-07-23T14:22:38 add support for symlinks to 'got revert -p'
Stefan Sperling fa3cef63 2020-07-23T14:22:37 make 'got stage -p' work with symlinks
Stefan Sperling b448fd00 2020-07-23T14:22:37 fix wrong function name in an error message
Stefan Sperling 0aeb8099 2020-07-23T14:22:37 set a staged file type and handle it separately from the on-disk file type
Stefan Sperling c631b115 2020-07-23T14:22:36 make staging of symlinks work
Stefan Sperling cf34e6e7 2020-07-23T14:22:36 mark functions which are not exposed to other files as static
Stefan Sperling 4723f050 2020-07-23T14:22:36 more fixes for setting/getting file index entry filetype and permissions
Stefan Sperling 6131ab45 2020-07-23T14:22:36 remove pointless error checking in got_fileindex_entry_filetype_set()
Stefan Sperling 984c073d 2020-07-23T14:22:36 add getter/setter for staged file index entry filetype
Stefan Sperling f5f1f9c2 2020-07-23T14:22:35 handle on-disk file index entry filetypes properly
Stefan Sperling 1e0a3718 2020-07-23T14:22:35 reserve some file entry mode bits for a staged file type
Stefan Sperling 6e1eade5 2020-07-23T14:22:35 fix 'got revert' progress output for symlinks
Stefan Sperling 3b9f0f87 2020-07-23T14:22:35 handle additional symlink conflicts and report skipping of unversioned files
Stefan Sperling c90c8ce3 2020-07-23T14:22:35 preserve unversioned files when merging added symlinks
Stefan Sperling 65b05cec 2020-07-23T14:22:35 add an output argument to create_fileindex_entry() Avoids a pointless search of the file index in the case the caller needs to use the newly created file entry.
Stefan Sperling 2e1fa222 2020-07-23T14:22:34 give bad symlinks a dedicated file type in the file index
Stefan Sperling b88d214a 2020-07-23T14:22:34 use default file permissions when installing "bad" symlinks
Stefan Sperling ef8d6031 2020-07-23T14:22:34 keep file index entry permission bits clear for symlinks
Stefan Sperling 960094b4 2020-07-23T14:22:34 resolve an XXX remark in merge_file_cb()
Stefan Sperling d219f183 2020-07-23T14:22:34 test_cherrypick_symlink_conflicts forgot to run 'got add' on a file; fix this
Stefan Sperling e8863bdc 2020-07-23T14:22:33 add symlink support to 'got import'
Stefan Sperling 993e2a1b 2020-07-23T14:21:31 handle symlink deletion and symlink conflicts during 'got update'
Stefan Sperling 56d815a9 2020-07-23T14:21:31 We must null-terminate the result of readlink(3) in merge_symlink().
Stefan Sperling 11cc08c1 2020-07-23T14:21:31 handle symlink conflicts by installing a file that contains conflict markers
Stefan Sperling 526a746f 2020-07-23T14:21:31 handle newly added symlinks during 'got cherrypick'
Stefan Sperling 5a1fbc73 2020-07-23T14:21:30 make it possible to fix "bad" symlinks with ln -sfh + got commit + got update
Stefan Sperling bd6aa359 2020-07-23T14:21:30 convert bad symlinks to regular files during 'got commit'