{"thread":{"id":"17643","subject":"tool and worktree","startedAt":"2009-02-08T03:44:06Z","lastAt":"2009-02-09T03:23:24Z","messageCount":6,"participants":["bill lam","Jonas Fonseca","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"103686","messageId":"20090208034406.GB7230@b2j","threadId":"17643","inReplyTo":null,"subject":"tool and worktree","fromName":"bill lam","fromEmail":"cbill.lam@gmail.com","sentAt":"2009-02-08T03:44:06Z","receivedAt":"2009-02-08T03:44:06Z","isPatch":false,"sender":{"key":"cbill.lam@gmail.com","avatar":null},"body":"I track /etc using a config\n\n[core]\n\trepositoryformatversion = 0\n\tfilemode = true\n\tbare = false\n\tworktree = /etc\n\tlogAllRefUpdates = true\n\texcludesfile =\n\nBut that can not be handled by tools,\n\ngit gui : cannot use funny .git directory .\ntig : status view said, The status view requires a working tree\n\nCan these be improved?\n \n-- \nregards,\n====================================================\nGPG key 1024D/4434BAB3 2008-08-24\ngpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n唐詩314 王昌齡  長信怨\n    奉帚平明金殿開  且將團扇共徘徊  玉顏不及寒鴉色  猶帶昭陽日影來\n"},{"id":"103707","messageId":"2c6b72b30902080147u61412b04w24baa0e5fdc29584@mail.gmail.com","threadId":"17643","inReplyTo":"20090208034406.GB7230@b2j","subject":"Re: tool and worktree","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2009-02-08T09:47:48Z","receivedAt":"2009-02-08T09:47:48Z","isPatch":false,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Sun, Feb 8, 2009 at 04:44, bill lam <cbill.lam@gmail.com> wrote:\n> I track /etc using a config\n>\n> [core]\n>        repositoryformatversion = 0\n>        filemode = true\n>        bare = false\n>        worktree = /etc\n>        logAllRefUpdates = true\n>        excludesfile =\n>\n> But that can not be handled by tools,\n>\n> tig : status view said, The status view requires a working tree\n\nYes, on startup, tig checks git-rev-parse --is-inside-work-tree and\ndisables things like the status view if it is false. I don't know how\nmuch work it would be to start using core.worktree. It might be as\nsimple as setting the GIT_DIR environment to getcwd() + output of\ngit-rev-parse --git-dir and then chdir() to core.worktree.\n\n-- \nJonas Fonseca\n"},{"id":"103770","messageId":"20090208192528.GC30557@spearce.org","threadId":"17643","inReplyTo":"20090208034406.GB7230@b2j","subject":"Re: tool and worktree","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-02-08T19:25:28Z","receivedAt":"2009-02-08T19:25:28Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"bill lam <cbill.lam@gmail.com> wrote:\n> I track /etc using a config\n> \n> [core]\n> \trepositoryformatversion = 0\n> \tfilemode = true\n> \tbare = false\n> \tworktree = /etc\n> \tlogAllRefUpdates = true\n> \texcludesfile =\n> \n> But that can not be handled by tools,\n> \n> git gui : cannot use funny .git directory .\n\nIf someone sends patches for git-gui, maybe.  This use case of\ndifferent repository and worktree isn't very common for git-gui\nso it doesn't support it.\n\nOn Windows with some versions of Tcl/Tk I've had trouble in the\npast with Git finding the repository when forked out of the wish\nprocess.  To work around it I just required that the repository\nbe in \".git\".\n\nHave you tried making /etc/.git a symlink to the real repository?\n\nBTW, tracking /etc/ in git won't track permissions and ownership\nso restoring /etc from git isn't enough on its own.  Usually I\nuse some sort of shell script to copy /etc to another location\nand check it into git, and a different script to go the other way,\nwith that script handling mode and ownership as it goes.\n\n-- \nShawn.\n"},{"id":"103799","messageId":"2c6b72b30902081717q35fd4ba0k6ff5b1be8cd5ef2c@mail.gmail.com","threadId":"17643","inReplyTo":"2c6b72b30902080147u61412b04w24baa0e5fdc29584@mail.gmail.com","subject":"Re: tool and worktree","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2009-02-09T01:17:50Z","receivedAt":"2009-02-09T01:17:50Z","isPatch":false,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Sun, Feb 8, 2009 at 10:47, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:\n> It might be as\n> simple as setting the GIT_DIR environment to getcwd() + output of\n> git-rev-parse --git-dir and then chdir() to core.worktree.\n\nI have pushed a lightly tested patch that does something like this ...\n\n-- \nJonas Fonseca\n"},{"id":"103807","messageId":"20090209021508.GA7599@b2j","threadId":"17643","inReplyTo":"2c6b72b30902081717q35fd4ba0k6ff5b1be8cd5ef2c@mail.gmail.com","subject":"Re: tool and worktree","fromName":"bill lam","fromEmail":"cbill.lam@gmail.com","sentAt":"2009-02-09T02:15:08Z","receivedAt":"2009-02-09T02:15:08Z","isPatch":false,"sender":{"key":"cbill.lam@gmail.com","avatar":null},"body":"On Mon, 09 Feb 2009, Jonas Fonseca wrote:\n> On Sun, Feb 8, 2009 at 10:47, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:\n> > It might be as\n> > simple as setting the GIT_DIR environment to getcwd() + output of\n> > git-rev-parse --git-dir and then chdir() to core.worktree.\n> \n> I have pushed a lightly tested patch that does something like this ...\n\nThanks. Now the status view works.\n\nSince /etc contains both public and private files.  When browsing the\nuntracked files in the status view, for files that without read\npermission, eg the shadow passwd file, the lower pane displays the\ncontent of the last readable file.  Could it clear the content or just\nfilter and display only files with read permission for the untracked\nfiles?\n\n-- \nregards,\n====================================================\nGPG key 1024D/4434BAB3 2008-08-24\ngpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n唐詩215 李商隱  無題\n    相見時難別亦難  東風無力百花殘  春蠶到死絲方盡  蠟炬成灰淚始乾\n    曉鏡但愁雲鬢改  夜吟應覺月光寒  蓬萊此去無多路  青鳥殷勤為探看\n"},{"id":"103810","messageId":"2c6b72b30902081923g17779b10gc36fca528beb1976@mail.gmail.com","threadId":"17643","inReplyTo":"20090209021508.GA7599@b2j","subject":"Re: tool and worktree","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2009-02-09T03:23:24Z","receivedAt":"2009-02-09T03:23:24Z","isPatch":false,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"2009/2/9 bill lam <cbill.lam@gmail.com>:\n> Since /etc contains both public and private files.  When browsing the\n> untracked files in the status view, for files that without read\n> permission, eg the shadow passwd file, the lower pane displays the\n> content of the last readable file.  Could it clear the content or just\n> filter and display only files with read permission for the untracked\n> files?\n\nIt now closes the lower pane and displays the reason why it failed to\nload the file using strerror().\n\n-- \nJonas Fonseca\n"}]}