Bug: Revert with -m 0 says no -m was given

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Git produces a misleading error when you tell it `git revert -m 0`. The
user error is that the parent should be greater than zero, but git
doesn't help you. (I forgot that the first parent is 1 and not 0.)

$ git revert -m 0 abc
error: commit abc... is a merge but no -m option was given.
fatal: revert failed

Git already handles too large m correctly:

$ git revert -m 3 abc
error: commit abc... does not have parent 3
fatal: revert failed

-Ulrik



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]