Introduce CHERRY_PICK_HEAD
[gitweb.git] / builtin / merge.c
index 42fff387e69d9b5412e8e776aed3272b78ebe758..5ba2efc21439b3150f3c46552fea10a0922773e1 100644 (file)
@@ -969,6 +969,13 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
                else
                        die("You have not concluded your merge (MERGE_HEAD exists).");
        }
+       if (file_exists(git_path("CHERRY_PICK_HEAD"))) {
+               if (advice_resolve_conflict)
+                       die("You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
+                           "Please, commit your changes before you can merge.");
+               else
+                       die("You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).");
+       }
        resolve_undo_clear();
 
        if (verbosity < 0)