Commit Briefs

9bdd68dd5c Christian Weisgerber

replace fparseln(3) with getline(3), for better portability

ok stsp


a615e0e779 Stefan Sperling

implicitly mark all files in work tree as up-to-date after rebase/histedit

This should always be correct, since rebase and histedit start out with a clean and single-base-commit worktree, and end up committing all changes across the entire work tree when they are successful. tested by jrick and myself


437adc9d5b Yang Zhong

add fd field to got_worktree, modify got_fileindex_entry_update to use fds

These changes are intended to make got more compatible with FreeBSD's Capsicum. ok stsp



fe621944e8 Stefan Sperling

merge new diff implementation from the git.gameoftrees.org diff.git repository

This new diff implementation was started by Neels Hofmeyr during the u2k20 hackathon and now replaces diffreg.c code lifted from the OpenBSD base system. The integration of this code into Got was done by me. Got now uses the patience diff algorithm by default. The diff.git repository will remain the primary repository for the diff code, which already compiles and runs on other operating systems such as Linux. Any fixes and improvements for files inherited from the diff.git repository should be written against that repository and synced to got.git afterwards.


f6d8c0acba Stefan Sperling

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





017406073f Stefan Sperling

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


3818e3c42c Christian Weisgerber

convert all remaining instances of chmod(2) to fchmod(2)

ok stsp


62d463cac1 Christian Weisgerber

indentation fixes


2513f20abd Stefan Sperling

plug memory leaks in error paths; found by naddy


20a2ad1cd2 Stefan Sperling

use got_path_dirname() in schedule_for_deletion(); avoids const dirname(3)

ok naddy


fddefe3be5 Stefan Sperling

use got_path_dirname() in remove_ondisk_file(); avoids const dirname(3)

ok naddy


f5375317cb Stefan Sperling

use got_path_dirname() in install_blob() to avoid const dirname(3)

ok naddy


f4994adcb4 Stefan Sperling

use got_path_dirname() in install_symlink() to avoid const dirname(3)

ok naddy


ce031e9edb Stefan Sperling

use got_path_dirname() in is_bad_symlink_target()

ok naddy


ed6b5030fc Stefan Sperling

use got_path_dirname() in merge_blob() instead of assuming const dirname(3)

ok naddy


3524bbf95a Stefan Sperling

make merge_file() use got_path_dirname() instead of assuming const dirname(3)

ok naddy


aedea96d34 Stefan Sperling

adapt got_open_worktree to non-const dirname(3)

ok naddy


d34b633ebd Stefan Sperling

use got_path_basename() in match_deleted_or_modified_ct()

ok millert


102b254e20 Stefan Sperling

switch to got_path_basename() in alloc_added_blob_tree_entry()

ok millert


1233e6b671 Stefan Sperling

switch to got_path_basename in revert_file

ok millert