git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: .gittattributes handling has deficiencies

From
Ddavid@lang.hm <david@lang.hm>
Date
Oct 22, 2007, 00:05 UTC
Message-ID
<Pine.LNX.4.64.0710211703060.12998@asgard.lang.hm>
In-Reply-To
<Pine.LNX.4.64.0710211645210.12998@asgard.lang.hm>
On Sun, 21 Oct 2007, david@lang.hm wrote:
Show 30 quoted lines
>>>> 
>>>> What do you mean by "checking out everything"?
>>>> Which command do you propose?
>>> 
>>> something like git checkout -f
>> 
>> I suspected this. I see two problems:
>> 
>> 1) it's too dangerous: I throws away _all_ changes, not only
>> changes that are related to gitattributes.
>
> this is true, the question of if this is 'too dangerous' depends on what 
> workflow you teach as safe. if you teach that checking out a new version will 
> loose any modifications you have made (which is useually the sane thing to do 
> by default anyway) then this is just more of the same
>
>> 2) it doesn't work reliably. git checkout -f will only update
>> files that git detects as changed. But you could have files that
>> should have crlf in the working copy but actually have only lf.
>> Those would not be updated.
>
> ok, you could do rm -r * before doing the checkout -f (or there's probably a 
> option to git to tell it not to preserve changes to the working area, I am 
> not a git guru.
>
>> I'll not recommend this. Not using .gitattributes is the only
>> sane solution.
>
> it may be the best thing to do for you and your users, that's not the same 
> thing as saying that it's the only sane solution.

by the way, I am not saying that my suggestion is the right way for things to be (especially long term), but I'm trying to figure out a work-around for the short term.

I'm very interested to see the logn-term suggestions, becouse I suspect that modt of them could be leveraged for the metastore jobs.

David Lang
Previous: david@lang.hmNext: Steffen Prohaska
Message 9 of 14 in “.gittattributes handling has deficiencies”
  1. Steffen ProhaskaOct 21, 2007
  2. david@lang.hmOct 21, 2007
  3. Steffen ProhaskaOct 21, 2007
  4. david@lang.hmOct 21, 2007
  5. Steffen ProhaskaOct 21, 2007
  6. david@lang.hmOct 21, 2007
  7. Steffen ProhaskaOct 21, 2007
  8. david@lang.hmOct 21, 2007
  9. david@lang.hmOct 22, 2007
  10. Steffen ProhaskaOct 22, 2007
  11. Shawn O. PearceOct 22, 2007
  12. Steffen ProhaskaOct 22, 2007
  13. Johannes SchindelinOct 22, 2007
  14. Steffen ProhaskaOct 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.