summaryrefslogtreecommitdiff
path: root/Command/Adjust.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-05-13 14:04:22 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-05-13 14:04:22 -0400
commit527853c9d039a7fb60a0acd6057923cb610a116d (patch)
treede35b3e2d1fd6b78c527281700e8df4dd399846a /Command/Adjust.hs
parent316634a2063759c38ad611f57c73c6f6e1fd2a08 (diff)
adjust: If the adjusted branch already exists, avoid overwriting it, since it might contain changes that have not yet been propigated to the original branch.
Could not think of a foolproof way to detect if the old adjusted branch was just behind the current branch. It's possible that the user amended the adjusting commit at the head of the adjusted branch, for example. I decided to bail in this situation, instead of just entering the old branch, so that if git annex adjust succeeds the user is always in a *current* adjusted branch, not some old and out of date one. What could perhaps be done is enter the old branch and then update it. But that seems too magical; the user may have rebased master or something or may not want to propigate the changes from the old branch. Best to error out.
Diffstat (limited to 'Command/Adjust.hs')
-rw-r--r--Command/Adjust.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Command/Adjust.hs b/Command/Adjust.hs
index addc652db..8c62c144c 100644
--- a/Command/Adjust.hs
+++ b/Command/Adjust.hs
@@ -35,5 +35,4 @@ start :: Adjustment -> CommandStart
start adj = do
checkVersionSupported
showStart "adjust" ""
- enterAdjustedBranch adj
- next $ next $ return True
+ next $ next $ enterAdjustedBranch adj