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

Re: [BUG?] Fresh clone of jquery.git shows modifications?

From
TBThomas Berg <merlin66b@gmail.com>
Date
Aug 18, 2010, 15:50 UTC
Message-ID
<AANLkTik8RGR4OTeZYsttyBtiywGU7Wtz3gQsTjoqAQPD@mail.gmail.com>
In-Reply-To
<1282140854.24584.112.camel@wpalmer.simply-domain>
Hi,
On Wed, 2010-08-18 at 15:18 +0200, Eyvind Bernhardsen wrote:
> Git _is_ giving you a real pristine copy, it's just informing you that your repository is not consistent with the attributes you have set.

Marking the files as modified is sometimes a very user-unfriendly way of informing the user, at least if just want to work with something unrelated, and not actually fix those issues. Maybe there is a better way?

On Wed, Aug 18, 2010 at 4:14 PM, Will Palmer <wmpalmer@gmail.com> wrote:
Show 6 quoted lines
> "pristine" to me means "no changes". If there is an inconsistency which
> git doesn't like, git should complain about that, refuse to checkout,
> declare "broken repository! Oh no!" and refuse all operations, etc. It
> git can determine that it is unable to act in a sane manner, I don't
> want git to just go ahead making wild guesses.
>
[snip]
> Just to re-state: This is not "my repository". That is, I don't consider
> it to be. So I would prefer only solutions which involve editing
> something unversioned, such as .git/config, rather than making random
> patches which feel very much like work-arounds to a git problem.

Such a solution exists, you can create a file .git/info/attributes, which will override the faulty .gitattributes file in the repository [1]. Then you could make git treat all files as binary files, making no conversions. Using this unversioned file also enables you to jump back in history, rebase etc. without problems.

Hope this helps, Thomas

[1] http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
Previous: Will PalmerNext: Will Palmer
Message 4 of 9 in “[BUG?] Fresh clone of jquery.git shows modifications?”
  1. Will PalmerAug 18, 2010
  2. Eyvind BernhardsenAug 18, 2010
  3. Will PalmerAug 18, 2010
  4. Thomas BergAug 18, 2010
  5. Will PalmerAug 18, 2010
  6. Eyvind BernhardsenAug 18, 2010
  7. Eyvind BernhardsenAug 18, 2010
  8. Thomas BergAug 18, 2010
  9. Eyvind BernhardsenAug 18, 2010

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.