Re: [PATCH v2 1/2] git-jump: add an optional argument 'stdout'
- From
Jeff King <peff@peff.net>
- Date
- Nov 21, 2022, 18:18 UTC
- Message-ID
- <Y3vA5Jc3f84YIoYw@coredump.intra.peff.net>
- In-Reply-To
- <xmqqedtwyi94.fsf@gitster.g>
On Mon, Nov 21, 2022 at 02:43:51PM +0900, Junio C Hamano wrote:
Show 8 quoted lines
> the command line structure of "git jump" being > > git jump <mode> [<args>] > > where <mode> is one of 'diff', 'merge', 'grep', it somehow feels > very strange to insert an optional new word, that is not a dashed > option, before the <mode>. "git jump --stdout diff" might be less > surprising, but I dunno.
FWIW, I had the same reaction: it should be --stdout.
Show 7 quoted lines
> But I think this is a good idea. In fact, it almost feels that the > interface to produce the list of "$file:$line: <blah>" that this > "stdout" mode gives should have been in the command as the lowest > level basic primitive, upon which the feature to drive a specific > editor using such an output file should have been built, and the > current code is backwards in that sense. Exposing that lower level > primitive directly is a welcome addition.
The main reason I didn't start with that primitive is because the initial outputs were pretty simple and based around "grep -n" output. But they've gotten a bit more complicated over time, especially the "diff" one. I agree that just dumping the quickfix list is a good feature to have.
-Peff