Commit Graph

6 Commits

Author SHA1 Message Date
brian m. carlson
19ce5496c2 t3506: make hash independent
This test uses a hard-coded object ID to ensure that the result of
cherry-pick --ff is correct.  Use test_oid to make this work for both
SHA-1 and SHA-256.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-20 11:09:22 -07:00
Sergey Organov
1c320135e1 t3506: validate '-m 1 -ff' is now accepted for non-merge commits
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-07 08:44:37 -08:00
Junio C Hamano
7a96c3864e typofix: cherry is spelled with two ars
Do not say chery; it is spelled cherry.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-05 14:51:17 -07:00
Martin von Zweigbergk
334ae39745 learn to pick/revert into unborn branch
cherry-picking into an unborn branch should work, so make it work,
with or without --ff.

Cherry-picking anything other than a commit that only adds files, will
naturally result in conflicts. Similarly, revert also works, but will
result in conflicts unless the specified revision only deletes files.

Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-23 10:40:37 -08:00
Brandon Casey
6355e505ba builtin/revert.c: don't dereference a NULL pointer
cherry-pick will segfault when transplanting a root commit if the --ff
option is used.  This happens because the "parent" pointer is set to NULL
when the commit being cherry-picked has no parents.  Later, when "parent"
is dereferenced, the cherry-pick segfaults.

Fix this by checking whether "parent" is NULL before dereferencing it and
add a test for this case of cherry-picking a root commit with --ff.

Reported-by: Zbyszek Szmek <zbyszek@in.waw.pl>
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-27 10:39:54 -07:00
Christian Couder
b5c1a28b4c cherry-pick: add tests for new --ff option
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-06 23:58:47 -08:00