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.
Created attachment 146217 [details] Claim of netbeans Hi. This seems to be related to: https://netbeans.org/bugzilla/show_bug.cgi?id=198451 which is marked as fixed. However, using NetBeans 8.0, it seems to notice my git repo no problem and I can browse it, and view history etc; but it reports practically all my files as being "modified" though they are not. My core.autocrlf feature is set to false. The attachment shows a screen of netbeans. Below is the text shown upon git status: $ git status On branch var-feature Your branch is up-to-date with 'origin/var-feature'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: cq/src/main/java/com/xyz/pricing/BlackScholes.java modified: cq/src/main/java/com/xyz/risk/var/VaR.java modified: cq/src/test/java/com/xyz/risk/var/VaRTest.java Untracked files: (use "git add <file>..." to include in what will be committed) cq/src/main/java/com/xyz/risk/var/FunctionalParameter.java no changes added to commit (use "git add" and/or "git commit -a")
have you tried refreshing the statuses by clicking on the refresh button? Could you also attach the IDE log after you refresh the statuses (http://wiki.netbeans.org/FaqLogMessagesFile)?
Created attachment 146229 [details] log file (shows nothing) Log file after refreshing (shows nothing)
(In reply to Ondrej Vrabec from comment #1) > have you tried refreshing the statuses by clicking on the refresh button? > Could you also attach the IDE log after you refresh the statuses > (http://wiki.netbeans.org/FaqLogMessagesFile)? Hi. Refreshing changed nothing. I attached the log file but I don't think it shows anything of value (and was not written after I pressed refresh).
(In reply to MikaelUmaN from comment #3) > Hi. Refreshing changed nothing. I attached the log file but I don't think it > shows anything of value (and was not written after I pressed refresh). Right, it doesn't. Can you check if it happens also for other projects? Can you make a dummy project in a local git repo where this happens and send me the whole test project (along with its .git folder)?
Created attachment 146234 [details] Basic project example where .gitignore shows up as modified This is a basic project with one "hello world" java file. The project uses gradle (and the gradle plugin). I will also try without this plugin as it is just an additional source of possible error but I don't imagine it to be at fault here...? Anyway, after one change, .gitignore shows up as "modified" in netbeans. Refresh does nothing to amend the situation.
Confirmed that dummy project without gradle gives the same result. Complete steps: Environment: Windows 7 Java 8 cygwin64 git version 1.8.5 Steps: 1. Create git repo on some server 2. Clone git repo 3. Add basic project (e.g. gradle project or regular netbeans project) 4. From command line: git add -A; git commit -m "Add everything"; git push 5. In netbeans, -> show changes. 6. In netbeans, -> press refresh 7. In command line: git status (shows nothing modified) 8. In netbeans -> shows several files as modified.
> cygwin64 ?really? How does it work if you run NetBeans directly from desktop and not from cygwin?
(In reply to Ondrej Vrabec from comment #7) > > cygwin64 > ?really? How does it work if you run NetBeans directly from desktop and not > from cygwin? Netbeans is run directly from desktop. I only run git commands from cygwin terminal. Should not make a difference I imagine but better to name all details than too few...
opening your test project i can see that .gitingore is indeed modified. However git status in shell says that too: Ondra@ONDRA-PC ~/Desktop/dummygit/dummygit (master) $ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: .gitignore # no changes added to commit (use "git add" and/or "git commit -a") Ondra@ONDRA-PC ~/Desktop/dummygit/dummygit (master) $ git reset --hard HEAD is now at b012971 Ignore Ondra@ONDRA-PC ~/Desktop/dummygit/dummygit (master) $ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: .gitignore # no changes added to commit (use "git add" and/or "git commit -a") Ondra@ONDRA-PC ~/Desktop/dummygit/dummygit (master) $ What is interesting that git status reports modified file even after git reset --hard. git diff reports: $ git diff diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 Do you have any special setup regarding file mode, rights etc.?
Actually, permissions on my machine have been a recurring problem and I think something is broken, especially with Windows and cygwin trying to cooperate... Probably fine to close this and blame it on my machine :(.
(In reply to MikaelUmaN from comment #10) > Actually, permissions on my machine have been a recurring problem and I > think something is broken, especially with Windows and cygwin trying to > cooperate... > > Probably fine to close this and blame it on my machine :(. Does it help if you change "filemode" to false in your .git/config file? > [core] > filemode = true
Actually it does! Thanks, that solution is perfectly acceptable to me for now.
> Actually it does! Thanks, that solution is perfectly acceptable to me for now. I still wonder what the real cause is. Something related to file access rights, possibly a manual setting of umask in cygwin? I do not know. If you find the real cause (so that you do not have to change git.core.filemode to false) let me know and i may update git support so it is handled more elegantly.
I know this is old but I want to state for others looking for the solutions to resolve this issue. This has nothing to do with Cygwin that I can find. The Cygwin version of git doesn't have an issue with the file mode. This has to do with the way Windows returns the stat information to the calling application based on many factors. The only means I've found is to set the filemode property to false to prevent the identified change. Below instruction is based on version 8.2. To change the configuration for a repository: Right click the project-> Find the Git item and hover over it-> Hover over the Repository item-> Left click the Open Configuration item-> Find the filemode = true under the [core] tag and change true to false-> Save the file. To set this in the global file so new projects take on the property: Left click the Team item in the top menu-> Hover over the git item (if it exists*)-> Left click the Open Global Configuration-> Add the following and save the file. [core] filemode = false * Depending on the active file the Team menu changes so you may see the Open Global Configuration at the top level of the Team menu. Other times you'll see a list of VCS vendors and you have to hover over the Git item to see the Open Global Configuration menu item.