]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/replace.c
replace: add --graft option
authorChristian Couder <chriscool@tuxfamily.org>
Sat, 19 Jul 2014 15:01:08 +0000 (17:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Jul 2014 19:04:23 +0000 (12:04 -0700)
commit4228e8bc989c6cac1c47faece720faa06531281f
tree42305181bd4ffbb5f4d0c970309559eaf19c7a65
parent1c2828c194bf4bc9dba2cc1f12cd0687263af94b
replace: add --graft option

The usage string for this option is:

git replace [-f] --graft <commit> [<parent>...]

First we create a new commit that is the same as <commit>
except that its parents are [<parents>...]

Then we create a replace ref that replace <commit> with
the commit we just created.

With this new option, it should be straightforward to
convert grafts to replace refs.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/replace.c