tool and worktree
I track /etc using a config
[core]
repositoryformatversion = 0
filemode = true
bare = false
worktree = /etc
logAllRefUpdates = true
excludesfile =
But that can not be handled by tools,
git gui : cannot use funny .git directory .
tig : status view said, The status view requires a working tree
Can these be improved?
Signature · 6 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩314 王昌齡 長信怨
奉帚平明金殿開 且將團扇共徘徊 玉顏不及寒鴉色 猶帶昭陽日影來Quoted 10 lines · bill lam
I track /etc using a config
[core]
repositoryformatversion = 0
filemode = true
bare = false
worktree = /etc
logAllRefUpdates = true
excludesfile =
Quoted 3 lines
But that can not be handled by tools,
git gui : cannot use funny .git directory .
If someone sends patches for git-gui, maybe. This use case of different repository and worktree isn't very common for git-gui so it doesn't support it.
On Windows with some versions of Tcl/Tk I've had trouble in the past with Git finding the repository when forked out of the wish process. To work around it I just required that the repository be in ".git".
Have you tried making /etc/.git a symlink to the real repository?
BTW, tracking /etc/ in git won't track permissions and ownership so restoring /etc from git isn't enough on its own. Usually I use some sort of shell script to copy /etc to another location and check it into git, and a different script to go the other way, with that script handling mode and ownership as it goes.
Signature · 1 line
Shawn.
Quoted 10 lines · bill lam
I track /etc using a config
[core]
repositoryformatversion = 0
filemode = true
bare = false
worktree = /etc
logAllRefUpdates = true
excludesfile =
Quoted 3 lines
But that can not be handled by tools,
tig : status view said, The status view requires a working tree
Yes, on startup, tig checks git-rev-parse --is-inside-work-tree and disables things like the status view if it is false. I don't know how much work it would be to start using core.worktree. It might be as simple as setting the GIT_DIR environment to getcwd() + output of git-rev-parse --git-dir and then chdir() to core.worktree.
Signature · 1 line
Jonas Fonseca
Quoted 3 lines · Jonas Fonseca
It might be as
simple as setting theGIT_DIRenvironment togetcwd()+ output of git-rev-parse --git-dir and thenchdir()to core.worktree.
I have pushed a lightly tested patch that does something like this ...
Signature · 1 line
Jonas Fonseca
Quoted 6 lines · Jonas Fonseca
Quoted 3 lines · Jonas Fonseca
It might be as
simple as setting theGIT_DIRenvironment togetcwd()+ output of git-rev-parse --git-dir and thenchdir()to core.worktree.I have pushed a lightly tested patch that does something like this ...
Thanks. Now the status view works.
Since /etc contains both public and private files. When browsing the untracked files in the status view, for files that without read permission, eg the shadow passwd file, the lower pane displays the content of the last readable file. Could it clear the content or just filter and display only files with read permission for the untracked files?
Signature · 7 lines
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩215 李商隱 無題
相見時難別亦難 東風無力百花殘 春蠶到死絲方盡 蠟炬成灰淚始乾
曉鏡但愁雲鬢改 夜吟應覺月光寒 蓬萊此去無多路 青鳥殷勤為探看2009/2/9 bill lam <[email protected]>:
Quoted 6 lines
Since /etc contains both public and private files. When browsing the untracked files in the status view, for files that without read permission, eg the shadow passwd file, the lower pane displays the content of the last readable file. Could it clear the content or just filter and display only files with read permission for the untracked files?
It now closes the lower pane and displays the reason why it failed to load the file using strerror().
Signature · 1 line
Jonas Fonseca