threads / discuss / 17768

Unexpected local changes immediately after fresh clone

Subject: Unexpected local changes immediately after fresh clone

## tl;dr

4 messages between Feb 13, 2009 and Feb 15, 2009.

replies: 3people: 2as markdown or json

Ben Hoskings· Feb 13, 2009, 04:08 UTC · lore
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· Feb 13, 2009, 05:41 UTC · re: Ben Hoskings · lore

Re: Unexpected local changes immediately after fresh clone

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· Feb 13, 2009, 05:56 UTC · re: Jay Soffian · lore

Re: Unexpected local changes immediately after fresh clone

On Fri, Feb 13, 2009 at 12:41 AM, Jay Soffian <jaysoffian@gmail.com> wrote:
Show 9 quoted lines
> 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· Feb 15, 2009, 10:38 UTC · re: Jay Soffian · lore

Re: Unexpected local changes immediately after fresh clone

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

← back to recent threads