Revert "multiple -m"
This reverts commit cee12f6a2f
.
This commit broke git-annex init run in a repo that was cloned from a
repo with an adjusted branch checked out.
The problem is that findAdjustingCommit was not able to identify the
commit that created the adjusted branch. It seems that there is an extra
"\n" at the end of the commit message that it does not expect.
Since backwards compatability needs to be maintained, cannot just make
findAdjustingCommit accept it with the "\n". Will have to instead
have one commitTree variant that uses the old method, and use it for
adjusted branch committing.
This commit is contained in:
parent
2b0df3a76d
commit
a8dd85ea5a
15 changed files with 41 additions and 57 deletions
|
@ -469,7 +469,7 @@ commitAdjustedTree' treesha (BasisBranch basis) parents =
|
|||
(commitCommitterMetaData basiscommit)
|
||||
(mkcommit cmode)
|
||||
mkcommit cmode = Git.Branch.commitTree cmode
|
||||
[adjustedBranchCommitMessage] parents treesha
|
||||
adjustedBranchCommitMessage parents treesha
|
||||
|
||||
{- This message should never be changed. -}
|
||||
adjustedBranchCommitMessage :: String
|
||||
|
@ -577,7 +577,7 @@ reverseAdjustedCommit commitparent adj (csha, basiscommit) origbranch
|
|||
(commitAuthorMetaData basiscommit)
|
||||
(commitCommitterMetaData basiscommit) $
|
||||
Git.Branch.commitTree cmode
|
||||
[commitMessage basiscommit]
|
||||
(commitMessage basiscommit)
|
||||
[commitparent] treesha
|
||||
return (Right revadjcommit)
|
||||
|
||||
|
|
|
@ -153,8 +153,7 @@ mergeToAdjustedBranch tomerge (origbranch, adj) mergeconfig canresolvemerge comm
|
|||
then do
|
||||
cmode <- annexCommitMode <$> Annex.getGitConfig
|
||||
c <- inRepo $ Git.Branch.commitTree cmode
|
||||
["Merged " ++ fromRef tomerge]
|
||||
[adjmergecommit]
|
||||
("Merged " ++ fromRef tomerge) [adjmergecommit]
|
||||
(commitTree currentcommit)
|
||||
inRepo $ Git.Branch.update "updating adjusted branch" currbranch c
|
||||
propigateAdjustedCommits origbranch adj
|
||||
|
|
|
@ -945,9 +945,9 @@ rememberTreeishLocked treeish graftpoint jl = do
|
|||
addedt <- inRepo $ Git.Tree.graftTree treeish graftpoint origtree
|
||||
cmode <- annexCommitMode <$> Annex.getGitConfig
|
||||
c <- inRepo $ Git.Branch.commitTree cmode
|
||||
["graft"] [branchref] addedt
|
||||
"graft" [branchref] addedt
|
||||
c' <- inRepo $ Git.Branch.commitTree cmode
|
||||
["graft cleanup"] [c] origtree
|
||||
"graft cleanup" [c] origtree
|
||||
inRepo $ Git.Branch.update' fullname c'
|
||||
-- The tree in c' is the same as the tree in branchref,
|
||||
-- and the index was updated to that above, so it's safe to
|
||||
|
|
|
@ -86,7 +86,7 @@ data ImportCommitConfig = ImportCommitConfig
|
|||
{ importCommitTracking :: Maybe Sha
|
||||
-- ^ Current commit on the remote tracking branch.
|
||||
, importCommitMode :: Git.Branch.CommitMode
|
||||
, importCommitMessages :: [String]
|
||||
, importCommitMessage :: String
|
||||
}
|
||||
|
||||
{- Buils a commit for an import from a special remote.
|
||||
|
@ -251,7 +251,7 @@ buildImportCommit' remote importcommitconfig mtrackingcommit imported@(History t
|
|||
|
||||
mkcommit parents tree = inRepo $ Git.Branch.commitTree
|
||||
(importCommitMode importcommitconfig)
|
||||
(importCommitMessages importcommitconfig)
|
||||
(importCommitMessage importcommitconfig)
|
||||
parents
|
||||
tree
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ makeRemoteTrackingBranchMergeCommit' commitsha importedhistory treesha = do
|
|||
cmode <- annexCommitMode <$> Annex.getGitConfig
|
||||
inRepo $ Git.Branch.commitTree
|
||||
cmode
|
||||
["remote tracking branch"]
|
||||
"remote tracking branch"
|
||||
[commitsha, importedhistory]
|
||||
treesha
|
||||
|
||||
|
|
|
@ -577,7 +577,7 @@ updateView view madj = do
|
|||
cmode <- annexCommitMode <$> Annex.getGitConfig
|
||||
let msg = "updated " ++ fromRef (branchView view madj)
|
||||
let parent = catMaybes [oldcommit]
|
||||
inRepo (Git.Branch.commitTree cmode [msg] parent newtree)
|
||||
inRepo (Git.Branch.commitTree cmode msg parent newtree)
|
||||
else return Nothing
|
||||
|
||||
{- Diff between currently checked out branch and staged changes, and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue