diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-25 16:11:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-25 16:18:55 -0400 |
commit | 1f73db3469e29448bcb1520893de11b23da6fb1f (patch) | |
tree | b16fe0b9552818d16067e7cbb7c3403b73fe5e94 /Locations.hs | |
parent | b49c0c2633d662a7c91a609aec74f95f189129ad (diff) |
improve alwayscommit=false mode
Now changes are staged into the branch's index, but not committed,
which avoids growing a large journal. And sync and merge always
explicitly commit, ensuring that even when they do nothing else,
they commit the staged changes.
Added a flag file to indicate that the branch's journal contains
uncommitted changes. (Could use git ls-files, but don't want to run
that every time.)
In the future, this ability to have uncommitted changes staged in the
journal might be used on remotes after a series of oneshot commands.
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Locations.hs b/Locations.hs index 03d6deb1d..244388e0e 100644 --- a/Locations.hs +++ b/Locations.hs @@ -22,6 +22,7 @@ module Locations ( gitAnnexJournalLock, gitAnnexIndex, gitAnnexIndexLock, + gitAnnexIndexDirty, gitAnnexSshDir, isLinkToAnnex, annexHashes, @@ -143,6 +144,10 @@ gitAnnexIndex r = gitAnnexDir r </> "index" gitAnnexIndexLock :: Git.Repo -> FilePath gitAnnexIndexLock r = gitAnnexDir r </> "index.lck" +{- Flag file for .git/annex/index. -} +gitAnnexIndexDirty :: Git.Repo -> FilePath +gitAnnexIndexDirty r = gitAnnexDir r </> "index.dirty" + {- .git/annex/ssh/ is used for ssh connection caching -} gitAnnexSshDir :: Git.Repo -> FilePath gitAnnexSshDir r = addTrailingPathSeparator $ gitAnnexDir r </> "ssh" |