// write a merge message file and verify it can be read auto repo = initRepo(_userRepo, OpenBare.yes); scope(exit) rmdirRecurse(_userRepo); string msgPath = buildPath(repo.path, "MERGE_MSG"); string msg = "merge this"; std.file.write(msgPath, msg); assert(repo.mergeMsg == msg); // verify removal of merge message repo.removeMergeMsg(); assert(repo.mergeMsg is null); // verify throwing when removing file which doesn't exist assertThrown!GitException(repo.removeMergeMsg());
Remove the merge message file for this repository. If the message file does not exist GitException is thrown. Use mergeMsgExists to check whether the merge message file exists.