# Unexpected local changes immediately after fresh clone

4 messages from 2009-02-13 to 2009-02-15. Participants: Ben Hoskings, Jay Soffian.
Thread: https://gitlist.dev/t/17768

## Ben Hoskings, 2009-02-13 04:08

Subject: Unexpected local changes immediately after fresh clone
Message-ID: <3D94CDCE-88EB-479A-9D36-6B92FCFCBAF4@hoskings.net>
URL: https://gitlist.dev/e/3D94CDCE-88EB-479A-9D36-6B92FCFCBAF4%40hoskings.net

```
Hi all,

As part of learning a bit more about git workflows, I thought I'd  
poke around a large and high-traffic repo, so I cloned Linus'  
linux-2.6 repository today from

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

After the clone was done, I changed into the repo's directory and ran  
a 'git status' (just out of habit), and it showed a bunch of  
uncommitted, unstaged changes.

Here's a log of the terminal during this (I removed no-ops like 'ls',  
and I inserted line breaks before each prompt for readability):

http://gist.github.com/63027

Doing a 'git diff' on the net/ subdirectory showed that the changes  
were sensible - i.e. it wasn't random corruption or anything. The ones  
I looked through were cleanups to part of the TCP code (you can see  
them in the gist linked above).

Is this normal or expected? My understanding was that a clone first  
received the current HEAD and its history, and then checked out the  
current state of it as the working copy. In any case, I would have  
expected the repositories at git.kernel.org to be bare and as such  
have no working copy for uncommitted changes to be in.

My system is a Mac OS X 10.5.6 box (aluminium MacBook); some details  
are below.

This may well be normal behaviour, but I asked about it in  
freenode:#git and no one had heard of it happening before.

Cheers
Ben Hoskings

------------------------------------

$ uname -a
Darwin hat 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST  
2008; root:xnu-1228.9.59~1/RELEASE_I386 i386

$ which git
/usr/local/bin/git

$ git --version
git version 1.6.1.2

$ df /
Filesystem Size Used Avail Capacity Mounted on
/dev/disk0s2 233Gi 213Gi 19Gi 92% /

```

## Jay Soffian, 2009-02-13 05:41

Subject: Re: Unexpected local changes immediately after fresh clone
Message-ID: <76718490902122141h578a72e3k70366d6583d6c8c3@mail.gmail.com>
URL: https://gitlist.dev/e/76718490902122141h578a72e3k70366d6583d6c8c3%40mail.gmail.com
In-Reply-To: <3D94CDCE-88EB-479A-9D36-6B92FCFCBAF4@hoskings.net>

```
On Thu, Feb 12, 2009 at 11:08 PM, Ben Hoskings <ben@hoskings.net> wrote:
> My system is a Mac OS X 10.5.6 box (aluminium MacBook); some details are
> below.

HFS+ is case-insensitive by default. The Linux kernel has files which
collide on a case-insensitive filesystem, which is what you're seeing.

Create a disk image using Disk Utility, you can use "Mac OS Extended
(Case-sensitive)". Check-out the repo to the disk-image.

j.

```

## Jay Soffian, 2009-02-13 05:56

Subject: Re: Unexpected local changes immediately after fresh clone
Message-ID: <76718490902122156l547a5bd8j56e48d7d3c7c4438@mail.gmail.com>
URL: https://gitlist.dev/e/76718490902122156l547a5bd8j56e48d7d3c7c4438%40mail.gmail.com
In-Reply-To: <76718490902122141h578a72e3k70366d6583d6c8c3@mail.gmail.com>

```
On Fri, Feb 13, 2009 at 12:41 AM, Jay Soffian <jaysoffian@gmail.com> wrote:
> On Thu, Feb 12, 2009 at 11:08 PM, Ben Hoskings <ben@hoskings.net> wrote:
>> My system is a Mac OS X 10.5.6 box (aluminium MacBook); some details are
>> below.
>
> HFS+ is case-insensitive by default. The Linux kernel has files which
> collide on a case-insensitive filesystem, which is what you're seeing.
>
> Create a disk image using Disk Utility, you can use "Mac OS Extended
> (Case-sensitive)". Check-out the repo to the disk-image.

Or:

$ hdiutil create -size 1g -fs UFS -type SPARSEBUNDLE -nospotlight
-attach -volname linux-2.6 linux-2.6
$ cd /Volume/linux-2.6
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

I think SPARSEBUNDLE will be a little friendlier to Time Machine.
Using UFS isn't strictly needed for checking out the kernel repo, but
it's not brain-damaged like HFS+ w/respect to Unicode.

j.

```

## Ben Hoskings, 2009-02-15 10:38

Subject: Re: Unexpected local changes immediately after fresh clone
Message-ID: <5442F1F6-41A3-4CCD-8167-FB65CA5E1164@hoskings.net>
URL: https://gitlist.dev/e/5442F1F6-41A3-4CCD-8167-FB65CA5E1164%40hoskings.net
In-Reply-To: <76718490902122141h578a72e3k70366d6583d6c8c3@mail.gmail.com>

```
On 13/02/2009, at 3:41 PM, Jay Soffian wrote:

> HFS+ is case-insensitive by default. The Linux kernel has files which
> collide on a case-insensitive filesystem, which is what you're seeing.

Aha—yep, that was it alright. That could have taken a while to track  
down; I wasn't expecting anything of the sort, but retrospectively, of  
course. :)

Thanks for your help.

Ben

```
