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

Fix parsing of repo info, for case when current dir starting from dot #172

Conversation

azat
Copy link

@azat azat commented Jul 18, 2013

In this case command
$(git rev-parse --git-dir --is-inside-work-tree --show-cdup --show-prefix)
will print some thing like this:
{code}
/tig/.git
true
../
.started-from-dot/
{/code}

And after this in read_repo_info() it will overwrite "opt_cdup", by
"--show-prefix" value, and for example $(tig blame ../io.h) from
".started-from-dot" directory will fail, because of wrong opt_cdup.

In this case command
$(git rev-parse --git-dir --is-inside-work-tree --show-cdup --show-prefix)
will print some thing like this:
{code}
/tig/.git
true
../
.started-from-dot/
{/code}

And after this in read_repo_info() it will overwrite "opt_cdup", by
"--show-prefix" value, and for example $(tig blame ../io.h) from
".started-from-dot" directory will fail, because of wrong opt_cdup.
@azat
Copy link
Author

azat commented Jul 28, 2013

Any news for this one?

@jonas jonas closed this in 24b4734 Jul 28, 2013
@jonas
Copy link
Owner

jonas commented Jul 28, 2013

Hello @azat , thanks for reporting this and contributing a patch. I decided to refactor read_repo_info() to not rely on the order + output of the rev-parse options. Does this fix your issue?

@azat
Copy link
Author

azat commented Jul 29, 2013

Yep, thanks.

On Mon, Jul 29, 2013 at 3:56 AM, Jonas Fonseca notifications@github.comwrote:

Hello @azat https://github.com/azat , thanks for reporting this and
contributing a patch. I decided to refactor read_repo_info() to not rely on
the order + output of the rev-parse options. Does this fixes your issue?


Reply to this email directly or view it on GitHubhttps://github.com//pull/172#issuecomment-21693979
.

Respectfully
Azat Khuzhin

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

Successfully merging this pull request may close these issues.

None yet

2 participants