GNU bug report logs -
#79126
vc-switch-working-tree does not work if there is no matching file
Previous Next
Full log
View this message in rfc822 format
On 06/08/2025 19:06, Spencer Baugh wrote:
> (This is maybe overengineering, but: we could even make it take*either*
> a root file name or a project object, so that callers can pass whatever
> is most convenient for them.
Not sure there will be other callers for it. Or not many anyway.
> Then the code inside could use some new
> helper function which when passed a file name, returns (project-current
> nil file-name), and when passed anything else, returns that thing. That
> might be simple enough, and this function would be fairly useful I
> think)
If the value needs to be passed through a helper, we could just pass it
through 'project-root'. The project values must be available in the
caller already, so let's just standardize on those.
(We're probably coming from different schools of design: you're thinking
in ADTs where it's normal to have something like "Thing | String" as a
parameter type, and I'm thinking more in OOP where you pass a type, or a
supertype - like a general protocol - but rarely a union of disjoint
types, and if that happens, they are usually all primitive types).
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.