Thread (6 messages) 6 messages, 3 authors, 2016-06-15

Re: git has modified files after clean checkout

From: David Aguilar <hidden>
Date: 2016-06-15 22:45:51

On Wed, Dec 31, 2008 at 12:23 PM, Caleb Cushing [off-list ref] wrote:
here's what I did

rm -r portage
git clone git@github.com:xenoterracide/portage.git

Here's the anonymous clone URL (the one you provided is private)
    $ git clone git://github.com/xenoterracide/portage.git

Read on below...
cd portage
git checkout origin/regen2 -b regen2
git status

# On branch regen2
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:
x11-themes/metacity-themes/files/metacity-themes-1.0-gentoo.diff
#       modified:
x11-themes/metacity-themes/files/metacity-themes-1.2-gentoo.diff
#
no changes added to commit (use "git add" and/or "git commit -a")

why are there files claiming to be modified? this is a clean clone.
I've had this before I usually end up doing a git reset --hard HEAD,
but I'm thinking it's a bug, since I've seen it vary on the same clone
and sometimes even disappear.

git version 1.6.0.6
--
Caleb Cushing

http://xenoterracide.blogspot.com
I followed the steps above and did not run into any such issues.

$ git status
# On branch regen2
nothing to commit (working directory clean)

$ git version
git version 1.6.1.28.gc32f76
(Junio's latest master at the moment)

Here's my quick guess based on what I'm seeing --

The files you mention contain CRLF.  Do you have core.autocrlf set
globally somewhere, perhaps in your ~/.gitconfig?

It's possible that the autocrlf stuff is messing with those files.
They seem to be a mix of both unix LF and CRLF (the CRLF stuff doesn't
start until line 104 of
x11-themes/metacity-themes/files/metacity-themes-1.0-gentoo.diff, for
example, which is kinda odd but maybe be intentional?)

Check your autocrlf settings.
The following commands print out nothing for me:

    $ git config core.autocrlf
    $ git config --global core.autocrlf

Anyways.. like I said -- I couldn't reproduce your problem so this is
pure speculation on my part =)

Good luck,

-- 
    David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help