Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ffanyt authored Jan 27, 2023
1 parent 8e3fade commit 4c81a6b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion proj2/gitlet/Repository.java
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,10 @@ public static String getHEAD() {
public static void merge(String branchName) {
//找分裂点
checkStageEmpty();
chechBranchExit(branchName);
File branchFile = join(BRANCH_DIR, branchName);
if (!branchFile.exists()) {
printError("A branch with that name does not exist.");
}
HEAD = readHEAD();
HEAD_BRANCH = readHeadBranch();
if (HEAD_BRANCH.equals(branchName)) {
Expand Down

0 comments on commit 4c81a6b

Please sign in to comment.