merge: Improve commit messages to mention what was merged.
This commit is contained in:
parent
fe4ad93e4a
commit
897bf938f6
2 changed files with 15 additions and 6 deletions
|
@ -120,8 +120,8 @@ commit message = whenM journalDirty $ lockJournal $ do
|
||||||
- journal into the index. Otherwise, any changes in the journal would
|
- journal into the index. Otherwise, any changes in the journal would
|
||||||
- later get staged, and might overwrite changes made during the merge.
|
- 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
|
- (It would be cleaner to handle the merge by updating the journal, not the
|
||||||
- index, with changes from the branches.
|
- index, with changes from the branches.)
|
||||||
-
|
-
|
||||||
- The index is always updated using a union merge, as that's the most
|
- 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
|
- efficient way to update it. However, if the branch can be
|
||||||
|
@ -136,10 +136,13 @@ update = onceonly $ do
|
||||||
let (refs, branches) = unzip c
|
let (refs, branches) = unzip c
|
||||||
unless (not dirty && null refs) $ withIndex $ lockJournal $ do
|
unless (not dirty && null refs) $ withIndex $ lockJournal $ do
|
||||||
when dirty stageJournalFiles
|
when dirty stageJournalFiles
|
||||||
unless (null branches) $ do
|
let merge_desc = if null branches
|
||||||
showSideAction $ "merging " ++
|
then "update"
|
||||||
(unwords $ map Git.refDescribe branches) ++
|
else "merging " ++
|
||||||
|
(unwords $ map Git.refDescribe branches) ++
|
||||||
" into " ++ name
|
" into " ++ name
|
||||||
|
unless (null branches) $ do
|
||||||
|
showSideAction merge_desc
|
||||||
{- Note: This merges the branches into the index.
|
{- Note: This merges the branches into the index.
|
||||||
- Any unstaged changes in the git-annex branch
|
- Any unstaged changes in the git-annex branch
|
||||||
- (if it's checked out) will be removed. So,
|
- (if it's checked out) will be removed. So,
|
||||||
|
@ -149,7 +152,7 @@ update = onceonly $ do
|
||||||
inRepo $ \g -> Git.UnionMerge.merge_index g branches
|
inRepo $ \g -> Git.UnionMerge.merge_index g branches
|
||||||
ff <- if dirty then return False else tryFastForwardTo refs
|
ff <- if dirty then return False else tryFastForwardTo refs
|
||||||
unless ff $ inRepo $
|
unless ff $ inRepo $
|
||||||
Git.commit "update" fullname (nub $ fullname:refs)
|
Git.commit merge_desc fullname (nub $ fullname:refs)
|
||||||
invalidateCache
|
invalidateCache
|
||||||
where
|
where
|
||||||
onceonly a = unlessM (branchUpdated <$> getState) $ do
|
onceonly a = unlessM (branchUpdated <$> getState) $ do
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -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
|
git-annex (3.20111111) unstable; urgency=low
|
||||||
|
|
||||||
* Handle a case where an annexed file is moved into a gitignored directory,
|
* Handle a case where an annexed file is moved into a gitignored directory,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue