pulling the root commit overwrites untracked files without warning (1.7.2.3)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Gert Palok
Date: Thursday, October 21, 2010 - 6:18 am

Hi

On 1.7.2.3, pulling the root commit overwrites untracked files

Minimal working example:
$ git init wc1
$ cd wc1
$ echo a > a
$ git add a
$ git commit -m "added a"
$ mkdir ../wc2
$ cd ../wc2
$ echo b > a
$ git init
$ git remote add origin ../wc1
$ git pull origin master
$ # expected: error: Untracked working tree file 'a' would be
overwritten by merge.  Aborting
$ # actual: no error
$ cat a
$ # expected: b
$ # actual: a

An excerpt from the session:
gert@planc ~/test/wc2 git[master?]
768$ git pull origin master
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From ../wc1
 * branch            master     -> FETCH_HEAD
gert@planc ~/test/wc2 git[master]
769$ cat a
a

-- 
Gert Palok
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
pulling the root commit overwrites untracked files without ..., Gert Palok, (Thu Oct 21, 6:18 am)
Re: pulling the root commit overwrites untracked files wit ..., Clemens Buchacher, (Fri Oct 22, 2:14 pm)
Re: pulling the root commit overwrites untracked files wit ..., Clemens Buchacher, (Fri Oct 22, 2:17 pm)
Re: pulling the root commit overwrites untracked files wit ..., Clemens Buchacher, (Sun Nov 14, 2:34 pm)
[PATCH] do not overwrite untracked during merge from unbor ..., Clemens Buchacher, (Sun Nov 14, 2:46 pm)
[PATCH w/o PGP] do not overwrite untracked during merge fr ..., Clemens Buchacher, (Sun Nov 14, 2:49 pm)
[PATCH v2] do not overwrite untracked during merge from un ..., Clemens Buchacher, (Sun Nov 14, 2:53 pm)
[PATCH v3] do not overwrite untracked during merge from un ..., Clemens Buchacher, (Sun Nov 14, 3:07 pm)