Bug 610829 - git add <new-file> and git rm <file-in-repo> destroy repo when add empty file
git add <new-file> and git rm <file-in-repo> destroy repo when add empty file
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: git (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Adam Tkac
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-02 10:27 EDT by Nikola Pajkovsky
Modified: 2014-02-02 17:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-07 05:27:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nikola Pajkovsky 2010-07-02 10:27:30 EDT
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
#

Note You need to log in before you can comment on or make changes to this bug.