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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Dmitry Kakurin <dmitry.kakurin@...>, Johannes Schindelin <Johannes.Schindelin@...>, Petr Baudis <pasky@...>, Git Mailing List <git@...>
Date: Wednesday, September 5, 2007 - 2:38 pm

On Wed, Sep 05, 2007 at 01:14:44 -0700, Junio C Hamano wrote:

Yes, they should:

$ git checkout
$ edit .gitattributes
$ edit file
$ git add file
$ git commit ;# this does NOT have the changes to .gitattributes

the above case is a user error that can (at some cost) be detected:

$ git checkout
$ edit .gitattributes
$ edit file
$ git add file
$ git add .gitattributes
Warning! Changes to gitattributes affects handling of files scheduled for
commit. Please add following files again before commit:
  file
$

It would be possible to special-case .gitattributes in add to:
 - do diff between the old and new value of .gitattributes in index,
 - list files changed in index compared to HEAD,
 - match each of them to all patterns in the diff,
 - if any matches, print the warning and list of matches.
It might be even possible to actually inspect the changes and apply those
that can be automatically (and not ask user to re-add), but some filters
loose information, so user interaction is needed to add good version.

--=20
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
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?,...., Jan Hudec, (Wed Sep 5, 2:38 pm)