git-remote-annex: mostly implemented pushing
Full pushing will probably work, but is untested. Incremental pushing is not implemented yet. While a fairly straightforward port of the shell prototype, the details of exactly how to get the objects to the remote were tricky. And the prototype did not consider how to deal with partial failures and interruptions. I've taken considerable care to make sure it always leaves things in a consistent state when interrupted or when it loses access to a remote in the middle of a push. Sponsored-by: Leon Schuermann on Patreon
This commit is contained in:
parent
797f27ab05
commit
f2d17cf154
3 changed files with 254 additions and 14 deletions
|
@ -23,3 +23,16 @@ listHeads bundle repo = map gen . S8.lines <$>
|
|||
|
||||
unbundle :: FilePath -> Repo -> IO ()
|
||||
unbundle bundle = runQuiet [Param "bundle", Param "unbundle", File bundle]
|
||||
|
||||
create :: FilePath -> [Ref] -> Repo -> IO ()
|
||||
create bundle refs repo = pipeWrite
|
||||
[ Param "bundle"
|
||||
, Param "create"
|
||||
, Param "--quiet"
|
||||
, File bundle
|
||||
, Param "--stdin"
|
||||
] repo writerefs
|
||||
where
|
||||
writerefs h = do
|
||||
mapM_ (S8.hPutStrLn h . fromRef') refs
|
||||
hClose h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue