Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318598 - checkout from a local branch with symlink gives broken files instead of symlink
Summary: checkout from a local branch with symlink gives broken files instead of symlink
Status: CLOSED DUPLICATE of bug 354367
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 6 votes (vote)
Target Milestone: ---   Edit
Assignee: Christian Halstrick CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-01 09:21 EDT by zebulon CLA
Modified: 2013-04-10 08:40 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zebulon CLA 2010-07-01 09:21:46 EDT
Build Identifier:  20100617-1415

First, I manually made symlinks in a directory (from cli), then manually add them with git add and finally, make the commit from within eclipse with egit. Team > Commit ...
All this worked fine.

but when I wanted to switch local branches, I began to have errors with egit. which fails to switch branches.

Moreover if I switch to a another branch from cli with git checkout. And go back to my branch, the symlinks are not checkout as symlink with Egit but as files with one line with the name of the file pointed to by the symlink
if i use git I got no problme to get back the symlink



Reproducible: Always

Steps to Reproduce:
1. Create symlink
2. Add and commit them
3. Try to change branches. This will fail
4. Try to checkout the branches with symlink, Egit will make files with one line instead of symlink
Comment 1 Bart322omiej Fulanty CLA 2012-01-20 08:10:56 EST
I can confirm this behaviour still exists in EGit/JGit 1.2.0.201112221803-r - I've a repository which contains symlinks. Any operation causes symlinks to become regular files:
$ git status
# On branch xxx/yyy
nothing to commit (working directory clean)

from within eclipse's git exploring perspective I click commit on repo, and eclipse "detects" bazillion changes, which are symlinks converted to one-line-files, as the original poster said.
Comment 2 Mighdoll Mising name CLA 2012-05-06 23:45:48 EDT
It'd be great if eclipse git tooling was usable for any git repository.  

But as far as I can tell, eclipse git tooling is unusable for repositories with symlinks, because jgit doesn't support symlinks.   Symlinks work fine with console git, and so many git repositories do use symlinks, but can't use the eclipse git tooling.

I gather that that symlinks may have trouble with at least some windows file systems.  That policy is up to the repo maintainer, jgit shouldn't prevent use of repos with symlinks.

Whatever java implementation inconveniences used to be there (ant seems to just exec ln -s), should be gone for java7 at least (where there's a createSymbolicLink). 

+1 for supporting symlinks.
Comment 3 Pascal Maurel CLA 2012-10-25 06:04:03 EDT
I confirm this problem still exists in Egit 2.1.0 / Eclipse Galileo build id 201000218-1602 / Linux CentOS 5.6.

Symlinks manually commited using the cli are checked-out as regular files when using the eclipse/egit gui.

So +1 for supporting symlinks
Comment 4 Matthias Sohn CLA 2012-11-06 18:09:38 EST
JGit does not yet support symlinks

*** This bug has been marked as a duplicate of bug 354367 ***