Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Calling repo.index.add('DIR_SYMLINK') adds contents of symlinked directory, not symlink #302

Closed
@ben-en

Description

@ben-en

I have a git repo that i'm using in a pretty roundabout way. Basically i have arepo/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.

On branch masterChanges to be committed:  (use "git reset HEAD <file>..." to unstage)        new file:   gal19/117a76a47d475c3e9866701d24302a45/image0000.jpg        new file:   gal19/117a76a47d475c3e9866701d24302a45/image0001.png        ...        new file:   gal19/117a76a47d475c3e9866701d24302a45/image0035.jpg        new file:   gal19/117a76a47d475c3e9866701d24302a45/image0036.jpg        new file:   gal19/117a76a47d475c3e9866701d24302a45/index.html        new file:   gal19/117a76a47d475c3e9866701d24302a45/info.jsonUntracked files:  (use "git add <file>..." to include in what will be committed)        gal19/117a76a47d475c3e9866701d24302a45

After agit reset HEAD andgit add gal19/117a76a47d475c3e9866701d24302a45 this is the git status:

On branch masterChanges to be committed:  (use "git reset HEAD <file>..." to unstage)        new file:   gal19/117a76a47d475c3e9866701d24302a45

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp