Re: [PATCH] Documentation/git-filter-branch: Remove Useless Use of Plumbing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 23, 2008, 00:05 UTC
- Message-ID
- <7vd4l5jwi4.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080722222418.15372.62190.stgit@localhost>
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?
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.