git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Peter Williams <peter_ono@users.sourceforge.net>
Cc: git@vger.kernel.org
Subject: Re: [HELP] Adding git awareness to the darning patch management system.
Date: Thu, 1 Dec 2011 18:40:42 -0500	[thread overview]
Message-ID: <20111201234042.GA7294@sigill.intra.peff.net> (raw)
In-Reply-To: <4ED80EA2.80805@users.sourceforge.net>

On Fri, Dec 02, 2011 at 09:32:50AM +1000, Peter Williams wrote:

> Yes, I think your right.  For most of my purposes, I think that it's
> irrelevant whether a change is staged or not and the choices that I
> offer allow the user to do what he thinks is right for a file with
> changes that are staged but uncommitted.  For me to automatically do
> something based on whether the file was staged for a commit would be
> a mistake as I would be reducing the user's options.
> 
> However, the distinction might be worth making in the file tree
> display to remind the user what's staged and what's not?

I'd personally start with ignoring the distinction, and then wait for
some enterprising user to suggest how it would be marked. That takes the
burden off of you for guessing what representation would be best.

> As an aside, I found it easier to delve into git's innards to find
> out how to implement git binary patches than I did finding out how to
> do things from the CLI :-).

Heh. I think that is because the CLI is written by people (myself
included) who want it to give them access to git's innards. ;)

> >In your case, I think "status" is the most convenient level of
> >abstraction for you, because you are interesting in looking at
> >differences to both the index and HEAD (i.e., the prior commit). But if
> >you find as you implement that want more flexibility, you can switch to
> >using the lower-level commands yourself.
> 
> I'll investigate this approach.  How easy is it to distinguish low
> level commands from high level commands?

git(1) has a list of "porcelain" and "plumbing" commands. If you are
scripting, you generally want to stick with plumbing commands,
lower-level whose output and behavior remains stable across releases.

However, some porcelain commands offer a "plumbing" mode (despite the
name, the "--porcelain" flag to some commands is what you want; it is
about offering parseable output that a custom porcelain could use. In
git lingo, your interface is one such porcelain).

-Peff

  reply	other threads:[~2011-12-01 23:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30  2:17 [HELP] Adding git awareness to the darning patch management system Peter Williams
2011-11-30  7:22 ` Jeff King
2011-12-01  0:56   ` Peter Williams
2011-12-01  6:27     ` Jeff King
2011-12-01 23:32       ` Peter Williams
2011-12-01 23:40         ` Jeff King [this message]
2011-11-30  9:04 ` Tay Ray Chuan
2011-11-30 23:47   ` Peter Williams

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=20111201234042.GA7294@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=peter_ono@users.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).