git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Wildcards with git rm
@ 2017-10-28 11:38 RPS
  2017-10-30  0:58 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: RPS @ 2017-10-28 11:38 UTC (permalink / raw)
  To: git

git rm doesn't seem to be very useful without the use of shell 
wildcards, especially with the use of a .gitignore file. If a .gitignore 
file is used, the git rm command does not consider the .gitignore file, 
and errs out when an ignored file is present.

In my opinion, git rm should take .gitignore into consideration and 
suppress errors for those files along with all other commands in order 
to target valid repository files in the current version. Also, git rm 
should either remove the ignored files and other present  files in the 
working copy to act like a shell rm command along with existing version 
controlled objects from the version, or skip ignored working copy files 
and err out on files not accounted for in the current version.

Have there been any design considerations on these things?

Jim Lutz


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Wildcards with git rm
  2017-10-28 11:38 Wildcards with git rm RPS
@ 2017-10-30  0:58 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2017-10-30  0:58 UTC (permalink / raw)
  To: RPS; +Cc: git

RPS <jim@resplendentwebservices.com> writes:

> git rm doesn't seem to be very useful without the use of shell
> wildcards, especially with the use of a .gitignore file. If a
> .gitignore file is used, the git rm command does not consider the
> .gitignore file, and errs out when an ignored file is present.

Do you mean

	$ git rm COPY*

would complain about COPYING~ on your filesystem, which would match
the pattern "*~" you have in your .gitignore file, after editing the
tracked COPYING file?

If so, you may choose to tell your shell _not_ to expand wildcards,
as it does not know what is ignored, by doing

	$ git rm COPY\*

instead.  That would allow "git rm" to expand wildcards _with_ the
knowledge of what is and is not ignored.  The shell does not know
(probably you could teach if you wanted to, but it does not want to
know) and care about .gitignore files when it does its wildcard
expansion.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-30  0:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-28 11:38 Wildcards with git rm RPS
2017-10-30  0:58 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).