Re: mingw, windows, crlf/lf, and git
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 12, 2007, 22:37 UTC
- Message-ID
- <Pine.LNX.4.63.0702122332180.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <Pine.LNX.4.64.0702120839490.8424@woody.linux-foundation.org>
Hi,
[I agree on the .gitignore approach; see my other mail in this thread]
On Mon, 12 Feb 2007, Linus Torvalds wrote:
Show 25 quoted lines
> Btw, how would I implement this? If I really were energetic enough to > implement it, I would do: > > (a) Add a flag to "git-ls-files" logic to add "type information" in > front. > > Not only do you want this *anyway* for other reasons, but for > binary/text, the thing you actually care most about is "git add", and > it already basically just does "take this file pattern, feed it > through git-ls-files, and add those files". So you'd get it basically > for free. > > It is also fairly easy to add at this stage, because you can simply > look for all the places that work with "info/exclude" and > ".gitignore", and you know that "Ahh, I need to teach these exact > places to understand about attributes". So you'd add an > "add_attributes_from_file()" function etc etc. > > Quite straightforward. In fact, you might be able to use the > gitignore parsing *as*is*, and just teach it about more flags that > just "ignore": both in "struct dir_entry" and in "struct exclude". > > (b) Teach the git-update-index logic about hashing text blobs. > > (c) Profit!
Not so fast.
In order for this to be _useful_, you also have to have a way to _extract_ the text blobs. Not only for read-tree, but _also_ for diff. It makes no sense at all to have this transformation one-way. For diff, you _might_ want to have a diff beautifier (for example the .odt thing), but read-tree is _really_ important.
Ciao, Dscho