git/list[1] front-page[2] threads[3] people[4] search[5] about
 

filter clean leaves uncommitted file

From
SWshawn wilson <ag4ve.us@gmail.com>
Date
Feb 20, 2014, 04:46 UTC
Message-ID
<CAH_OBieMx3tv3Ld74cChEvFsG3NNb-cPmBLDjsAK_-OLVkC+5w@mail.gmail.com>

So, I want a way of sharing parts of a gitconfig organizationally, so I change and comment out some parts with a filter:

[filter "gitconfig-rmuser"]
  clean = sed -e \"s/^\\( *email =\\).*/\\1 <email address>/\" -e
\"s/^\\( *name =\\).*/\\1 <real name>/\" -e \"s/^\\( *signingkey
=\\).*/\\1 <gpg key>/\"
And then:
$ cat .gitattributes
* filter=ident-line
gitconfig filter=gitconfig-rmuser

Which works. The only problem is that if I change it again after the commit, I get: $ git status # HEAD detached at e872204 # Changes not staged for commit: # modified: gitconfig # no changes added to commit $ git diff gitconfig $

So the repo remains dirty and I can't do anything with it.
Message 1 of 1 in “filter clean leaves uncommitted file”
  1. shawn wilsonFeb 20, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.