Skip to content

Conversation

@mihyaeru21
Copy link
Contributor

According to the git documentation, include.path is subject to tilde expansion.

You can include one config file from another by setting the special include.path variable to the name of the file to be included. The included file is expanded immediately, as if its contents had been found at the location of the include directive. If the value of the include.path variable is a relative path, the path is considered to be relative to the configuration file in which the include directive was found. _The value of include.path is subject to tilde expansion_: ~/ is expanded to the value of $HOME, and ~user/ to the specified user’s home directory. See below for examples.

So, I added to care code for tilde expansion.

@Byron
Copy link
Member

Byron commented Jul 6, 2015

Thank you.

Do you think it would be safer to just expand ~ if it is the first character ?

@ByronByron added this to the v1.0.2 - Fixes milestone Jul 6, 2015
@mihyaeru21
Copy link
ContributorAuthor

Yes.
I think using include_path.startswith('~') is safer than using '~' in include_path.
(e.g. zsh and bash expand ~/, but they doesn't expand /~)

I will fix it.
Thank you!

@Byron
Copy link
Member

Byron commented Jul 6, 2015

Cool, please leave a quick note here once it's done as I don't get notifications if a new commit comes in.
Thanks again.

@mihyaeru21
Copy link
ContributorAuthor

fixed!

Byron added a commit that referenced this pull request Jul 6, 2015
care tilde in include.path config
@ByronByron merged commit c5e4334 into gitpython-developers:masterJul 6, 2015
@Byron
Copy link
Member

Byron commented Jul 6, 2015

Thanks a lot !

@mihyaeru21
Copy link
ContributorAuthor

Thanks too!!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mihyaeru21@Byron