Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] I can't ignore .gitignore



On Wed, Jul 10, 2013 at 3:40 PM, Dr. David E Hudak <dhudak@xxxxxxx> wrote:

On Jul 9, 2013, at 1:58 PM, Roland Schulz <roland@xxxxxxx> wrote:



On Tue, Jul 9, 2013 at 1:07 PM, Christoph Pospiech <Christoph.Pospiech@xxxxxxxxxx> wrote:
On Tuesday, July 09, 2013 10:03:48 "Dr. David E Hudak" <dhudak@xxxxxxx> wrote:
> Hi Christoph,
>
> I would be willing to put in a feature request for option #1 below (don't
> create .gitignore in nonempty directories).  What do you think?
>
> Thanks,
> Dave

 

Dave,

 

I would think that would help a lot.

 

I have been experimenting with a top level .gitignore with contents as follows.
/.ptp-sync
/*/.gitignore
/*/*/.gitignore
/*/*/*/.gitignore
/*/*/*/*/.gitignore

Is it important to you not to ignore the top-level gitignore?

I definitely want to use .gitignore to prevent the .project, .cproject and /.settings files from being considered for source control by Egit.  
The function of the .gitignore file isn't affected by being ignored itself. The git ignore mechanism only affects adding new files. So you could use the simple ".gitingore" pattern and also ignore those other eclipse meta files.
 
I think changing the name from .gitignore is a good idea  - these are eclipse metadata files (in the sense that eclipse is responsible for creating them).  I liked the name .ptp_sync, since it indicated to me what created the file (ptp) and what it was used for (sync).  Would something similar like .ptp_folder be acceptable to the more cryptic .ignore_me?
I added that suggestion to the bug I created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=412716

Roland
 

Dave

Ignoring files only has an effect on untracked files. Thus as soon as you added the top-level gitignore it doesn't matter if it is itself ignored. Thus you can simplify your rules to:
.gitignore
(no slash in the rule means that it applies to files in any directory).
 
More lines with more '*/' might be added. This makes the .gitignore disappear from command line "git status" and Egit project manager display as desired.

 

At least that is a work around until the feature request is implemented.

 

To make this a general solution I guess that the non top level .gitignore should be renamed into .ignore_me and corresponding entries /*.../.ignore_me should be added to the top level .gitignore.
I don't see a disadvantage of renaming and don't remember why we choose to use the gitignore name. So I think this is a good idea. 

On the other hand I'm not sure it makes so much sense to add the .ignore_me to the .gitignore. We want the sync to be independent of the version control, work with any version control, and we don't know which VC the user is using. We can't really add the .ignore_me to the cvs/svn/git/... ignore files just in case a user is using that type of version control. Thus, I think the user might need to add it themselves based on the version control they choose.

Roland
 
This would leave the name .gitignore available to those users using .gitignore for their own purposes.

 

Would that be a feasible extension of your feature request ?
--

 

Mit freundlichen Grüßen / Kind regards

 

Dr. Christoph Pospiech
High Performance & Parallel Computing
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland GmbH / Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Martina Koederitz (Vorsitzende), Reinhard Reschke, Dieter Scholz, Gregor Pillen, Joachim Heel, Christian Noll
Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB 14562 / WEEE-Reg.-Nr. DE 99369940

 




--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309 _______________________________________________

---
David E. Hudak, Ph.D.          dhudak@xxxxxxx
Senior Research Scientist
Ohio Supercomputer Center















--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309

Back to the top