ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli
Yuya Nishihara 899c6375a0 git_backend: don't fully canonicalize .git symlink
Apparently, libgit2 doesn't deduce "core.bare" config from the directory name,
but gitoxide implements it correctly. So we shouldn't blindly canonicalize
the Git repository path. Fortunately, the saved git_target path isn't a fully-
canonicalized form (unless user explicitly sepcified "--git-repo ./.git"), so
we don't need a hack to remap git_target back to the symlink path.

is_colocated_git_workspace() is adjusted since the git_workdir is no longer
resolved from the fully-canonicalized repo path, at least in our code. Still we
have the ".git/.." fallback because test_init_git_colocated_symlink_gitlink()
would otherwise fail. I haven't figured out why, and the test might be actually
wrong compared to the git CLI behavior, but let's not change that for now.

Fixes #2668
2023-12-05 14:23:59 -08:00
..
examples gc: implement basic GC for Git backend 2023-12-03 07:40:12 -08:00
src git_backend: don't fully canonicalize .git symlink 2023-12-05 14:23:59 -08:00
testing fake_diff_editor: Allow specifying extra arguments to be ignored 2023-08-21 20:19:15 -07:00
tests git_backend: don't fully canonicalize .git symlink 2023-12-05 14:23:59 -08:00
build.rs
Cargo.toml cargo: sort dependencies list alphabetically 2023-11-07 23:46:05 +09:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00