Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366746 - Impossible to add hidden files to .gitgnore (in particular from Git Tree Compare view)
Summary: Impossible to add hidden files to .gitgnore (in particular from Git Tree Comp...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-14 15:33 EST by Daniel U. Thibault CLA
Modified: 2011-12-14 16:44 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel U. Thibault CLA 2011-12-14 15:33:27 EST
Build Identifier: 20110916-0149 3.7.1 CDT+IC (Indigo Service Release 1 eclipse-linuxtools-indigo-SR1-incubation-linux-gtk-x86_64)

I cloned a git repository using EGit and imported one of its C/C++ project into Eclipse, then worked on it a bit. After creating a local commit, I asked for Compare With: Previous Revision and got a nice Git Tree Compare view.

Besides reporting the files I did edit, it also reported ".cproject" and ".project" as new files.  Not surprising, since they're created by Eclipse.

The problem is that I can find no way of adding these files to .ignore: they're not displayed in the project explorer, so I can't get their contextual menus and select "Team: Ignore" from it.  I puttered with Project: Properties: Resource: Resource Filters to add them explicitly to the project view (in order to Ignore them), but not only did that not succeed, it also wiped out the display of the other project files (AUTHORS, autogen.sh, etc.)...But that is a different bug.

The obvious missing feature, from a user's point of view, is a contextual menu that could be invoked from the file or folder lines of the Git Tree Compare view: it would offer an "Ignore" option alongside the usual Open, etc.

Reproducible: Always

Steps to Reproduce:
1. File: Import: Git: Projects from Git: Next
2. Clone...
3. Connection Protocol: http ; Location Host: git.lttng.org ; Location Repository Path: ltt-control.git
4. Next
5. Next
6. Destination Directory: /home/username/gits/ltt-control (or whatever)
7. Finish
8. Open a file such as lttctl/lttctl.c
9. Change some comments, for instance
10. File: Save
11. Project (contextual): Team: Commit (Fill out the tag if you care)
12. Project (contextual): Compare With: Previous Revision

Now try and add ".cproject" and ".project" to .gitignore without opening .gitignore explicitly.
Comment 1 Daniel U. Thibault CLA 2011-12-14 16:44:55 EST
Turns out no editing of .gitignore is required, since the very first pattern in it is '.*'.  Git Tree Compare should flag those files as "(ignored)" so the user won't waste time trying to exclude them from the patch he's about to create...Like I did...

I do maintain one should have the option to Ignore files and directories that show up in the Git Tree Compare view, but this is no longer a bug but rather a feature request now.