* tool and worktree
@ 2009-02-08 3:44 bill lam
2009-02-08 9:47 ` Jonas Fonseca
2009-02-08 19:25 ` Shawn O. Pearce
0 siblings, 2 replies; 7+ messages in thread
From: bill lam @ 2009-02-08 3:44 UTC (permalink / raw)
To: git
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?
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩314 王昌齡 長信怨
奉帚平明金殿開 且將團扇共徘徊 玉顏不及寒鴉色 猶帶昭陽日影來
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tool and worktree
2009-02-08 3:44 tool and worktree bill lam
@ 2009-02-08 9:47 ` Jonas Fonseca
2009-02-09 1:17 ` Jonas Fonseca
2009-02-08 19:25 ` Shawn O. Pearce
1 sibling, 1 reply; 7+ messages in thread
From: Jonas Fonseca @ 2009-02-08 9:47 UTC (permalink / raw)
To: git
On Sun, Feb 8, 2009 at 04:44, bill lam <cbill.lam@gmail.com> wrote:
> 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,
>
> 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.
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tool and worktree
2009-02-08 3:44 tool and worktree bill lam
2009-02-08 9:47 ` Jonas Fonseca
@ 2009-02-08 19:25 ` Shawn O. Pearce
1 sibling, 0 replies; 7+ messages in thread
From: Shawn O. Pearce @ 2009-02-08 19:25 UTC (permalink / raw)
To: bill lam; +Cc: git
bill lam <cbill.lam@gmail.com> wrote:
> 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 .
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.
--
Shawn.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tool and worktree
2009-02-08 9:47 ` Jonas Fonseca
@ 2009-02-09 1:17 ` Jonas Fonseca
2009-02-09 2:15 ` bill lam
0 siblings, 1 reply; 7+ messages in thread
From: Jonas Fonseca @ 2009-02-09 1:17 UTC (permalink / raw)
To: git
On Sun, Feb 8, 2009 at 10:47, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:
> 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.
I have pushed a lightly tested patch that does something like this ...
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tool and worktree
2009-02-09 1:17 ` Jonas Fonseca
@ 2009-02-09 2:15 ` bill lam
2009-02-09 3:23 ` Jonas Fonseca
0 siblings, 1 reply; 7+ messages in thread
From: bill lam @ 2009-02-09 2:15 UTC (permalink / raw)
To: Jonas Fonseca; +Cc: git
On Mon, 09 Feb 2009, Jonas Fonseca wrote:
> On Sun, Feb 8, 2009 at 10:47, Jonas Fonseca <jonas.fonseca@gmail.com> wrote:
> > 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.
>
> 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?
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩215 李商隱 無題
相見時難別亦難 東風無力百花殘 春蠶到死絲方盡 蠟炬成灰淚始乾
曉鏡但愁雲鬢改 夜吟應覺月光寒 蓬萊此去無多路 青鳥殷勤為探看
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tool and worktree
2009-02-09 2:15 ` bill lam
@ 2009-02-09 3:23 ` Jonas Fonseca
0 siblings, 0 replies; 7+ messages in thread
From: Jonas Fonseca @ 2009-02-09 3:23 UTC (permalink / raw)
To: Jonas Fonseca, git
2009/2/9 bill lam <cbill.lam@gmail.com>:
> 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().
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tool and worktree
2009-02-09 16:19 [RFC/RFH] Fun things with git-notes, or: patch tracking backwards SZEDER Gábor
@ 2009-02-09 17:49 ` Giuseppe Bilotta
0 siblings, 0 replies; 7+ messages in thread
From: Giuseppe Bilotta @ 2009-02-09 17:49 UTC (permalink / raw)
To: git, git; +Cc: Giuseppe Bilotta, Shawn O. Pearce, bill lam
On Sunday 08 February 2009 20:25, Shawn O. Pearce wrote:
> bill lam <cbill.lam@gmail.com> wrote:
>> 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 .
>
> 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.
I came across the same problem. I also sent a tentative patchset to
solve the problem about 12 hours ago:
http://thread.gmane.org/gmane.comp.version-control.git/109035
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-09 17:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-08 3:44 tool and worktree bill lam
2009-02-08 9:47 ` Jonas Fonseca
2009-02-09 1:17 ` Jonas Fonseca
2009-02-09 2:15 ` bill lam
2009-02-09 3:23 ` Jonas Fonseca
2009-02-08 19:25 ` Shawn O. Pearce
-- strict thread matches above, loose matches on Subject: below --
2009-02-09 16:19 [RFC/RFH] Fun things with git-notes, or: patch tracking backwards SZEDER Gábor
2009-02-09 17:49 ` tool and worktree Giuseppe Bilotta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).