author | Jeff King <peff@peff.net> | |
Thu, 12 May 2011 11:09:55 +0000 (07:09 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 16 May 2011 20:01:45 +0000 (13:01 -0700) | ||
commit | fad2652673247203014e2c57622a5ffe0eb5ad93 | |
tree | 93d8abf58386f96d67452fade9107224d024c8d5 | tree | snapshot |
parent | 161807349aa1ee853880a5c6e39c53f55b10077d | commit | diff |
revert: allow reverting a root commit
Although it is probably an uncommon operation, there is no
reason to disallow it, as it works just fine. It is the
reverse of a cherry-pick of a root commit, which is already
allowed.
We do have to tweak one check on whether we have a merge
commit, which assumed we had at least one parent.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Although it is probably an uncommon operation, there is no
reason to disallow it, as it works just fine. It is the
reverse of a cherry-pick of a root commit, which is already
allowed.
We do have to tweak one check on whether we have a merge
commit, which assumed we had at least one parent.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c | diff | blob | history |