-
-
Notifications
You must be signed in to change notification settings - Fork 934
Calling repo.index.add('DIR_SYMLINK') adds contents of symlinked directory, not symlink #302
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
Comments
I am able to reproduce the issue, and am working on a fix. |
Please feel free to try the latest master, which contains a fix for the issue at hand. Thanks for letting me know, the issue description was very helpful indeed. |
You can watch the development stream on youtube.
|
Hi Byron! Thanks for taking on this issue so quickly. Unfortunately this does not seem to resolve my issue. As you assumed, i am on the latest GitPython (now 0.3.6) and am on Python 3. As you also (correctly) assumed, the gal19 folder is a 'SECTION' and the random hash is the symlink to the directory. Now, with a fully committed git repo, i've manually added a symlink to a directory again. This time i've just used GitPython in the interactive python shell. Here are the commands and their responses:
As you can see in the last line, the same result has occurred as the original bug description. Below is the git status which illustrates this better.
I'm not sure what other information i could provide, but feel free to request anything you'd think would help! |
If you are using GitPython v0.3.6, you are not using the version that contains the fix. The latter is only to be found on github - if you grab the latest master, you should be fine indeed. Would you try again and let me know ? Thank you |
Oh thank you, i had thought i had managed to acquire the latest version from github. I am now on 1.0.1 and it works! Thank you very much :) |
I have a git repo that i'm using in a pretty roundabout way. Basically i have a
repo/master
directory which stores a bunch of folders that have content in them. Then i have somerepo/SECTION
folders. To identify where each piece of content goes, i symlink the directory to the section it belongs in. Callinggit add
on the symlink directly adds the symlink, and not the content of the linked directory. After initializing the repo with GitPython callingrepo.index.add('SECTION/DIR_SYMLINK')
results in all of the items from the folder being added as if DIR_SYMLINK were a folder, but does not add its folder. See git output below.After a
git reset HEAD
andgit add gal19/117a76a47d475c3e9866701d24302a45
this is the git status:The text was updated successfully, but these errors were encountered: