replace: prepare create_graft() for converting graft files wholesale
commit041c98e22d88d963a92f1bac6ab348a0d4c6d228
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 28 Apr 2018 22:44:32 +0000 (29 00:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Apr 2018 02:12:29 +0000 (30 11:12 +0900)
treedd10d466a47000738c132770f6607e39c0583fd4
parente24e871920ac04473a470645e4c4dc53b422dd75
replace: prepare create_graft() for converting graft files wholesale

When converting all grafts in a graft file to replace refs, and one of
them happens to leave the original commit's parents unchanged, we do not
want to error out. Instead, we would like to issue a warning.

Prepare the create_graft() function for such a use case by adding a
`gentle` parameter. If set, we do not return an error when the replace ref
is unchanged, but a mere warning.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/replace.c