Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-10-04 23:28:52 +0300
committerJunio C Hamano <gitster@pobox.com>2023-10-04 23:28:52 +0300
commit30291891865b928cfff11735f758ecdd646d7510 (patch)
tree63d7ff8975cddd1a59f878c3c1d291ac877768dd /revision.c
parentd0e8084c65cbf949038ae4cc344ac2c2efd77415 (diff)
parentf97c8b1e00297570a390789be84513f435d5ea52 (diff)
Merge branch 'ps/revision-cmdline-stdin-not'
"git rev-list --stdin" learned to take non-revisions (like "--not") recently from the standard input, but the way such a "--not" was handled was quite confusing, which has been rethought. This is potentially a change that breaks backward compatibility. * ps/revision-cmdline-stdin-not: revision: make pseudo-opt flags read via stdin behave consistently
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/revision.c b/revision.c
index 49d385257a..e789834dd1 100644
--- a/revision.c
+++ b/revision.c
@@ -2790,13 +2790,13 @@ static int handle_revision_pseudo_opt(struct rev_info *revs,
}
static void read_revisions_from_stdin(struct rev_info *revs,
- struct strvec *prune,
- int *flags)
+ struct strvec *prune)
{
struct strbuf sb;
int seen_dashdash = 0;
int seen_end_of_options = 0;
int save_warning;
+ int flags = 0;
save_warning = warn_on_object_refname_ambiguity;
warn_on_object_refname_ambiguity = 0;
@@ -2819,13 +2819,13 @@ static void read_revisions_from_stdin(struct rev_info *revs,
continue;
}
- if (handle_revision_pseudo_opt(revs, argv, flags) > 0)
+ if (handle_revision_pseudo_opt(revs, argv, &flags) > 0)
continue;
die(_("invalid option '%s' in --stdin mode"), sb.buf);
}
- if (handle_revision_arg(sb.buf, revs, 0,
+ if (handle_revision_arg(sb.buf, revs, flags,
REVARG_CANNOT_BE_FILENAME))
die("bad revision '%s'", sb.buf);
}
@@ -2908,7 +2908,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
}
if (revs->read_from_stdin++)
die("--stdin given twice?");
- read_revisions_from_stdin(revs, &prune_data, &flags);
+ read_revisions_from_stdin(revs, &prune_data);
continue;
}