git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Julliard <julliard@winehq.org>
To: Brent Goodrick <bgoodr@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix file mark handling and sort side-effects in git.el
Date: Sun, 15 Feb 2009 18:08:53 +0100	[thread overview]
Message-ID: <87ocx3hbkq.fsf@wine.dyndns.org> (raw)
In-Reply-To: <18836.22386.987021.484807@hungover.brentg.com> (Brent Goodrick's message of "Thu, 12 Feb 2009 09:08:02 -0800")

Brent Goodrick <bgoodr@gmail.com> writes:

> My rationale for adding append function calls to the sort calls is to
> leave the callers value alone since the caller needs to make use of
> the list value in subsequent operations, especially for issuing
> messages.

My point is that the callers that need it should take care of it
themselves, instead of forcing a copy even in cases where it's not
necessary. And the copy can most likely be avoided completely by
changing how the success message is printed.

>  > If you mean using git-add-file to do an update-index on an already
>  > tracked file, that's not what it's meant to do.
>
> That would be fine in, say, Perforce where once a file is added it
> stays added even if the user mades additional edits. I don't agree
> that is the best approach in the case the Emacs interface to git in
> git.el, since there is that "third" state where I could have added the
> file, then edited it, then forgot that I had edited it and proceeded
> naively to commit, only to be surprised later that the subsequent edit
> to the file was not committed. 

The design of git.el is that the index is not exposed directly, it's
treated as an implementation detail. So "add" in git.el is only for
adding an untracked file, it's not for updating the index contents of an
already tracked file; that's an unnecessary operation since git.el uses
the file marks to determine what gets committed.

It does get a bit confusing if you constantly mix command-line and
git.el commands, but you are not supposed to do that, you should be able
to do everything from the git.el buffer. I'm sure hiding the index
offends the git purists, but IMHO it makes things more Emacs-ish and
easier to use, especially if you are used to things like dired or
pcl-cvs or vc-dir with other VC systems.

-- 
Alexandre Julliard
julliard@winehq.org

  reply	other threads:[~2009-02-15 17:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11  6:12 [PATCH] Fix file mark handling and sort side-effects in git.el Brent Goodrick
2009-02-11 10:56 ` Alexandre Julliard
     [not found]   ` <e38bce640902120738h7b9bb75o42e1524cbfd95169@mail.gmail.com>
2009-02-12 17:08     ` Brent Goodrick
2009-02-15 17:08       ` Alexandre Julliard [this message]
2009-02-15 18:35         ` Brent Goodrick
2009-02-15 19:15           ` Alexandre Julliard
2009-02-16  0:04             ` Brent Goodrick

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=87ocx3hbkq.fsf@wine.dyndns.org \
    --to=julliard@winehq.org \
    --cc=bgoodr@gmail.com \
    --cc=git@vger.kernel.org \
    /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).