Bug 354429 - Platform Runtime Git repository seems to have a bad .gitignore
Summary: Platform Runtime Git repository seems to have a bad .gitignore
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.2 M2   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 354447
  Show dependency tree
 
Reported: 2011-08-10 15:03 EDT by Remy Suen CLA
Modified: 2011-08-10 18:27 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot depicting the behaviour in question. (50.07 KB, image/png)
2011-08-10 15:03 EDT, Remy Suen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-08-10 15:03:00 EDT
Created attachment 201272 [details]
Screenshot depicting the behaviour in question.

My new Java files for the tests/org.eclipse.e4.core.tests/ bundle does not appear to be showing up. It does not get the '?' decorator in Eclipse and 'git status' on the command line gives me nothing. The project root works and the src/ folder works though.
Comment 1 Remy Suen CLA 2011-08-10 15:06:41 EDT
I don't seem to have this problem in the eclipse.platform.ui repository although their .gitignore files _appear_ to be identical.
Comment 2 Remy Suen CLA 2011-08-10 15:09:39 EDT
I get this when I try to add from the CLI.

------------------

C:\git\eclipse.platform.runtime>git add tests\org.eclipse.e4.core.tests\src\org\
eclipse\e4\core\internal\tests\contexts\inject\Bug354427Test.java
The following paths are ignored by one of your .gitignore files:
tests/org.eclipse.e4.core.tests/src/org/eclipse/e4/core
Use -f if you really want to add them.
fatal: no files added

C:\git\eclipse.platform.runtime>
Comment 3 John Arthorne CLA 2011-08-10 16:07:55 EDT
I'm wondering if the "core" entry in .gitignore is the problem. I'm not sure how to fix this since the .gitignore file was added through Paul's black magic rather than a normal commit.

In any case .gitignore problems should never block anything. You can always override and add something even if it matches an ignore pattern.
Comment 4 Remy Suen CLA 2011-08-10 16:13:53 EDT
Using -f from the command line worked. I'll open a bug with EGit to get it to work from the UI.
Comment 5 Paul Webster CLA 2011-08-10 16:18:45 EDT
I thought it should have only been a problem for a core file, as the entry wasn't core/

If it needs to be changed ... well, we can still do it, but it'll either be a rebase and we'll get all new hashes or it needs to be fixed in the tip of the branches we care about.

That implies we have the same problem in core/context and core/di

PW
Comment 6 Remy Suen CLA 2011-08-10 16:38:41 EDT
Opened bug 354436 against EGit.
Comment 7 John Arthorne CLA 2011-08-10 17:13:25 EDT
It indeed appears to be the "core" entry in .gitignore. It looks like "core/" will only match a directory, whereas "core" will match both files and directories. I have updated the .gitignore in master only. Once I did that, new files under a directory called "core" were correctly showing up.