{"thread":{"id":"20457","subject":"[PATCH 1/4] sequencer: add \"do_fast_forward()\" to perform a fast forward","startedAt":"2009-08-07T20:40:50Z","lastAt":"2009-08-07T20:40:50Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"119930","messageId":"20090807204054.6280.5650.chriscool@tuxfamily.org","threadId":"20457","inReplyTo":null,"subject":"[PATCH 1/4] sequencer: add \"do_fast_forward()\" to perform a fast forward","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2009-08-07T20:40:50Z","receivedAt":"2009-08-07T20:40:50Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"From: Stephan Beyer <s-beyer@gmx.net>\n\nThis code is taken from the sequencer GSoC project:\n\n    git://repo.or.cz/git/sbeyer.git\n\n    (commit e7b8dab0c2a73ade92017a52bb1405ea1534ef20)\n\nbut the messages have been changed to be the same as those\ndisplayed by git-rebase--interactive.sh.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n builtin-sequencer--helper.c |    9 +++++++++\n 1 files changed, 9 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-sequencer--helper.c b/builtin-sequencer--helper.c\nindex be030bc..0cd7e98 100644\n--- a/builtin-sequencer--helper.c\n+++ b/builtin-sequencer--helper.c\n@@ -171,6 +171,15 @@ static struct commit *get_commit(const char *arg)\n \treturn lookup_commit_reference(sha1);\n }\n \n+static int do_fast_forward(const unsigned char *sha)\n+{\n+\tif (reset_almost_hard(sha))\n+\t\treturn error(\"Cannot fast forward to %s\", sha1_to_hex(sha));\n+\tif (verbosity > 1)\n+\t\tprintf(\"Fast forward to %s\\n\", sha1_to_hex(sha));\n+\treturn 0;\n+}\n+\n static int set_verbosity(int verbose)\n {\n \tchar tmp[] = \"0\";\n-- \n1.6.4.209.g16b77\n"}]}