git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* merge doesn't remove files
@ 2007-02-03 22:48 Gerrit Pape
  2007-02-04  0:48 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Gerrit Pape @ 2007-02-03 22:48 UTC (permalink / raw)
  To: git

Hi, please see http://bugs.debian.org/403104

Shouldn't git remove the original file after merging a commit that moved
the file away?  Here's a simple test case:

$ mkdir repo && cd repo
$ git init-db
defaulting to local storage area
$ echo a >foo && git add foo
$ git commit -a -m'add foo'
Committing initial tree 86de5e13286a8449a8a706a58e63be6781770b12
$ git branch b  
$ git mv foo bar
$ git commit -a -m'move foo'
$ git checkout b
$ echo ttt >>foo
$ git commit -a -m'change foo'
$ git pull . master
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Merging HEAD with adc07a8eac73cdb1cb3764ec50747556ed2abc99
Merging:
92eff19 change foo
adc07a8 move foo
found 1 common ancestor(s):
ba043e5 add foo
Merge made by recursive.
 foo => bar |    0 
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename foo => bar (100%)
$ git status
# On branch refs/heads/b
# Untracked files:
#   (use "git add" to add to commit)
#
#       foo
nothing to commit
$ ls
bar  foo
$ 

Thanks, Gerrit.

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

end of thread, other threads:[~2007-02-04 10:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-03 22:48 merge doesn't remove files Gerrit Pape
2007-02-04  0:48 ` Junio C Hamano
2007-02-04  1:41   ` Junio C Hamano
2007-02-04  4:59     ` Shawn O. Pearce
2007-02-04 10:40       ` Linus Torvalds
2007-02-04  3:50   ` Shawn O. Pearce

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