Re: [PATCH] Documentation/git-filter-branch: Remove Useless Use of Plumbing

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Documentation/git-filter-branch: Remove Useless Use of Plumbing

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:59

Petr Baudis [off-list ref] 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.

Re: [PATCH] Documentation/git-filter-branch: Remove Useless Use of Plumbing

From: Petr Baudis <hidden>
Date: 2016-06-15 22:45:00

On Tue, Jul 22, 2008 at 05:05:07PM -0700, Junio C Hamano wrote:
Petr Baudis [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help