diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-04-23 13:58:51 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-23 13:58:51 -0700 |
| commit | 477209bd7fb1605d10be7c8eae9d215e265b4501 (patch) | |
| tree | 5347b41f3ce6342766bacbf4d1325d29fbbcc07e /revision.c | |
| parent | 480ddc566fd68556bcf824a1141d5dbef3e0701f (diff) | |
| parent | e7ef4be7c25c4968d8c5c51e6e748a1927f67194 (diff) | |
| download | git-477209bd7fb1605d10be7c8eae9d215e265b4501.tar.xz | |
Merge branch 'mh/left-right-limited'
"git log --{left,right}-only A...B", when A and B does not share
any common ancestor, now behaves as expected.
* mh/left-right-limited:
revision: fix --left/right-only use with unrelated histories
Diffstat (limited to 'revision.c')
| -rw-r--r-- | revision.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/revision.c b/revision.c index 3fb4c4adb7..550453ab70 100644 --- a/revision.c +++ b/revision.c @@ -2480,10 +2480,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg die(_("options '%s' and '%s' cannot be used together"), "--left-only", "--right-only/--cherry"); revs->left_only = 1; + revs->limited = 1; } else if (!strcmp(arg, "--right-only")) { if (revs->left_only) die(_("options '%s' and '%s' cannot be used together"), "--right-only", "--left-only"); revs->right_only = 1; + revs->limited = 1; } else if (!strcmp(arg, "--cherry")) { if (revs->left_only) die(_("options '%s' and '%s' cannot be used together"), "--cherry", "--left-only"); |
