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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Rappazzo <rappazzo@xxxxxxxxx> 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.

>> 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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]