Bug 610829

Summary: git add <new-file> and git rm <file-in-repo> destroy repo when add empty file
Product: Red Hat Enterprise Linux 6 Reporter: Nikola Pajkovsky <npajkovs>
Component: gitAssignee: Adam Tkac <atkac>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dhoward, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-07 09:27:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Nikola Pajkovsky 2010-07-02 14:27:30 UTC
git has a problem when you add new file into repo and other one was deleted. 


Version-Release number of selected component (if applicable):
$ rpm -q git
git-1.7.1-1.el6.x86_64

How reproducible bug:
mkdir git-bug
cd git-bug
git init
touch a b c
git add a b c
git commit -m "Trala la la la Tra lala Lala"
echo "muhuhahaHAAHAAAAA" > a
git add a
touch d
git add d
git rm c
git status

Working situation: 
mkdir git-bug
cd git-bug
git init
touch a b c
git add a b c
git commit -m "Trala la la la Tra lala Lala"
echo "muhuhahaHAAHAAAAA" > a
git add a
touch d
*echo "why? whyyyy?? whyyyyyyyy????" > d*
git add d
git rm c
git status

Actual results:
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   a
#	renamed:    c -> d
#

Expected results:
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   a
#       new file:   d
#	deleted:    c
#