git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Behavior of git rm
@ 2013-04-03 14:50 jpinheiro
  2013-04-03 15:58 ` Jeff King
  0 siblings, 1 reply; 18+ messages in thread
From: jpinheiro @ 2013-04-03 14:50 UTC (permalink / raw)
  To: git

Hi all,

We are students from Universidade do Minho in Portugal, and we are using git
in project as a case study.
While experimenting with git we found an unexpected behavior with git rm.
Here is a trace of the unexpected behavior:

$ git init
$ mkdir D
$ echo "Hi" > D/F
$ git add D/F
$ rm -r D
$ echo "Hey" > D
$ git rm D/F
warning: 'D/F': Not a directory
rm 'D/F'
fatal: git rm: 'D/F': Not a directory


If the file D created with last echo did not exist or was named differently
then no error would occur as expected. For example:

$ git init
$ mkdir D
$ echo "Hi" > D/F
$ git add D/F
$ rm -r D
$ echo "Hey" > F
$ git rm D/F

This works as expected, and the only difference is the name of the file of
the last echo.
Is this the expected behavior of git rm?




--
View this message in context: http://git.661346.n2.nabble.com/Behavior-of-git-rm-tp7581485.html
Sent from the git mailing list archive at Nabble.com.

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

end of thread, other threads:[~2013-04-05  5:05 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 14:50 Behavior of git rm jpinheiro
2013-04-03 15:58 ` Jeff King
2013-04-03 17:35   ` Junio C Hamano
2013-04-03 20:36     ` Jeff King
2013-04-04 19:02     ` Jeff King
2013-04-04 19:03       ` [PATCH 1/3] rm: do not complain about d/f conflicts during deletion Jeff King
2013-04-04 19:03       ` [PATCH 2/3] t3600: test behavior of reverse-d/f conflict Jeff King
2013-04-04 19:06       ` [PATCH 3/3] t3600: test rm of path with changed leading symlinks Jeff King
2013-04-04 19:42         ` Junio C Hamano
2013-04-04 19:55           ` Jeff King
2013-04-04 20:31             ` Junio C Hamano
2013-04-04 21:03               ` Jeff King
2013-04-04 23:12                 ` Junio C Hamano
2013-04-04 23:29                   ` Jeff King
2013-04-04 23:33                     ` Junio C Hamano
2013-04-05  0:00                       ` Jeff King
2013-04-05  4:59                         ` Junio C Hamano
2013-04-05  5:04                           ` Jeff King

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).