summaryrefslogtreecommitdiff
path: root/Branch.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Branch.hs')
-rw-r--r--Branch.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Branch.hs b/Branch.hs
index a43ee227b..00f406135 100644
--- a/Branch.hs
+++ b/Branch.hs
@@ -164,6 +164,8 @@ updateRef ref
| ref == fullname = return Nothing
| otherwise = do
g <- Annex.gitRepo
+ -- checking with log to see if there have been changes
+ -- is less expensive than always merging
diffs <- liftIO $ Git.pipeRead g [
Param "log",
Param (name++".."++ref),
@@ -176,6 +178,12 @@ updateRef ref
-- By passing only one ref, it is actually
-- merged into the index, preserving any
-- changes that may already be staged.
+ --
+ -- However, any changes in the git-annex
+ -- branch that are *not* reflected in the
+ -- index will be removed. So, documentation
+ -- advises users not to directly modify the
+ -- branch.
liftIO $ GitUnionMerge.merge g [ref]
return $ Just ref