Bug 610829 - git add <new-file> and git rm <file-in-repo> destroy repo when add empty file
Summary: git add <new-file> and git rm <file-in-repo> destroy repo when add empty file
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: git   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Adam Tkac
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-02 14:27 UTC by Nikola Pajkovsky
Modified: 2014-02-02 22:14 UTC (History)
2 users (show)

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: ---


Attachments (Terms of Use)

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
#


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