|
60e40e95
|
2021-01-22T21:53:05
|
|
close file handles before freeing other things in got_worktree_close()
The work tree's path needs to be valid while constructing error messages.
|
|
e7abd6b6
|
2021-01-22T21:47:37
|
|
fix missing close(2) error check in got_worktree_close()
|
|
08578a35
|
2021-01-22T11:05:05
|
|
make close(2) failure checks consistent; check 'close() == -1' everywhere
ok millert, naddy
|
|
56b63ca4
|
2021-01-22T11:04:47
|
|
make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere
ok millert, naddy
|
|
a6b21eef
|
2021-01-21T19:10:08
|
|
add missing braces around multi-line if-statement in got_worktree_close()
|
|
a06ff56f
|
2021-01-21T18:33:50
|
|
fix a use after free()
ok jrick stsp
|
|
9bdd68dd
|
2021-01-02T20:46:01
|
|
replace fparseln(3) with getline(3), for better portability
ok stsp
|
|
a615e0e7
|
2020-12-16T00:08:58
|
|
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
|
|
437adc9d
|
2020-12-10T08:29:04
|
|
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
|
|
64453f7e
|
2020-11-21T13:35:00
|
|
handle binary files in got/tog diff commands; add -a options to force text
|
|
fe621944
|
2020-11-10T22:54:37
|
|
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.
|
|
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
|
|
63df146d
|
2020-11-09T16:03:35
|
|
fix missing unlink(tmppath) in error cases of install_blob()
|
|
2ac8aa02
|
2020-11-09T16:02:12
|
|
clear staged file type in file index entries whenever staged status is cleared
|
|
727173c3
|
2020-11-06T00:20:05
|
|
initialize sb.st_mode after stat(2) failure in got_worktree_resolve_path()
|
|
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
|
|
3818e3c4
|
2020-11-01T16:28:46
|
|
convert all remaining instances of chmod(2) to fchmod(2)
ok stsp
|
|
62d463ca
|
2020-10-20T22:43:59
|
|
indentation fixes
|
|
2513f20a
|
2020-10-20T21:09:01
|
|
plug memory leaks in error paths; found by naddy
|
|
20a2ad1c
|
2020-10-20T21:09:01
|
|
use got_path_dirname() in schedule_for_deletion(); avoids const dirname(3)
ok naddy
|
|
fddefe3b
|
2020-10-20T21:09:01
|
|
use got_path_dirname() in remove_ondisk_file(); avoids const dirname(3)
ok naddy
|
|
f5375317
|
2020-10-20T21:09:01
|
|
use got_path_dirname() in install_blob() to avoid const dirname(3)
ok naddy
|
|
f4994adc
|
2020-10-20T21:09:01
|
|
use got_path_dirname() in install_symlink() to avoid const dirname(3)
ok naddy
|
|
ce031e9e
|
2020-10-20T21:09:01
|
|
use got_path_dirname() in is_bad_symlink_target()
ok naddy
|
|
ed6b5030
|
2020-10-20T21:09:01
|
|
use got_path_dirname() in merge_blob() instead of assuming const dirname(3)
ok naddy
|
|
3524bbf9
|
2020-10-20T21:09:01
|
|
make merge_file() use got_path_dirname() instead of assuming const dirname(3)
ok naddy
|
|
aedea96d
|
2020-10-20T21:09:01
|
|
adapt got_open_worktree to non-const dirname(3)
ok naddy
|
|
d34b633e
|
2020-10-19T23:14:59
|
|
use got_path_basename() in match_deleted_or_modified_ct()
ok millert
|
|
102b254e
|
2020-10-19T23:14:59
|
|
switch to got_path_basename() in alloc_added_blob_tree_entry()
ok millert
|
|
1233e6b6
|
2020-10-19T23:14:59
|
|
switch to got_path_basename in revert_file
ok millert
|
|
4a26d3f8
|
2020-10-07T22:37:48
|
|
fix a bug where 'got status' showed an unchanged empty file as changed
|
|
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
|
|
50b0790e
|
2020-09-11T17:04:57
|
|
add per-worktree got.conf(5) file in the .got directory; ok millert
|
|
0823ffc2
|
2020-09-10T20:44:40
|
|
use modern POSIX timestamp fields in struct stat
ok stsp
|
|
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@
|
|
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.
|
|
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.
|
|
b66cd6f3
|
2020-07-31T10:33:34
|
|
display more context info in "no such entry found in tree" error messages
|
|
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
|
|
283102fc
|
2020-07-23T14:22:41
|
|
remove the symlink conflict header feature; it causes noise for little benefit
|
|
f9eec9d5
|
2020-07-23T14:22:40
|
|
rename get_symlink_status() to get_symlink_modification_status() for clarity
|
|
f179e66d
|
2020-07-23T14:22:40
|
|
use a shortcut in get_file_status() for detecting symlinks appearing on disk
|
|
fda8017d
|
2020-07-23T14:22:40
|
|
move deeply indented code from unstage_path() to a new unstage_hunks() helper
|
|
36bf999c
|
2020-07-23T14:22:40
|
|
make 'got unstage -p' work with symlinks
|
|
dfe9fba0
|
2020-07-23T14:22:40
|
|
remove merge_blob() fallback from merge_symlink(); let callers handle this
|
|
75f0a0fb
|
2020-07-23T14:22:39
|
|
stop reinstalling symlinks after commit; 'got update' can handle that
|
|
35213c7c
|
2020-07-23T14:22:39
|
|
forbid bad symlinks; add -S option to 'got commit' and 'got stage' to allow them
|
|
3c1ec782
|
2020-07-23T14:22:38
|
|
put checks for bad symlink target paths into a dedicated function
|
|
ea7786be
|
2020-07-23T14:22:38
|
|
make 'got unstage' work with symlinks
|
|
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.
|
|
369fd7e5
|
2020-07-23T14:22:38
|
|
add support for symlinks to 'got revert -p'
|
|
fa3cef63
|
2020-07-23T14:22:37
|
|
make 'got stage -p' work with symlinks
|
|
b448fd00
|
2020-07-23T14:22:37
|
|
fix wrong function name in an error message
|
|
0aeb8099
|
2020-07-23T14:22:37
|
|
set a staged file type and handle it separately from the on-disk file type
|
|
c631b115
|
2020-07-23T14:22:36
|
|
make staging of symlinks work
|
|
6131ab45
|
2020-07-23T14:22:36
|
|
remove pointless error checking in got_fileindex_entry_filetype_set()
|
|
6e1eade5
|
2020-07-23T14:22:35
|
|
fix 'got revert' progress output for symlinks
|
|
3b9f0f87
|
2020-07-23T14:22:35
|
|
handle additional symlink conflicts and report skipping of unversioned files
|
|
c90c8ce3
|
2020-07-23T14:22:35
|
|
preserve unversioned files when merging added symlinks
|
|
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.
|
|
2e1fa222
|
2020-07-23T14:22:34
|
|
give bad symlinks a dedicated file type in the file index
|
|
b88d214a
|
2020-07-23T14:22:34
|
|
use default file permissions when installing "bad" symlinks
|
|
960094b4
|
2020-07-23T14:22:34
|
|
resolve an XXX remark in merge_file_cb()
|
|
d219f183
|
2020-07-23T14:22:34
|
|
test_cherrypick_symlink_conflicts forgot to run 'got add' on a file; fix this
|
|
993e2a1b
|
2020-07-23T14:21:31
|
|
handle symlink deletion and symlink conflicts during 'got update'
|
|
56d815a9
|
2020-07-23T14:21:31
|
|
We must null-terminate the result of readlink(3) in merge_symlink().
|
|
11cc08c1
|
2020-07-23T14:21:31
|
|
handle symlink conflicts by installing a file that contains conflict markers
|
|
526a746f
|
2020-07-23T14:21:31
|
|
handle newly added symlinks during 'got cherrypick'
|
|
5a1fbc73
|
2020-07-23T14:21:30
|
|
make it possible to fix "bad" symlinks with ln -sfh + got commit + got update
|
|
bd6aa359
|
2020-07-23T14:21:30
|
|
convert bad symlinks to regular files during 'got commit'
|
|
3d9a4ec4
|
2020-07-23T14:21:30
|
|
add symlink support to 'got commit'
|
|
af57b12a
|
2020-07-23T14:21:30
|
|
add symlink support to 'got cherrypick'; test non-conflict cases only for now
|
|
7d61d891
|
2020-07-23T14:21:29
|
|
fix checkout of symlinks when a relative work tree path is given
|
|
906c123b
|
2020-07-23T14:21:29
|
|
do not allow symlinks pointing into the .got directory; noticed by semarie
|
|
b15bc87b
|
2020-07-23T14:21:29
|
|
fix memory leak in install_symlink() error path; spotted by semarie
|
|
ef68ca6f
|
2020-07-23T14:21:29
|
|
add missing dirname(3) error check; found by semarie
|
|
a919d5c4
|
2020-07-23T14:21:27
|
|
make 'got rm' work on symlinks; test case written by tracey
|
|
00bb5ea0
|
2020-07-23T14:21:27
|
|
make 'got add' work on symlinks and let 'got status' display them
|
|
f35fa46a
|
2020-07-23T14:21:27
|
|
add symlink support to 'got update'
|
|
0ab20ee9
|
2020-07-23T14:21:27
|
|
fix handling of symlinks to a nonexistent target
|
|
8ba819a3
|
2020-07-23T14:21:27
|
|
let 'got checkout' create symlinks in a work tree
|
|
3665fce0
|
2020-07-13T12:58:54
|
|
display affected file path in ERR_FILE_OBSTRUCTED error messages
|
|
b737c85a
|
2020-06-26T10:10:52
|
|
fix endless loop introduced in 3143d852; programming is hard!
|
|
3143d852
|
2020-06-25T06:53:54
|
|
fix ignores when a path is passed to 'got status'
Problem reported by semarie, who also provided initial regression test code.
ok semarie
|
|
054041d0
|
2020-06-24T17:15:00
|
|
replace the update_blob_fileindex_entry() helper function
This makes it easier to tell in which code paths we are expecting to handle
a potential 'ie' NULL pointer and avoids a pointless search of the file index.
|
|
5a58a424
|
2020-06-23T16:10:01
|
|
plug a memory leak in delete_blob()
|
|
5036ab18
|
2020-04-18T18:40:00
|
|
make 'got update' skip conflicted files
ok millert@
|
|
678ade17
|
2020-03-22T15:44:34
|
|
don't error out if rebase sees no merged paths; elide the commit instead
|
|
ba580f68
|
2020-03-22T15:08:33
|
|
prevent 'got commit' from comitting empty sub-directories; found by tracey
|
|
3969253a
|
2020-03-07T19:01:44
|
|
remove implicit entry update from got_fileindex_entry_alloc(); just alloc
|
|
15341bfd
|
2020-03-05T14:39:37
|
|
trim directories in got remove -R
This is a racy solution that needs to be properly implemented in the future.
ok stsp
|
|
de05890f
|
2020-03-05T10:53:53
|
|
fix histedit 'rebase commit ID mismatch' error when splitting a commit
Commit IDs on histedit's temporary branch can change arbitrarily because
the user may create new commits on this branch while editing past commits.
So there is no point in trying to verify these IDs like we do during rebase.
Add a test case which demonstrates the problem.
|
|
63f810e6
|
2020-02-29T07:54:55
|
|
when "bad path" errors occur, always show the path in question
|
|
3c24af98
|
2020-02-07T21:06:03
|
|
fix segfault in got backout which include deleted files
|
|
6201aef3
|
2020-02-02T09:20:56
|
|
ignore EROFS during checkout for repositories on read-only filesystems
|
|
a46b9f33
|
2020-01-28T12:09:03
|
|
fix a bug where 'got revert -R' failed on added subtrees
The command could fail with "got: no such entry found in tree".
This problem is reproduced by the regression test added in this commit.
This happened because file index entries were processed in the wrong
order by diff_fileindex_dir(). To fix this, keep removed entries in
the RB tree and skip them when the file index is written out, rather
than removing entries from the RB tree immediately causing side-effects
for RB_NEXT and friends.
|
|
867630bb
|
2020-01-17T11:54:27
|
|
Sleep for one nanosecond after syncing the file index to disk
Ensures that files modified after got exits have a different timestamp
from the one which was recorded in the file index.
Previously, 'got status' did not always detect such files as modified.
Problem reported by Steven McDonald.
|
|
bb51a5b4
|
2020-01-13T10:28:58
|
|
add -E option to 'got checkout' allowing use of a non-empty work tree path
needed by and ok kn@
|
|
5aa81393
|
2020-01-06T19:38:23
|
|
add copyright year for files already touched in 2020
|
|
e51d7b55
|
2020-01-04T08:35:17
|
|
prevent rebase with an out-of-date work tree
|