From b64335554a3691cbc134fb73a598dfd593f44b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Thu, 9 May 2019 17:10:27 +0700 Subject: merge: remove drop_save() in favor of remove_merge_branch_state() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both remove_branch_state() and drop_save() delete almost the same set of files about the current merge state. The only difference is MERGE_RR but it should also be cleaned up after a successful merge, which is what drop_save() is for. Make a new function that deletes all merge-related state files and use it instead of drop_save(). This function will also be used in the next patch that introduces --quit. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- branch.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'branch.h') diff --git a/branch.h b/branch.h index 29c1afa4d0..c90ba9d7bf 100644 --- a/branch.h +++ b/branch.h @@ -60,6 +60,12 @@ extern int validate_branchname(const char *name, struct strbuf *ref); */ extern int validate_new_branchname(const char *name, struct strbuf *ref, int force); +/* + * Remove information about the merge state on the current + * branch. (E.g., MERGE_HEAD) + */ +void remove_merge_branch_state(struct repository *r); + /* * Remove information about the state of working on the current * branch. (E.g., MERGE_HEAD) -- cgit v1.2.3