git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Documentation/git-filter-branch: Remove Useless Use of Plumbing
Date: Thu, 24 Jul 2008 00:02:30 +0200	[thread overview]
Message-ID: <20080723220230.GP32184@machine.or.cz> (raw)
In-Reply-To: <7vd4l5jwi4.fsf@gitster.siamese.dyndns.org>

On Tue, Jul 22, 2008 at 05:05:07PM -0700, Junio C Hamano wrote:
> Petr Baudis <pasky@suse.cz> writes:
> 
> > The example to remove file using index-filter uses git update-index
> >  --remove where git rm --cached works as well.
> 
> I am not sure "works as well" is a good enough justification to choose a
> Porcelain command over a plumbing command in this particular context.
> After all, filter-branch is a scripting enviornment, isn't it?

But one of the few that are regularly used even by "mere users", who
would be probably put off unnecessarily by using this mysterious command.
(We might also say that I'm testing Dscho's suggestions, though this
patch was of course provoked by a "huh" of a user I was helping.)

> There also is another subtle difference.  "git rm" takes pathspecs while
> "update-index" takes paths.
> 
> So after running one of these commands:
> 
> 	$ git rm --cached 'Makefil?'
> 	$ git update-index --force-remove 'Makefil?'
> 
> output from:
> 
> 	$ git diff --cached --stat
> 
> would be different.

I don't think this is relevant for the example in question. Users are as
likely to be bit by or take advantage of this as by regular git rm
usage.

-- 
				Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name.  -- Ken Thompson and Dennis M. Ritchie

      reply	other threads:[~2008-07-23 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 22:24 [PATCH] Documentation/git-filter-branch: Remove Useless Use of Plumbing Petr Baudis
2008-07-23  0:05 ` Junio C Hamano
2008-07-23 22:02   ` Petr Baudis [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=20080723220230.GP32184@machine.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 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).