From: Mark Jamsek Subject: Re: got {diff,log,update} -c KEYWORD (cf. svn revision keywords) To: Stefan Sperling Cc: Omar Polo , gameoftrees@openbsd.org Date: Mon, 17 Jul 2023 17:55:43 +1000 Stefan Sperling wrote: > On Fri, Jul 14, 2023 at 11:44:08PM +1000, Mark Jamsek wrote: > > I've made a few changes that I think make it a lot nicer, and have > > added some non-trivial and somewhat contrived tests too. > > > > I nixed the hand-rolled overflow code so we use strtonum(3), and made > > the keyword parsing strict. That lax keyword comparison was by design > > initially but I forgot to remove it; I was using -cBASED in testing :) > > > > Something I just noticed that I like about the ':' delimiters is ^W > > removes back to the ':', which is handy. And the +/-N works great with > > tog's count modifier. You can open tog, see which commit it is you > > want with Nj, and use the same N count (or the headline index-1) in the > > 'got * -c:head:-N' command! This is going to save a lot of copypasting > > and misremembering commit ids. It's pretty neat :) > > Ok by me. > > I am certain we will be making more tweaks to this over time but > this seems like a good starting point for further work to happen > in the tree. > Thanks for addressing the problem with ambiguous syntax. That was > the biggest issue from my point of view. Thanks! And no worries wrt syntax. I think it's much better like this :) Yes, I want to make it consistent and expand support (where it makes sense) to all commands that take a commit id or reference. Then I want to add more keywords like temporal expressions. But I felt like this was a good start; it already provides a convenience I think I'll use daily, and wider use will help inform future work. -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68