[BUG] git cherry-pick does not complain about unknown options
- Date: Mon, 9 Jul 2018 16:16:16 +0200
- From: Andrei Rybak <rybak.a.v@xxxxxxxxx>
- Subject: [BUG] git cherry-pick does not complain about unknown options
I was trying to cherry pick commits, while simultaneously changing the
author. Unfortunately, cherry-pick doesn't have the same --author
option as git-commit. However, instead of complaining about unknown
- when trying to cherry-pick one commit, it reported a BUG
- when trying to cherry-pick several commits, cherry-pick silently
All commits in tests existed in repository:
$ git cherry-pick --author='TEST' <one-commit> # case 1
error: BUG: expected exactly one commit from walk
fatal: cherry-pick failed
$ echo $?
$ git cherry-pick --author='TEST' <commit1> <commit2> # case 2
$ echo $?
$ git --version
git version 2.18.0.windows.1
I've encountered this issue in Windows version, and Johannes Schindelin
has confirmed that the issue is also present in Linux version.
Originally reported here: https://github.com/git-for-windows/git/issues/1751
Best regards, Andrei Rybak