Bug 1152 - Git unneccessarily tracks files in the /m4 folder
Status:
NEW
Component:
Core
Version:
daily
Hardware:
All All
Importance:
P5 normal
Target Milestone:
---
Assignee:
Rob Caelers
URL:
Depends on:
Blocks:
Reported:
Feb 14 2014 17:21:55 UTC
by:
Mateusz Jończyk
Modified:
Feb 14 2014 17:41:48 UTC
WhoWhenWhatRemovedAdded
Description
Mateusz Jończyk  Feb 14 2014 17:21:55 UTC
Hello,
When I ran git status after running ./autogen.sh and building Workrave, i got:

# 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:   m4/libtool.m4
#	modified:   m4/ltoptions.m4
#	modified:   m4/ltversion.m4
#

When I then run git diff, I see some relatively small differences that look like a small version downgrade (I use quite old Ubuntu 12.04).

I am not an expert of Autotools, but I think that probably the files in the m4 folder do not need to be tracked because autopoint can generate them back. When I did:
$ mv m4 m4b
$ ./autogen.sh

I got:
# 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)
#
#	deleted:    m4/Makefile.am
#	deleted:    m4/introspection.m4
#	modified:   m4/libtool.m4
#	modified:   m4/ltoptions.m4
#	modified:   m4/ltversion.m4
#

what means that autopoint generated almost all of them back.
Comment 1
Mateusz Jończyk  Feb 14 2014 17:41:48 UTC
I know that /m4 is in the .gitignore, but some files there were added manually (git add ...) and so in their case .gitignore is ignored.