lib/path.c


Log

Author Commit Date CI Message
Stefan Sperling c655fd93 2022-04-07T12:04:42 rename variables in got_path_strip() for clarity; ok op@
Omar Polo 9d6cabd5 2022-04-07T09:28:59 got patch: allow to strip path components Move some bits from the libexec helper to the main process so we know if the patch was generated by git or not and finally document the automatic stripping of a/ and b/ prefixes added by git-diff(1). ok stsp@
Stefan Sperling 0f71f619 2022-01-06T22:30:35 fix wrong path in a comment
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 41ad2652 2020-12-04T20:27:43 remove unused function got_path_get_absolute(); realpath(3) is usually better
Stefan Sperling 0c4004e3 2020-10-20T21:09:00 handle non-const dirname(3) in got_path_dirname() ok naddy
Stefan Sperling 0a9483d0 2020-10-19T23:14:59 handle non-const basename in got_path_basename() ok millert
Stefan Sperling 20ccae39 2020-07-21T14:19:32 cope with directory entries returned from readdir(3) with type DT_UNKNOWN Such directory entries need special handling to make our directory traversal code work on filesystems that do not support the d_type optimization. I found this problem because references stored in the refs/ directory were not shown by 'got log' and 'tog log' when a repository is mounted over NFS. helpful feedback + ok millert@
Stefan Sperling b8b3f209 2020-02-29T08:15:55 make got_path_is_root_dir() deal with an arbitrary amount of leading slashes
Stefan Sperling 63f810e6 2020-02-29T07:54:55 when "bad path" errors occur, always show the path in question
Theo Buehler 455de7fa 2020-01-12T19:41:31 Avoid out of bounds access if path is "/". From Martin <openbsd () academicsolutions ! ch> with tweaks by me. ok stsp
Stefan Sperling 5cade901 2019-09-22T10:34:44 fix error return in got_path_find_prog() (patch by Steven McDonald)
Stefan Sperling 718ef3e9 2019-08-11T20:15:17 simplify cleanup code paths in got_path_find_prog()
Stefan Sperling 202329ae 2019-08-11T20:11:56 fix some more occurrences of potential errno clobbering
Stefan Sperling 466d3b32 2019-08-02T16:18:38 remove redundant strlen() calls from got_path_cmp()
Stefan Sperling f2b16ada 2019-08-02T15:50:16 cache path length in struct got_pathlist_entry
Stefan Sperling d572f586 2019-08-02T15:42:42 eliminate strlen() calls during fileindex rb tree searches
Stefan Sperling adc19d55 2019-07-28T12:48:56 remove pointless output parameter from got_pathlist_append()
Stefan Sperling f2ea84fa 2019-07-27T14:26:10 make 'got update' accept mulitple path arguments
Stefan Sperling 72ea6654 2019-07-27T11:21:56 add support for multiple path arguments to 'got status'
Stefan Sperling 49aa539a 2019-07-22T10:41:16 remove got_path_normalize(); pointless and unused
Stefan Sperling 2c7829a4 2019-06-17T14:15:05 implement 'got init'
Stefan Sperling 08680430 2019-05-13T13:59:50 mention where code for got_path_find_prog() came from
Stefan Sperling 0ee7065d 2019-05-13T13:56:40 make 'got commit' look up EDITOR in PATH The previous code only worked if EDITOR contained an absolute path.
Stefan Sperling 638f9024 2019-05-13T12:40:57 rename got_error_prefix_errno() to got_error_from_errno()
Stefan Sperling 7f2a8dc2 2019-05-12T15:33:37 plug fd leak in got_path_dir_is_empty()
Stefan Sperling 280f921b 2019-05-12T15:30:43 heed API namespace: got_dir_is_empty -> got_path_dir_is_empty
joshua stein 3c45a30a 2019-05-12T14:56:24 checkout: if worktree path exists and is empty, suppress mkdir failure
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 72151b04 2019-05-11T09:37:08 introduce got_path_strip_trailing_slashes()
Stefan Sperling 324d37e7 2019-05-11T09:14:30 make got path APIs available to library consumers
Stefan Sperling eb4304b9 2019-05-08T12:16:03 fix problems with "/" in two path helper functions
Stefan Sperling a129376b 2019-03-29T00:04:52 add initial implementation of 'got revert'
Stefan Sperling 5e3ce57a 2019-03-26T09:00:13 return relative paths from got_path_skip_common_ancestor()
Stefan Sperling db5ba8ed 2019-03-26T08:59:56 init output argument of got_path_skip_common_ancestor()
Stefan Sperling d1667f0d 2019-03-11T20:22:28 introduce got_path_dirname()
Stefan Sperling 5e1c9f23 2019-03-11T20:13:26 fix dirname() usage errors around got_path_mkdir()
Stefan Sperling ddcd8544 2019-03-11T19:57:53 move worktree-specific error handling out of got_path_mkdir()
Stefan Sperling 0cd1c46a 2019-03-11T18:07:33 create references to base commits of got worktrees
Stefan Sperling 3d8df59c 2019-02-05T14:49:54 add a caller-provided data pointer to path list elements
Stefan Sperling 7e5c804b 2019-02-05T14:20:14 allow for detecting path duplicates with got_pathlist_insert()
Stefan Sperling e08cc72d 2019-02-05T14:12:38 add a pathlist API
Stefan Sperling 5d56da81 2019-01-13T17:15:53 happy new copyright year
Stefan Sperling 1beed999 2019-01-12T21:06:50 rename got_compare_paths to got_path_cmp
Stefan Sperling 8da9e5f4 2019-01-12T18:39:19 implement checkout+update as single-pass diff between file index and tree
Stefan Sperling e0159033 2019-01-08T22:32:42 generalize the pathset's path comparison function
Stefan Sperling 31cedeaf 2018-09-15T19:42:15 add path filtering support to commit graph
Stefan Sperling 04ca23f4 2018-07-16T13:05:23 allow filtering history by paths in 'got log'
Stefan Sperling f7d20e89 2018-06-17T11:55:08 make got_canonpath() return a got_error
Stefan Sperling e6eac3b8 2018-06-17T11:47:23 introduce got_canonpath()
Stefan Sperling ec798807 2018-06-17T11:37:43 remove unused and broken got_path_segment_count()
Stefan Sperling 511a516b 2018-05-19T16:57:12 move got_opentmp* functions to public API; used from tog
Stefan Sperling 80f4afe8 2018-04-24T11:47:09 introduce got_opentempfd()
Stefan Sperling 0a585a0d 2018-03-17T18:13:19 remove GOT_ERR_NO_MEM, we can just use errno in those cases
Stefan Sperling 718b3ab0 2018-03-17T17:50:48 rename the library-internal headers again to a common prefix
Stefan Sperling 25783624 2018-03-12T13:59:29 use stricter CPPFLAGS from mpi
Stefan Sperling 9d31a1d8 2018-03-11T20:39:31 initial implementation of worktree checkout
Stefan Sperling 32cb896c 2018-03-11T14:10:56 rename library-private headers from *_priv.h to *_lib.h
Stefan Sperling 1411938b 2018-02-12T23:25:38 rename private header filenames so they are in got_ namespace
Stefan Sperling 0465ef11 2018-01-13T12:28:07 unlink tempfiles again, was disabled for testing
Stefan Sperling a1fd68d8 2018-01-12T20:59:51 Extract non-deltified objects from pack files.
Stefan Sperling 4684ea10 2017-11-12T16:20:52 remove commented dead code
Stefan Sperling 92af5469 2017-11-05T14:15:47 do not require that got applications normalize paths
Stefan Sperling 7b19e0f1 2017-11-05T13:35:01 add copyright
Stefan Sperling 4027f31a 2017-11-04T19:41:54 initial import; current implementation only parses the .git/HEAD ref