Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v8 4/4] worktree: add 'list' command

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:06:40

Mike Rappazzo [off-list ref] writes:
...  Does the porcelain
format restrict additive changes?  That is, is it OK for a future
patch to add another field in the format, as long as it doesn't alter
the other values?  Is the format that I have used here acceptable
(assuming the changes proposed below are made)?
It for you, as the designer of the format, to decide what to put in
the proposed specification, but I'm sure that we would want it to be
extensible.  I guess your design is essentially a series of records,
each of which begins with a "worktree <path>" line, followed by
various attributes, one per line, about that worktree, and each
attribute line begins with some fixed keyword so that the reader can
tell what attribute the line is talking about (or if the line
describes an attribute that the reader does not yet know about), and
I think that is an acceptable format.

You need to decide and describe if the value for some attribute can
span multiple lines (and define the quoting mechanism if that is the
case), what the set of keywords currently defined and what each of
these keywords means, and document that the readers are expected to
skip a line that begins with an unknown keyword.
quoted
Are the number of SPs here significant and if so in what way?  Does
it depend on your environment or will there always be six of them?
Either way feels like an indication of a problem.
The number of spaces is significant in this case, but it should not be
platform dependent.  It is just the padding for the different worktree
paths.
By environment, I didn't just mean 'platform'.  For example, the
output from --show-toplevel will be different for me and you as it
is likely that the absolute path where I have my repository and you
have yours would be different, so the contents of "expect" would
also be.  I was wondering where that SIX comes from.

The reason why I said it feels like an indication of a problem is
because it invites this question: If it is uniformly SIX no matter
what the user's environment is, why does it have to be SIX and not
other value, say, ONE, for example?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help