1 // write a merge message file 2 auto repo = initRepo(_userRepo, OpenBare.yes); 3 scope(exit) rmdirRecurse(_userRepo); 4 5 string msgPath = buildPath(repo.path, "MERGE_MSG"); 6 string msg = "merge this"; 7 std.file.write(msgPath, msg); 8 9 assert(repo.mergeMsg == msg); 10 11 // verify removal of merge message 12 repo.cleanupMerge(); 13 assert(repo.mergeMsg is null); 14 15 // verify throwing when removing file which doesn't exist 16 assertThrown!GitException(repo.removeMergeMsg());
Remove all the metadata associated with an ongoing git merge, including MERGE_HEAD, MERGE_MSG, etc.