True, there's no problem before the attribute change, but there is
for commits between the attribute change and when the repository got
normalized (which can be a while with the current git).
Re: configuration option naming:
I've settled for core.normalizationPolicy, with the values
'strict' (default) for the behaviour requested by you and Jonathan,
and 'relaxed' for my initial behaviour.
Teaser:
$ git init foo
warning: templates not found /home/grubba/share/git-core/templates
Initialized empty Git repository in /tmp/grubba/foo/.git/
$ cd foo
$ cat >expanded-keywords
$Id: some id string $
$ git add expanded-keywords
$ git commit -m 'Initial commit.'
[master (root-commit) 755d1f6] Initial commit.
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 expanded-keywords
$ git status
# On branch master
nothing to commit (working directory clean)
$ cat >.gitattributes
* ident
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: expanded-keywords
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitattributes
no changes added to commit (use "git add" and/or "git commit -a")
$ git config core.normalizationPolicy relaxed
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitattributes
nothing added to commit but untracked files present (use "git add" to track)
$ git config core.normalizationPolicy strict
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: expanded-keywords
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitattributes
no changes added to commit (use "git add" and/or "git commit -a")
$ rm .gitattributes
$ git status
# On branch master
nothing to commit (working directory clean)
Which I believe matches all the behaviours that have been requested.
--
Henrik Grubbström grubba@grubba.org
Roxen Internet Software AB grubba@roxen.com