git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rm and add, but not rename, of identical files
@ 2012-10-10 18:39 Drew Northup
  2012-10-10 20:09 ` Andreas Schwab
  2012-10-10 21:47 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Northup @ 2012-10-10 18:39 UTC (permalink / raw)
  To: git

I use etckeeper on some of my systems, backed by Git. On a system still
using a SYSV style init I recently modified my iptables settings,
changing which runlevels would stop/start the firewall.

[root@drew-northup ~]# etckeeper vcs status
# On branch master
# Changes not staged for commit:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   inittab
#       deleted:    rc.d/rc2.d/K92iptables
#       deleted:    rc.d/rc3.d/K92iptables
#       deleted:    rc.d/rc4.d/K92iptables
#       deleted:    rc.d/rc5.d/K92ip6tables
#       modified:   sysconfig/ip6tables
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       rc.d/rc2.d/S08iptables
#       rc.d/rc3.d/S08iptables
#       rc.d/rc4.d/S08iptables
#       rc.d/rc5.d/S08ip6tables
no changes added to commit (use "git add" and/or "git commit -a")

It detects the changes as renames however—which in this case isn't
appropriate:

[root@drew-northup ~]# etckeeper vcs status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       renamed:    rc.d/rc2.d/K92iptables -> rc.d/rc2.d/S08iptables
#       renamed:    rc.d/rc3.d/K92iptables -> rc.d/rc3.d/S08iptables
#       renamed:    rc.d/rc4.d/K92iptables -> rc.d/rc4.d/S08iptables
#       renamed:    rc.d/rc5.d/K92ip6tables -> rc.d/rc5.d/S08ip6tables
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   inittab
#       modified:   sysconfig/ip6tables
#

Is there something I should be doing to suppress rename detection in
this case? (I presume changing the default—detecting as a rename—isn't
such a bright idea.)

[root@drew-northup ~]# etckeeper vcs --version
git version 1.7.11.3

-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

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

end of thread, other threads:[~2012-10-11 16:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10 18:39 rm and add, but not rename, of identical files Drew Northup
2012-10-10 20:09 ` Andreas Schwab
2012-10-10 21:47 ` Junio C Hamano
2012-10-11 15:10   ` Drew Northup
2012-10-11 16:53     ` Junio C Hamano

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