Created
March 28, 2020 09:45
-
-
Save fleutot/f7b0f0c21b9819c95ad833859691985e to your computer and use it in GitHub Desktop.
Shell commands to illustrate issue with git clean filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~/tmp | |
| mkdir cleansmudge | |
| cd cleansmudge | |
| git init | |
| echo content > file.txt | |
| echo "*.txt filter=autoformat" > .git/info/attributes | |
| echo "[filter \"autoformat\"] | |
| clean = date >> ~/tmp/filteroutput.log | |
| smudge = cat" >> .git/config | |
| # After setting the filter, run 'tail -f ~/tmp/filteroutput.log' in another term. | |
| git add file.txt | |
| git commit -m"Initial commit" | |
| git checkout -b b1 | |
| echo row2 >> file.txt | |
| less file.txt |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result: at every new prompt, two new dates appear in
~/tmp/filteroutput.log. I wonder if the git part of my prompt is the issue.