diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-04-14 14:30:15 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-04-14 14:47:08 -0400 |
commit | 8f2cde77f63fe873341554192b1c7df71cc8bdc1 (patch) | |
tree | c3858d3491fce3732db2e6abacb91df1dd552b0e /Assistant/Threads | |
parent | 1835f915174e9fdf5aa73372efa80e4330b528f2 (diff) |
Preserve execute bits of unlocked files in v6 mode.
When annex.thin is set, adding an object will add the execute bits to the
work tree file, and this does mean that the annex object file ends up
executable.
This doesn't add any complexity that wasn't already present, because git
annex add of an executable file has always ingested it so that the annex
object ends up executable.
But, since an annex object file can be executable or not, when populating
an unlocked file from one, the executable bit is always added or removed
to match the mode of the pointer file.
Diffstat (limited to 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/Committer.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 070699cb2..d35bd79a2 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -378,7 +378,9 @@ handleAdds havelsof delayadd cs = returnWhen (null incomplete) $ do done change mcache file key = liftAnnex $ do logStatus key InfoPresent ifM versionSupportsUnlockedPointers - ( stagePointerFile file =<< hashPointerFile key + ( do + mode <- liftIO $ catchMaybeIO $ fileMode <$> getFileStatus file + stagePointerFile file mode =<< hashPointerFile key , do link <- ifM isDirect ( calcRepo $ gitAnnexLink file key |