This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Because as of git 1.7.8 submodules do not contain .git folder but rather git link to $ROOT/.git/modules/... instead. Because it is a file and not a folder, Git support fails to recognize it as a separate module. Taken from git 1.7.8 relnotes: > When populating a new submodule directory with "git submodule init", > the $GIT_DIR metainformation directory for submodules is created inside > $GIT_DIR/modules/<name>/ directory of the superproject and referenced > via the gitfile mechanism. This is to make it possible to switch > between commits in the superproject that has and does not have the > submodule in the tree without re-cloning.
Addressing this is critical to the Git module being useful!
Yes, this behaviour was changed with GIT and so Git submodule support is broken with Netbeans. Highly recommended to fix this as soon as possible
Integrated into 'main-golden', will be available in build *201204030400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e2a69f8f89a3 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #209839 - Git fails to recognize git submodules as separate clones
This made a huge difference in NetBeans' Git usability. I now see proper history, in-editor change bars, and status for files managed by Git submodules. I do notice that things beyond this seems not to function as expected, though. For instance, I modified a file and Git and NetBeans agreed on that. I tried to revert the changes via both Revert and Checkout in NetBeans -- neither worked. The command line worked great, though. I'm happy using the command-line a fair amount, but I note that the critically important "explore from here" plug-in (http://plugins.netbeans.org/plugin/15619/explore-from-here) does not work in 7.2 right now. This makes hopping out to use the command line where needed a real pain.
Actually it's now clear that Explore from Here is only half-broken in 7.2. It works for folders but not individual files.
> I tried to revert the changes via both Revert and Checkout in NetBeans -- neither worked. The command line worked great, though. Works fine form me, i select a modified file from a submodule, and run Git -> Revert -> Revert Modifications... from its contextual menu and click on Revert. The file is reverted. > I note that the critically important "explore from here" plug-in (http://plugins.netbeans.org/plugin/15619/explore-from-here) does not work in 7.2 right now. This makes hopping out to use the command line where needed a real pain. I have no idea what you're talking about and what relation this 3rd party plugin has to this issue. I suggest you file a bug to their bug tracker. Marking this as fixed.
The only relation of the 3rd party module is that it is the only thing that makes it tolerable to hop out to the command-line where the IDE doesn't do the job. As for Revert and Checkout, I tried all possible options. NetBeans didn't show any attempted Git commands in the output, whereas it did for commands to list modifications, etc. It was like these UI options were no-ops -- apart from showing dialogs, that is. Things are much improved, but something still is not right.
Will (In reply to comment #3) > Integrated into 'main-golden', will be available in build *201204030400* on > http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) > Changeset: http://hg.netbeans.org/main-golden/rev/e2a69f8f89a3 > User: Ondrej Vrabec <ovrabec@netbeans.org> > Log: #209839 - Git fails to recognize git submodules as separate clones Will it find also their way into the next PHPStorm EAP?
This is printed into the output after Git -> Revert -> Revert Modifications on the file > ==[IDE]== Apr 4, 2012 2:59:35 PM Checkout Files > git reset HEAD /home/ondra/NetBeansProjects/git/207067/7/JavaApplication80/src/javaapplication80/submodule/file > git checkout -- /home/ondra/NetBeansProjects/git/207067/7/JavaApplication80/src/javaapplication80/submodule/file > file > ==[IDE]== Apr 4, 2012 2:59:35 PM Checkout Files finished. Are you sure that you: 1) call the action on the modified file and not e.g. on the parent project (the parent module and not the submodule)? 2) have the first option in the dialog selected: Revert Uncommitted Changes both in WT and Index ?
> Will it find also their way into the next PHPStorm EAP? Sorry, i don't know what it is. Can you provide a link?
(In reply to comment #10) > > Will it find also their way into the next PHPStorm EAP? > Sorry, i don't know what it is. Can you provide a link? http://confluence.jetbrains.net/display/WI/Web+IDE+EAP
> Will it find also their way into the next PHPStorm EAP? JetBrains PHPStorm does not look like an application built upon NetBeans platform so i believe the answer is: No, the fix will not get it into PHPStorm
I don't know what I was doing yesterday, but it is now clear that Revert and Checkout kind of work. They revert the changes but the file still considered as changed by both Git and NetBeans. git diff says: warning: LF will be replaced by CRLF in src_web/wtcore/jsp/jmx/logEvents.jsp. The file will have its original line endings in your working directory. Thus the changes are undone, but somehow NetBeans is producing the wrong end-of-line termination as compared to the Git configuration.
> warning: LF will be replaced by CRLF in src_web/wtcore/jsp/jmx/logEvents.jsp. > The file will have its original line endings in your working directory. What is the value of core.autocrlf in the clone? Both in .git/config of the submodule and the parent clone and also in the installation of the git commandline client (i guess C:\Program Files\Git... on Win).
autocrlf = true in C:\Program Files (x86)\Git\etc\gitconfig. I have filed a separate bug, 210705, on this issue. There is an issue in that Git certainly understands which line endings it is using -- and NetBeans (or JGit) doesn't.
(In reply to comment #3) > Integrated into 'main-golden', will be available in build *201204030400* on > http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) > Changeset: http://hg.netbeans.org/main-golden/rev/e2a69f8f89a3 > User: Ondrej Vrabec <ovrabec@netbeans.org> > Log: #209839 - Git fails to recognize git submodules as separate clones verified, please integrate into 7.1.2
release71_fixes: http://hg.netbeans.org/releases/rev/26a05a54c949
Integrated into 'releases', will be available in build *201204052205* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/26a05a54c949 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #209839 - Git fails to recognize git submodules as separate clones (transplanted from e2a69f8f89a3131ed342d17a932e6e9c8e2c6be9)
patch successfully delivered into 7.1.2, however problem with recognition of 1.7.8+ git clones persists and requires JGit library upgrade -> reseting TM to 7.2