git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* weird behaviour in git
@ 2015-02-26 14:12 Thomas Klausner
  2015-02-26 14:45 ` Michael J Gruber
  2015-02-26 15:54 ` David Kastrup
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Klausner @ 2015-02-26 14:12 UTC (permalink / raw)
  To: git

Hi!

I've played around with git and found that 'git mv' does not honor
what I tell it to do:

wiz@yt:~> mkdir a
wiz@yt:~> cd a
wiz@yt:~/a> git init .
Initialized empty Git repository in /home/wiz/a/.git/
wiz@yt:~/a> touch a
wiz@yt:~/a> git add a
wiz@yt:~/a> git commit -m 'add a'
[master (root-commit) 99d0ee7] add a
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a
wiz@yt:~/a> git mv a b
wiz@yt:~/a> touch Makefile
wiz@yt:~/a> git add Makefile
wiz@yt:~/a> git commit


# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
#       renamed:    a -> Makefile
#       new file:   b
#

This is reproducible for me with "git version 2.3.0" on
NetBSD-7.99.5/amd64.

I guess this happens because the checksums of the files are the same
and 'Makefile' is earlier when sorting, but since I explicitly told
"git mv" old and new name, I think that's a bug nevertheless.
 Thomas

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

end of thread, other threads:[~2015-02-26 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 14:12 weird behaviour in git Thomas Klausner
2015-02-26 14:45 ` Michael J Gruber
2015-02-26 14:58   ` Thomas Klausner
2015-02-26 15:22     ` Michael J Gruber
2015-02-26 15:54 ` David Kastrup

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