git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] [git-gui] "Open existing repository" with submodules
@ 2015-03-06 16:21 Remi Rampin
  2015-03-06 16:21 ` [PATCH 1/2] Fixes chooser not accepting gitfiles Remi Rampin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Remi Rampin @ 2015-03-06 16:21 UTC (permalink / raw)
  To: git, patthoyts; +Cc: Remi Rampin

I'm resubmitting this patch series, hopefully someone takes notice
this time.

The GUI cannot currently open a submodule because it fails to recognize
the git link file (regular .git file with content "gitdir: ...").

Previous thread:
http://thread.gmane.org/gmane.comp.version-control.git/263199

I'm really not sure if/how git-gui is maintained but I do hope somebody
cares about this component, that is still AFAIK distributed with Git.

Remi Rampin (2):
  Fixes chooser not accepting gitfiles
  Makes chooser set 'gitdir' to the resolved path

 lib/choose_repository.tcl | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

-- 
1.9.5.msysgit.0

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [git-gui] bug report: "Open existing repository" dialog fails on submodules
@ 2015-02-02 15:59 Rémi Rampin
  2015-02-05 16:20 ` [PATCH 0/2] gitfile support git git-gui Remi Rampin
  0 siblings, 1 reply; 5+ messages in thread
From: Rémi Rampin @ 2015-02-02 15:59 UTC (permalink / raw)
  To: Chris Packham, Pat Thoyts; +Cc: GIT

2015-02-02 3:41 UTC-05:00, Chris Packham <judge.packham@gmail.com>:
> [...]
> But it actually looks like git rev-parse --resolve-git-dir $path needs
> to be run inside a git repository _any_ git repository, which seems a
> bit backwards to me.
> [...]

Indeed, looking at git-rev-parse(1), the correct option might be
--show-toplevel, which will print the cwd if it is the top-level of a
non-bare repository:

    cd $candidate && test $(git rev-parse --show-toplevel) = $candidate

or

    test $(git --git-dir=$candidate rev-parse --show-toplevel) = $candidate

Of course Git will resolve symlinks at this point, so $candidate has
to be resolved first for the equality to make sense.

Other solution is to parse the "gitdir: ..." format and recurse, which
is not exactly hard (provided you speak Tcl).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-12 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-06 16:21 [PATCH 0/2] [git-gui] "Open existing repository" with submodules Remi Rampin
2015-03-06 16:21 ` [PATCH 1/2] Fixes chooser not accepting gitfiles Remi Rampin
2015-03-06 16:21 ` [PATCH 2/2] Makes chooser set 'gitdir' to the resolved path Remi Rampin
2015-03-12 21:57 ` [PATCH 0/2] [git-gui] "Open existing repository" with submodules Pat Thoyts
  -- strict thread matches above, loose matches on Subject: below --
2015-02-02 15:59 [git-gui] bug report: "Open existing repository" dialog fails on submodules Rémi Rampin
2015-02-05 16:20 ` [PATCH 0/2] gitfile support git git-gui Remi Rampin
2015-02-05 16:20   ` [PATCH 2/2] Makes chooser set 'gitdir' to the resolved path Remi Rampin

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).