diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-12 14:51:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-12 14:51:19 -0400 |
commit | 897bf938f687c1bd9fcfa0097b65708cf0891041 (patch) | |
tree | 48aac7bd070e05326748c3d4c0ba5960816e1bbe | |
parent | fe4ad93e4a82eabc2300705a8bfc59caaf4814b3 (diff) |
merge: Improve commit messages to mention what was merged.
-rw-r--r-- | Annex/Branch.hs | 15 | ||||
-rw-r--r-- | debian/changelog | 6 |
2 files changed, 15 insertions, 6 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index 05c89ed97..e86a3d7d1 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -120,8 +120,8 @@ commit message = whenM journalDirty $ lockJournal $ do - journal into the index. Otherwise, any changes in the journal would - later get staged, and might overwrite changes made during the merge. - - - It would be cleaner to handle the merge by updating the journal, not the - - index, with changes from the branches. + - (It would be cleaner to handle the merge by updating the journal, not the + - index, with changes from the branches.) - - The index is always updated using a union merge, as that's the most - efficient way to update it. However, if the branch can be @@ -136,10 +136,13 @@ update = onceonly $ do let (refs, branches) = unzip c unless (not dirty && null refs) $ withIndex $ lockJournal $ do when dirty stageJournalFiles - unless (null branches) $ do - showSideAction $ "merging " ++ - (unwords $ map Git.refDescribe branches) ++ + let merge_desc = if null branches + then "update" + else "merging " ++ + (unwords $ map Git.refDescribe branches) ++ " into " ++ name + unless (null branches) $ do + showSideAction merge_desc {- Note: This merges the branches into the index. - Any unstaged changes in the git-annex branch - (if it's checked out) will be removed. So, @@ -149,7 +152,7 @@ update = onceonly $ do inRepo $ \g -> Git.UnionMerge.merge_index g branches ff <- if dirty then return False else tryFastForwardTo refs unless ff $ inRepo $ - Git.commit "update" fullname (nub $ fullname:refs) + Git.commit merge_desc fullname (nub $ fullname:refs) invalidateCache where onceonly a = unlessM (branchUpdated <$> getState) $ do diff --git a/debian/changelog b/debian/changelog index 9c2de7b08..ff735a79d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-annex (3.20111112) UNRELEASED; urgency=low + + * merge: Improve commit messages to mention what was merged. + + -- Joey Hess <joeyh@debian.org> Sat, 12 Nov 2011 14:50:21 -0400 + git-annex (3.20111111) unstable; urgency=low * Handle a case where an annexed file is moved into a gitignored directory, |