You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nick Bargnesi edited this page Jan 30, 2016
·
1 revision
What
A fork of Git used to place entire Linux installs under version control.
Why
(as in, “Why the fork?”)
Upstream Git is unsuitable for this type of use. Checkout a modified file that Git is tracking, it is unlinked and recreated using the umask of the current user. Truncating preserves metadata. To see this in action, change the owning group on a file Git is tracking, make a modification, and check it out (effectively reverting the modification):
# ls -l
-rw-r--r-- 1 nick nick 2 Feb 8 13:15 test.txt
# chgrp users test.txt
# ls -l
-rw-r--r-- 1 nick users 1 Feb 8 13:18 test.txt
# echo > test.txt
# git ls-files --modified
test.txt
# git checkout test.txt
# ls -l
-rw-r--r-- 1 nick nick 2 Feb 8 13:20 test.txt
How
One patch was all I needed to get 80% of the functionality I was looking for. In the previous example, Git instead truncates test.txt rather than removing it, then writes its contents. Metadata is preserved.