On Fri, Mar 03, 2023 at 08:28:36PM -0500, Jeff King wrote: > > Given that the other three subcommands also take <file> > > > > 'git bundle' create [-q | --quiet | --progress | --all-progress] ... > > [--version=<version>] <file> <git-rev-list-args> > > 'git bundle' verify [-q | --quiet] <file> > > 'git bundle' list-heads <file> [<refname>...] > > 'git bundle' unbundle [--progress] <file> [<refname>...] > > > > but read_bundle_header() function all three calls begins like so: > > > > int read_bundle_header(const char *path, struct bundle_header *header) > > { > > int fd = open(path, O_RDONLY); > > > > if (fd < 0) > > return error(_("could not open '%s'"), path); > > return read_bundle_header_fd(fd, header, path); > > } > > > > this function needs to be fixed first ;-) > > I wasn't thinking of changing the behavior for input, but just focusing > the docs in the right spot (the "create" option), like: Oh, hmph. I didn't realize that both my patch and yours are touching a shared options-parser that affects both reading and writing. So the patch by itself is fixing "git bundle create -" but breaking "git bundle verify -". We either need to teach the reading side to handle "-", or we have to teach parse_options_cmd_bundle() to handle the two cases differently. -Peff