Re: [PATCH v3] range-diff: support reading mbox files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 3, 2023, 22:02 UTC
- Message-ID
- <xmqq8rgdebod.fsf@gitster.g>
- In-Reply-To
- <pull.1420.v3.git.1669108102092.gitgitgadget@gmail.com>
Another thing I forgot to mention.
Show 8 quoted lines
> Let's offer a way to read those patches from pre-prepared MBox files > instead when an argument "mbox:<filename>" is passed instead of a commit > range. > ... > + const char *path; > + > + if (skip_prefix(range, "mbox:", &path)) > + return read_mbox(path, list);
Shouldn't this take the prefix into account, similar to how option of OPTION_FILENAME type does using parse-options.c::fix_filename()?
A test that starts "range-diff" in a subdirectory and refer to a mbox file elsewhere may be a good way to prevent such a bug from happening and regression after the change hits a release.