provide more errors for the "merge into empty head" case
PATCH 1/1 provide more errors for the "merge into empty head" case
--squash merges are not supported yet. They could be implemented by building the index from the merged-from branch, and doing a single commit.
Non-fast-forward merges instead do not make sense, because you cannot make a merge commit if you don't have a base in the beginning.
Signed-off-by Paolo Bonzini <[email protected]>
--- builtin-merge.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
builtin-merge.c +5 -0
@@ -869,6 +869,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)if (argc !=1 )die ("Can merge only exactly one commit into " "empty head" ); +if (squash) +die ("Squash commit into empty head not supported yet" ); +if (!allow_fast_forward) +die ("Non-fast-forward commit does not make sense into " +"an empty head" ); remote_head =peel_to_type (argv[0 ],0 ,NULL ,OBJ_COMMIT );if (!remote_head)die ("%s - not something we can merge" , argv[0 ]);
Signature · 1 line
1.5.5