adjust unlocked execute bit handling
When building an adjusted unlocked branch, make pointer files executable when the annex object file is executable. This slows down git-annex adjust --unlock/--unlock-present by needing to stat all annex object files in the tree. Probably not a significant slowdown compared to other work they do, but I have not benchmarked. I chose to leave git-annex adjust --unlock marked as stable, even though get or drop of an object file can change whether it would make the pointer file executable. Partly because making it unstable would slow down re-adjustment, and partly for symmetry with the handling of an unlocked pointer file that is executable when the content is dropped, which does not remove its execute bit.
This commit is contained in:
parent
1bb819f597
commit
3318d25c65
5 changed files with 40 additions and 3 deletions
|
@ -34,3 +34,5 @@ annex.alwayscommit = false.
|
|||
|
||||
PS: git-annex is so solid that this is the first data-related issue I've
|
||||
ever seen. Kudos!
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
|
@ -37,4 +37,11 @@ than stat.
|
|||
|
||||
Overall, I think this is probably worth doing, just to be symmetric with
|
||||
`git-annex unlock`.
|
||||
|
||||
There's also an argument that, if I have a large executable (LLM models
|
||||
come to mind for some ungodly reason), and I annex it and enter an adjusted
|
||||
branch, I should still be able to run it. Although it's really better to
|
||||
add it unlocked in the first place, since then you're tracking the execute
|
||||
bit in git permanantly and not relying on best-effort execute bit
|
||||
preservation when copying objects around.
|
||||
"""]]
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 2"""
|
||||
date="2024-05-28T16:27:10Z"
|
||||
content="""
|
||||
If the object file is executable at `git-annex unlock` time, the pointer
|
||||
file is made executable. If the object is then dropped, the pointer file
|
||||
remains executable.
|
||||
|
||||
So shouldn't it be the case for symmetry that `git-annex adjust --unlock`
|
||||
should make the pointer file executable, and a drop followed by re-doing
|
||||
the same adjustment should leave the pointer file executable? That would
|
||||
argue for leaving it stable.
|
||||
|
||||
I don't think there's a perfect solution to that question, both behaviors
|
||||
seem perhaps wanted at different times. But since leaving it stable avoids
|
||||
extra work, I'm leaning toward that.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue