login
Header Space

 
 

Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?,.gitacls? etc.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jan Hudec <bulb@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Petr Baudis <pasky@...>, Git Mailing List <git@...>
Date: Wednesday, September 5, 2007 - 4:06 am

On 9/4/07, Jan Hudec <bulb@ucw.cz> wrote:

Consider scenario when my commit #1 has .gitattributes:
    a.txt -nocrlf
and file a.txt
You pull it.
Now I make some changes to a.txt and realize that a.txt *is* a text
file now. I remove the entry from .gitattributes and notice that it
becomes empty. So I just remove .gitattributes file all together. It
becomes commit#2.
Now you pull it again. There *is* .gitattributes in local directory,
but index does not have it (because I've removed it on purpose). What
should happen?
I assert that since index does not have .gitattributes the one from
local directory should not be used.

Think about dedicated build machine scenario: I have a machine that
always does sync + build. After every sync the local directory should
always be identical to what-was-committed.
With every commit 3 things could happen: .gitattributes could appear,
disappear or change. In every case "build machine" must produce the
exact copy of what-was-checked-in. The only way I see this happening
is by using *only* index version of .gitattributes when files are
moved index -> workspace.

A similar reasoning works for other direction (workplace -> index).
-- 
- Dmitry
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?, ..., Johannes Schindelin, (Sun Aug 26, 11:05 am)
Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?, ..., Johannes Schindelin, (Mon Aug 27, 7:30 am)
Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?, ..., Johannes Schindelin, (Tue Aug 28, 4:45 am)
Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?, ..., Johannes Schindelin, (Tue Aug 28, 7:07 pm)
Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?,...., Johannes Schindelin, (Tue Aug 28, 4:49 am)
Re: .gitignore, .gitattributes, .gitmodules, .gitprecious?,...., Dmitry Kakurin, (Wed Sep 5, 4:06 am)
speck-geostationary