* [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
@ 2009-03-29 22:30 Markus Heidelberg
2009-03-30 0:43 ` Johannes Schindelin
0 siblings, 1 reply; 10+ messages in thread
From: Markus Heidelberg @ 2009-03-29 22:30 UTC (permalink / raw)
To: msysgit; +Cc: git, Shawn O. Pearce
Starting git-gui via Windows Explorer shell extension caused problems
when not started from the project directory, but from a directory within
the project: starting the Explorer from the git-gui menu "Explore
Working Copy" didn't work then.
Starting git-gui via Explorer shell extension from the .git directory
didn't work at all.
To make these things possible, "cd .." until we see .git/
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
windows/git-gui.sh | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/windows/git-gui.sh b/windows/git-gui.sh
index 53c3a94..16c4a2a 100644
--- a/windows/git-gui.sh
+++ b/windows/git-gui.sh
@@ -4,6 +4,9 @@ exec wish "$0" -- "$@"
if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
cd [lindex $argv 1]
+ while { ![file isdirectory .git] } {
+ cd ..
+ }
set argv [lrange $argv 2 end]
incr argc -2
}
--
1.6.2.1.409.gad7bf.dirty
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-29 22:30 [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust Markus Heidelberg
@ 2009-03-30 0:43 ` Johannes Schindelin
2009-03-30 6:51 ` Markus Heidelberg
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Schindelin @ 2009-03-30 0:43 UTC (permalink / raw)
To: Markus Heidelberg; +Cc: msysgit, git, Shawn O. Pearce
Hi,
On Mon, 30 Mar 2009, Markus Heidelberg wrote:
> Starting git-gui via Windows Explorer shell extension caused problems
> when not started from the project directory, but from a directory within
> the project: starting the Explorer from the git-gui menu "Explore
> Working Copy" didn't work then.
>
> Starting git-gui via Explorer shell extension from the .git directory
> didn't work at all.
>
> To make these things possible, "cd .." until we see .git/
How does this interact with GIT_WORK_TREE? And with bare repositories?
Ciao,
Dscho
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 0:43 ` Johannes Schindelin
@ 2009-03-30 6:51 ` Markus Heidelberg
2009-03-30 8:03 ` Johannes Schindelin
2009-03-30 14:15 ` Shawn O. Pearce
0 siblings, 2 replies; 10+ messages in thread
From: Markus Heidelberg @ 2009-03-30 6:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: msysgit, git, Shawn O. Pearce
Johannes Schindelin, 30.03.2009:
> Hi,
>
> On Mon, 30 Mar 2009, Markus Heidelberg wrote:
>
> > Starting git-gui via Windows Explorer shell extension caused problems
> > when not started from the project directory, but from a directory within
> > the project: starting the Explorer from the git-gui menu "Explore
> > Working Copy" didn't work then.
> >
> > Starting git-gui via Explorer shell extension from the .git directory
> > didn't work at all.
> >
> > To make these things possible, "cd .." until we see .git/
>
> How does this interact with GIT_WORK_TREE?
Not sure. What's the use case for a globally set GIT_WORK_TREE, how is
it used?
> And with bare repositories?
Git-gui doesn't seem to work with bare repositories, I get
"Cannot use funny .git directory: ."
when started on the command line.
But I just noticed, that it will obviously "cd .." forever, if no .git/
was found. Somehow the root directory has to be catched.
Markus
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 6:51 ` Markus Heidelberg
@ 2009-03-30 8:03 ` Johannes Schindelin
2009-03-30 14:14 ` Shawn O. Pearce
2009-03-30 20:20 ` Markus Heidelberg
2009-03-30 14:15 ` Shawn O. Pearce
1 sibling, 2 replies; 10+ messages in thread
From: Johannes Schindelin @ 2009-03-30 8:03 UTC (permalink / raw)
To: Markus Heidelberg; +Cc: msysgit, git, Shawn O. Pearce
Hi,
On Mon, 30 Mar 2009, Markus Heidelberg wrote:
> Johannes Schindelin, 30.03.2009:
>
> > On Mon, 30 Mar 2009, Markus Heidelberg wrote:
> >
> > > Starting git-gui via Windows Explorer shell extension caused
> > > problems when not started from the project directory, but from a
> > > directory within the project: starting the Explorer from the git-gui
> > > menu "Explore Working Copy" didn't work then.
> > >
> > > Starting git-gui via Explorer shell extension from the .git
> > > directory didn't work at all.
> > >
> > > To make these things possible, "cd .." until we see .git/
> >
> > How does this interact with GIT_WORK_TREE?
>
> Not sure. What's the use case for a globally set GIT_WORK_TREE, how is
> it used?
You can call git gui with a non-global GIT_WORK_TREE by something like
this, even on Windows (which your patch does not special case, anyway):
$ GIT_WORK_TREE=/bla/blub git gui
> > And with bare repositories?
>
> Git-gui doesn't seem to work with bare repositories, I get
> "Cannot use funny .git directory: ."
> when started on the command line.
Oh? I thought there was some discussion recently that was explicitely
about git gui with bare repositories. But I have to time-share my brain
these days, so my memory might well show some bit flips.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 8:03 ` Johannes Schindelin
@ 2009-03-30 14:14 ` Shawn O. Pearce
2009-03-30 20:20 ` Markus Heidelberg
1 sibling, 0 replies; 10+ messages in thread
From: Shawn O. Pearce @ 2009-03-30 14:14 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Markus Heidelberg, msysgit, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Mon, 30 Mar 2009, Markus Heidelberg wrote:
> > Johannes Schindelin, 30.03.2009:
> > > And with bare repositories?
> >
> > Git-gui doesn't seem to work with bare repositories, I get
> > "Cannot use funny .git directory: ."
> > when started on the command line.
>
> Oh? I thought there was some discussion recently that was explicitely
> about git gui with bare repositories. But I have to time-share my brain
> these days, so my memory might well show some bit flips.
At best, you can get blame to run on a bare repository, but that's
it. Most of the git-gui UI is designed for viewing the status of
the working tree, or manipulating the index and/or files in that
working tree. There are fairly good reasons why it doesn't work
on a bare repository.
Of course, fetch/push would be fine a bare repository, but I consider
that use case to be not worth the cost it would be in code to make
it possible. We'd have to if out huge blocks of git-gui code,
maybe 80%+ of git-gui.sh, and that script is already hairy enough
(3477 lines).
--
Shawn.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 6:51 ` Markus Heidelberg
2009-03-30 8:03 ` Johannes Schindelin
@ 2009-03-30 14:15 ` Shawn O. Pearce
2009-03-30 22:49 ` Giuseppe Bilotta
2009-03-30 22:49 ` Giuseppe Bilotta
1 sibling, 2 replies; 10+ messages in thread
From: Shawn O. Pearce @ 2009-03-30 14:15 UTC (permalink / raw)
To: Markus Heidelberg; +Cc: Johannes Schindelin, msysgit, git
Markus Heidelberg <markus.heidelberg@web.de> wrote:
>
> But I just noticed, that it will obviously "cd .." forever, if no .git/
> was found. Somehow the root directory has to be catched.
Yup. I'm dropping this patch for now because of this issue, but
I'll look at it again if its addressed in another version. :-)
--
Shawn.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 8:03 ` Johannes Schindelin
2009-03-30 14:14 ` Shawn O. Pearce
@ 2009-03-30 20:20 ` Markus Heidelberg
1 sibling, 0 replies; 10+ messages in thread
From: Markus Heidelberg @ 2009-03-30 20:20 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: msysgit, git, Shawn O. Pearce
Johannes Schindelin, 30.03.2009:
> Hi,
>
> On Mon, 30 Mar 2009, Markus Heidelberg wrote:
>
> > Johannes Schindelin, 30.03.2009:
> >
> > > On Mon, 30 Mar 2009, Markus Heidelberg wrote:
> > >
> > > > Starting git-gui via Windows Explorer shell extension caused
> > > > problems when not started from the project directory, but from a
> > > > directory within the project: starting the Explorer from the git-gui
> > > > menu "Explore Working Copy" didn't work then.
> > > >
> > > > Starting git-gui via Explorer shell extension from the .git
> > > > directory didn't work at all.
> > > >
> > > > To make these things possible, "cd .." until we see .git/
> > >
> > > How does this interact with GIT_WORK_TREE?
> >
> > Not sure. What's the use case for a globally set GIT_WORK_TREE, how is
> > it used?
>
> You can call git gui with a non-global GIT_WORK_TREE by something like
> this, even on Windows (which your patch does not special case, anyway):
>
> $ GIT_WORK_TREE=/bla/blub git gui
The patch only affected git-gui started via Explorer, i.e. invoked with
--working-dir. But it's right that core.worktree can be set in the
repository.
However, git-gui currently doesn't support the gitdir outside of the
working directory, but it may not be wise to build up on this!?
Hmm, more complicated than I initially thought.
Markus
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 14:15 ` Shawn O. Pearce
2009-03-30 22:49 ` Giuseppe Bilotta
@ 2009-03-30 22:49 ` Giuseppe Bilotta
1 sibling, 0 replies; 10+ messages in thread
From: Giuseppe Bilotta @ 2009-03-30 22:49 UTC (permalink / raw)
To: Shawn O. Pearce, msysgit, git, Markus Heidelberg
On Monday 30 March 2009 16:15, Shawn O. Pearce wrote:
> Markus Heidelberg <markus.heidelberg@web.de> wrote:
>>
>> But I just noticed, that it will obviously "cd .." forever, if no .git/
>> was found. Somehow the root directory has to be catched.
>
> Yup. I'm dropping this patch for now because of this issue, but
> I'll look at it again if its addressed in another version. :-)
I have a couple of pending patches to fix git gui handling of repositories,
including support for nonstandard repository locations and bare repositories.
You can find them at
http://git.oblomov.eu/git
and specifically
http://git.oblomov.eu/git/patches/b2e4c32e13df1b7f18e7b4a9f746650471a3122e..a63526bf3238cf25d9a5521f7ee35ed1bd11cb16
I got distracted by real-life issue and forgot to resend them. I'll try
to find the time again later on this week. I'm not entirely sure these
solve Markus' problem though.
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 14:15 ` Shawn O. Pearce
@ 2009-03-30 22:49 ` Giuseppe Bilotta
2009-03-31 23:59 ` Markus Heidelberg
2009-03-30 22:49 ` Giuseppe Bilotta
1 sibling, 1 reply; 10+ messages in thread
From: Giuseppe Bilotta @ 2009-03-30 22:49 UTC (permalink / raw)
To: Shawn O. Pearce, msysgit, git, Markus Heidelberg
On Monday 30 March 2009 16:15, Shawn O. Pearce wrote:
> Markus Heidelberg <markus.heidelberg@web.de> wrote:
>>
>> But I just noticed, that it will obviously "cd .." forever, if no .git/
>> was found. Somehow the root directory has to be catched.
>
> Yup. I'm dropping this patch for now because of this issue, but
> I'll look at it again if its addressed in another version. :-)
I have a couple of pending patches to fix git gui handling of repositories,
including support for nonstandard repository locations and bare repositories.
You can find them at
http://git.oblomov.eu/git
and specifically
http://git.oblomov.eu/git/patches/b2e4c32e13df1b7f18e7b4a9f746650471a3122e..a63526bf3238cf25d9a5521f7ee35ed1bd11cb16
I got distracted by real-life issue and forgot to resend them. I'll try
to find the time again later on this week. I'm not entirely sure these
solve Markus' problem though.
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
2009-03-30 22:49 ` Giuseppe Bilotta
@ 2009-03-31 23:59 ` Markus Heidelberg
0 siblings, 0 replies; 10+ messages in thread
From: Markus Heidelberg @ 2009-03-31 23:59 UTC (permalink / raw)
To: Giuseppe Bilotta; +Cc: Shawn O. Pearce, msysgit, git
Giuseppe Bilotta, 31.03.2009:
> On Monday 30 March 2009 16:15, Shawn O. Pearce wrote:
>
> > Markus Heidelberg <markus.heidelberg@web.de> wrote:
> >>
> >> But I just noticed, that it will obviously "cd .." forever, if no .git/
> >> was found. Somehow the root directory has to be catched.
> >
> > Yup. I'm dropping this patch for now because of this issue, but
> > I'll look at it again if its addressed in another version. :-)
>
> I have a couple of pending patches to fix git gui handling of repositories,
> including support for nonstandard repository locations and bare repositories.
> You can find them at
>
> http://git.oblomov.eu/git
>
> and specifically
>
> http://git.oblomov.eu/git/patches/b2e4c32e13df1b7f18e7b4a9f746650471a3122e..a63526bf3238cf25d9a5521f7ee35ed1bd11cb16
I just tried these two patches on Windows (Uhh, Qemu is too slow for
this, I have to setup something else).
> I got distracted by real-life issue and forgot to resend them. I'll try
> to find the time again later on this week. I'm not entirely sure these
> solve Markus' problem though.
Starting git-gui via Explorer "Git GUI Here" is now possible from the
.git/ directory with your patches, but it doesn't show the working tree
status. Also "Explore Working Copy" wants to open the .git directory
then instead of the project directory (I say "want" because of the issue
I just sent a patch out). It seems to be as non-functional as if you run
"git status" inside of .git/
Markus
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-04-01 0:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 22:30 [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust Markus Heidelberg
2009-03-30 0:43 ` Johannes Schindelin
2009-03-30 6:51 ` Markus Heidelberg
2009-03-30 8:03 ` Johannes Schindelin
2009-03-30 14:14 ` Shawn O. Pearce
2009-03-30 20:20 ` Markus Heidelberg
2009-03-30 14:15 ` Shawn O. Pearce
2009-03-30 22:49 ` Giuseppe Bilotta
2009-03-31 23:59 ` Markus Heidelberg
2009-03-30 22:49 ` 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).