All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Rappazzo <rappazzo@gmail.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
	David Turner <dturner@twopensource.com>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH v8 4/4] worktree: add 'list' command
Date: Wed, 23 Sep 2015 22:00:49 -0700	[thread overview]
Message-ID: <xmqqvbb0v2bi.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CANoM8SX28TPt_U8v9HO4yo=M46-JKn5S11DrhZ0-EdrjkDT3EQ@mail.gmail.com> (Mike Rappazzo's message of "Wed, 23 Sep 2015 22:58:53 -0400")

Mike Rappazzo <rappazzo@gmail.com> 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?

      reply	other threads:[~2015-09-24  5:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 13:30 [PATCH v8 0/4] worktree: list functions and command Michael Rappazzo
2015-09-18 13:30 ` [PATCH v8 1/4] worktree: add top-level worktree.c Michael Rappazzo
2015-09-22 17:16   ` Junio C Hamano
2015-09-18 13:30 ` [PATCH v8 2/4] worktree: refactor find_linked_symref function Michael Rappazzo
2015-09-22 17:44   ` Junio C Hamano
2015-09-18 13:30 ` [PATCH v8 3/4] worktree: add functions to get worktree details Michael Rappazzo
2015-09-22 18:10   ` Junio C Hamano
2015-09-18 13:30 ` [PATCH v8 4/4] worktree: add 'list' command Michael Rappazzo
2015-09-22 19:42   ` Junio C Hamano
2015-09-24  2:58     ` Mike Rappazzo
2015-09-24  5:00       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqvbb0v2bi.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=rappazzo@gmail.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.