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.

Bug 194650 - For ignored files, .git/info/exclude file should be checked as well
Summary: For ignored files, .git/info/exclude file should be checked as well
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-24 12:18 UTC by Tomas Mysik
Modified: 2011-01-25 10:49 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2011-01-24 12:18:01 UTC
Git support creates unwanted '.gitignore' file. Why is it unwanted? Because I use .git/info/exclude file to ignore files (I'm using Git for Subversion repository, that's why I don't use .gitignore file directly as in other projects).

P2 because it creates files in my projects that I dont' want, don't need and moreover I need to remove them manually. Sorry.
(Please, do not advice me to ignore file .gitignore as well, thanks ;)

Thanks a lot.

Product Version: NetBeans IDE Dev (Build 110124-10b9ce73d2ac)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03
System: Linux version 2.6.35-24-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Ondrej Vrabec 2011-01-24 12:29:48 UTC
You can disable this option in Tools > Misc > Versioning > Git. Unselect 'Permanently ignore not-sharable files'. I hope the option is enough for you, let us know if it works correctly and the ignore file is not created with the option disabled.
Comment 2 Tomas Mysik 2011-01-24 13:51:23 UTC
Aha, thanks a lot, yes, that helped. BTW for ignored files, NetBeans should check also .git/info/exclude file, right? If not, why not?

In any case, lowering to P3, thanks.
Comment 3 Ondrej Vrabec 2011-01-24 14:43:10 UTC
Your .git/info/exclude already marks /build, /dist etc. as ignored?
Comment 4 Tomas Mysik 2011-01-24 15:55:18 UTC
(In reply to comment #3)
> Your .git/info/exclude already marks /build, /dist etc. as ignored?

Yes, the only difference I have noticed is that in my exclude file there is "/target" but in the generated .gitignore file there was "/target/" (with ending slash). I have generated my exclude files using this command:

git svn show-ignore >> .git/info/exclude
Comment 5 Ondrej Vrabec 2011-01-24 16:06:52 UTC
fix: #69ceb559b63a - http://hg.netbeans.org/core-main/rev/9f561b286f7e
Comment 6 Ondrej Vrabec 2011-01-24 16:11:29 UTC
I hope the fix will help. Now we check also .git/info/exclude before adding a statement to a .gitignore file, so you should not experience the described behavior any more.

> the only difference I have noticed is that in my exclude file there is "/target"
AFAIK, your statement will ignore also *file* "/target" meanwhile ours ignores only *folder* "/target" and is more accurate.
Comment 7 Tomas Mysik 2011-01-24 16:22:54 UTC
First of all, thanks a lot for superfast fix!

(In reply to comment #6)
> I hope the fix will help. Now we check also .git/info/exclude before adding a
> statement to a .gitignore file, so you should not experience the described
> behavior any more.

I will check it once I get the updated module.

> AFAIK, your statement will ignore also *file* "/target" meanwhile ours ignores
> only *folder* "/target" and is more accurate.

Yes, you are right, of course. But as I wrote, I use (external) command for it (so I simply don't care).
Comment 8 Quality Engineering 2011-01-25 06:06:44 UTC
Integrated into 'main-golden', will be available in build *201101250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9f561b286f7e
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #194650 - For ignored files, .git/info/exclude file should be checked as well
Comment 9 Tomas Mysik 2011-01-25 10:49:08 UTC
Verified.

Thanks a lot!

Product Version: NetBeans IDE Dev (Build 110125-74d55d16425e)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03
System: Linux version 2.6.35-24-generic running on amd64; UTF-8; cs_CZ (nb)