Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

submodules cause: Failed to chdir(../../../ #54

Closed
AD7six opened this issue May 15, 2012 · 7 comments
Closed

submodules cause: Failed to chdir(../../../ #54

AD7six opened this issue May 15, 2012 · 7 comments

Comments

@AD7six
Copy link

AD7six commented May 15, 2012

When using tig with submodules created with the current version of git the following behavior is observed:

[10:55][/tmp]$ mkdir example
[10:55][/tmp]$ cd example/
[10:55][/tmp/example]$ git init
Initialized empty Git repository in /tmp/example/.git/
[10:56][/tmp/example]$ touch README.md
[10:56][/tmp/example]$ git add README.md
[10:56][/tmp/example]$ git commit -m "initial commit"
[master (root-commit) ceb3fb6] initial commit
0 files changed
create mode 100644 README.md
[10:56][/tmp/example(master)]$ git submodule add git://github.com/AD7six/mi.git mi
Cloning into 'mi'...
remote: Counting objects: 1415, done.
remote: Compressing objects: 100% (542/542), done.
remote: Total 1415 (delta 840), reused 1275 (delta 764)
Receiving objects: 100% (1415/1415), 416.41 KiB | 645 KiB/s, done.
Resolving deltas: 100% (840/840), done.
[10:56][/tmp/example(master)]$ cd mi/ 
[10:56][/tmp/example/mi(master)]$ tig
tig: Failed to chdir(../../../mi): No such file or directory
[10:57][/tmp/example/mi(master)]$ more mi/.git
gitdir: ../.git/modules/mi
[10:57][/tmp/example/mi(master)]$ tig --version
tig version 1.0
[10:57][/tmp/example/mi(master)]$ git --version
git version 1.7.10

The current version of git creates a config file in the submodule's .git location - whereas in the past it would be a complete .git folder (and tig would happily use that).

richo pushed a commit to richo/tig that referenced this issue May 17, 2012
When in a submodule, you first need to chdir into the git_dir, and then
use the value of "core.worktree" as a relative path.

In tig, it moves into the git_dir and then checks that cwd is still
availble, thus breaking the relative path.

Fixes jonas#54
jonas pushed a commit that referenced this issue May 19, 2012
When in a submodule, you first need to chdir into the git_dir, and then
use the value of "core.worktree" as a relative path.

In tig, it moves into the git_dir and then checks that cwd is still
availble, thus breaking the relative path.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
@axelson
Copy link

axelson commented May 20, 2012

Any idea when this will make it into a release? Since I use submodules extensively it is disrupting my workflow. I'll probably just run off of master for now though.

@richo
Copy link
Contributor

richo commented May 20, 2012

if you're on osx theres a HEAD build for tig in my homebrew repo, it
doesn't install docs though which I why I haven't submitted upstream.
On May 21, 2012 4:47 AM, "Jason Axelson" <
reply@reply.github.com>
wrote:

Any idea when this will make it into a release? Since I use submodules
extensively it is disrupting my workflow. I'll probably just run off of
master for now though.


Reply to this email directly or view it on GitHub:
#54 (comment)

@richo
Copy link
Contributor

richo commented May 20, 2012

@jonas
Copy link
Owner

jonas commented Aug 10, 2012

I plan to make a maintenance release soon. Anyway, the patch has been integrated into master, so will close.

@jonas jonas closed this as completed Aug 10, 2012
@MasseGuillaume
Copy link

Hey Jonas. I have the same issue

$ tig --version
tig version 1.0

I have a subdirectory submodule
created with git submodule add git@...git some/dir

@vivien
Copy link
Contributor

vivien commented Aug 19, 2013

@MasseGuillaume can you try with the latest version (tig 1.2) or master?

@jonas
Copy link
Owner

jonas commented Aug 20, 2013

Hi @MasseGuillaume, submodules are known to be supported in version 1.1 and master - and broken in 1.0 and 1.2 :( ... I plan to release a 1.2.1 sometime this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants