threads / discuss / 29100

Odd issue - The Diffs That WILL NOT DIE.

Subject: Odd issue - The Diffs That WILL NOT DIE.

## tl;dr

14 messages between Dec 6, 2011 and Sep 5, 2012.

replies: 13people: 6as markdown or json

Chris Patti· Dec 6, 2011, 21:43 UTC · lore
I have a Homebrew installed version if Git 1.7.8 running on OSX Lion.

I'm seeing a very odd issue where these diffs I didn't create keep recurring in a particular repository.

I've tried:
* Nuking the repo and re-cloning, cloning into a totally different
containing directory
* git reset --hard, git checkout -- of the offending file supposedly
containing the diffs

Is there some sort of uber persistent local cache that's bound to the remote repository?

Thanks in advance, -Chris

-- 
Christopher Patti - Geek At Large | GTalk: cpatti@gmail.com | AIM:
chrisfeohpatti | P: (260) 54PATTI
"Technology challenges art, art inspires technology." - John Lasseter, Pixar
Frans Klaver· Dec 6, 2011, 21:47 UTC · re: Chris Patti · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Tue, 06 Dec 2011 22:43:50 +0100, Chris Patti <cpatti@gmail.com> wrote:
> I have a Homebrew installed version if Git 1.7.8 running on OSX Lion.
>
> I'm seeing a very odd issue where these diffs I didn't create keep
> recurring in a particular repository.

Could you be a little more specific about the nature of the diffs? Is it reproducible on another system? It sounds like newlines or whitespace. Does

$ git diff -w
produce the same result?
Show 14 quoted lines
>
> I've tried:
>
> * Nuking the repo and re-cloning, cloning into a totally different
> containing directory
> * git reset --hard, git checkout -- of the offending file supposedly
> containing the diffs
>
> Is there some sort of uber persistent local cache that's bound to the
> remote repository?
>
> Thanks in advance,
> -Chris
>
Carlos Martín Nieto· Dec 6, 2011, 21:51 UTC · re: Chris Patti · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Tue, Dec 06, 2011 at 04:43:50PM -0500, Chris Patti wrote:
> I have a Homebrew installed version if Git 1.7.8 running on OSX Lion.
> 
> I'm seeing a very odd issue where these diffs I didn't create keep
> recurring in a particular repository.

Which diffs? You haven't given us any? What files does this happen with? Do they have any peculiarities?

If these are files with non-ASCII filenames, then you're hitting a misfeature of the HFS+ filesystem (it lies when git asks it about files).

Show 10 quoted lines
> 
> I've tried:
> 
> * Nuking the repo and re-cloning, cloning into a totally different
> containing directory
> * git reset --hard, git checkout -- of the offending file supposedly
> containing the diffs
> 
> Is there some sort of uber persistent local cache that's bound to the
> remote repository?
The remote repository shouldn't have anything to do with this.
   cmn
Chris Patti· Dec 7, 2011, 16:54 UTC · re: Carlos Martín Nieto · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Tue, Dec 6, 2011 at 4:51 PM, Carlos Martín Nieto <cmn@elego.de> wrote:
Show 27 quoted lines
> On Tue, Dec 06, 2011 at 04:43:50PM -0500, Chris Patti wrote:
>> I have a Homebrew installed version if Git 1.7.8 running on OSX Lion.
>>
>> I'm seeing a very odd issue where these diffs I didn't create keep
>> recurring in a particular repository.
>
> Which diffs? You haven't given us any? What files does this happen
> with? Do they have any peculiarities?
>
> If these are files with non-ASCII filenames, then you're hitting a
> misfeature of the HFS+ filesystem (it lies when git asks it about
> files).
>
>>
>> I've tried:
>>
>> * Nuking the repo and re-cloning, cloning into a totally different
>> containing directory
>> * git reset --hard, git checkout -- of the offending file supposedly
>> containing the diffs
>>
>> Is there some sort of uber persistent local cache that's bound to the
>> remote repository?
>
> The remote repository shouldn't have anything to do with this.
>
>   cmn

OK. Let me give you a very specific series of commands, sorry about the poor question / report (Not convinced it's a bug, probably pilot error?)

If my understanding of the way Git works is correct, there should be NO pending diffs in a freshly cloned repository, yes?

Note that I tried git diff and git diff -w below with identical results: --- 11:35][admin@Hiram-Abiff-2:~/src]$ rm -rf framework/ [11:37][admin@Hiram-Abiff-2:~/src]$ [11:44][admin@Hiram-Abiff-2:~/src]$ git clone ssh://git.bluestatedigital.com/home/git/framework.git Cloning into 'framework'... remote: Counting objects: 378540, done. remote: Compressing objects: 100% (100469/100469), done. remote: Total 378540 (delta 261046), reused 374685 (delta 258447) Receiving objects: 100% (378540/378540), 148.33 MiB | 2.08 MiB/s, done. Resolving deltas: 100% (261046/261046), done. [11:51][admin@Hiram-Abiff-2:~/src]$ cd framework/ [11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff

diff --git a/app/modules/Core/controllers/CloudSponge.php b/app/modules/Core/con
index 615a7b3..911d456 100644
--- a/app/modules/Core/controllers/CloudSponge.php
+++ b/app/modules/Core/controllers/CloudSponge.php
@@ -1,229 +1,71 @@
-<?php
-
-require_once "utils/blue_mailer/queue_mailer.class.php";
-
-class Core_CloudSponge_Controller extends Core_PageBase_Controller
-{
-    private $_config;
-    private $_tsFactory;
-    private $_emailValidator;
-    private $_formFactory;
-    private $_rowBuilderFactory;
-
-    public function __construct
-    (
-        Blue_Config $config,
-        Blue_SecureTimestamp_Factory $tsFactory,
-        Blue_Email_Validator $emailValidator,
-        Framework_Ui_Form_Factory $formFactory,
[11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff -w
diff --git a/app/modules/Core/controllers/CloudSponge.php b/app/modules/Core/con
index 615a7b3..911d456 100644
--- a/app/modules/Core/controllers/CloudSponge.php
+++ b/app/modules/Core/controllers/CloudSponge.php
@@ -1,229 +1,71 @@
-<?php
-
-require_once "utils/blue_mailer/queue_mailer.class.php";
-
-class Core_CloudSponge_Controller extends Core_PageBase_Controller
-{
-    private $_config;
-    private $_tsFactory;
-    private $_emailValidator;
-    private $_formFactory;
-    private $_rowBuilderFactory;
-
-    public function __construct
-    (
-        Blue_Config $config,
-        Blue_SecureTimestamp_Factory $tsFactory,
-        Blue_Email_Validator $emailValidator,
-        Framework_Ui_Form_Factory $formFactory,
[11:52][admin@Hiram-Abiff-2:~/src/framework(master)]$
-- 
Christopher Patti - Geek At Large | GTalk: cpatti@gmail.com | AIM:
chrisfeohpatti | P: (260) 54PATTI
"Technology challenges art, art inspires technology." - John Lasseter, Pixar
Philippe Vaucher· Dec 7, 2011, 17:20 UTC · re: Chris Patti · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

> 11:35][admin@Hiram-Abiff-2:~/src]$ rm -rf framework/
> [11:44][admin@Hiram-Abiff-2:~/src]$ git clone
...snip...
> [11:51][admin@Hiram-Abiff-2:~/src]$ cd framework/
> [11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff
...snip...
Can you paste the output of "git status" right after the "cd framework"?

Looks like you have some external process that goes and touches your file after the git clone, or that git fails to check out the files after cloning but isn't able to work out it failed to checkout those files.

Philippe
Chris Patti· Dec 7, 2011, 18:05 UTC · re: Philippe Vaucher · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Wed, Dec 7, 2011 at 12:20 PM, Philippe Vaucher <philippe.vaucher@gmail.com> wrote:

Show 15 quoted lines
>> 11:35][admin@Hiram-Abiff-2:~/src]$ rm -rf framework/
>> [11:44][admin@Hiram-Abiff-2:~/src]$ git clone
> ...snip...
>> [11:51][admin@Hiram-Abiff-2:~/src]$ cd framework/
>> [11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff
> ...snip...
>
> Can you paste the output of "git status" right after the "cd framework"?
>
> Looks like you have some external process that goes and touches your
> file after the git clone, or that git fails to check out the files
> after cloning but isn't able to work out it failed to checkout those
> files.
>
> Philippe

Sure. -- [13:04][admin@Hiram-Abiff-2:~/src/framework(master)]$ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: app/modules/Core/controllers/CloudSponge.php # no changes added to commit (use "git add" and/or "git commit -a") [13:04][admin@Hiram-Abiff-2:~/src/framework(master)]$

I'll try rebooting the Mac to see if there's some rogue process afoot :)
-Chris
-- 
Christopher Patti - Geek At Large | GTalk: cpatti@gmail.com | AIM:
chrisfeohpatti | P: (260) 54PATTI
"Technology challenges art, art inspires technology." - John Lasseter, Pixar
Chris Patti· Dec 7, 2011, 18:16 UTC · re: Philippe Vaucher · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Wed, Dec 7, 2011 at 12:20 PM, Philippe Vaucher <philippe.vaucher@gmail.com> wrote:

Show 15 quoted lines
>> 11:35][admin@Hiram-Abiff-2:~/src]$ rm -rf framework/
>> [11:44][admin@Hiram-Abiff-2:~/src]$ git clone
> ...snip...
>> [11:51][admin@Hiram-Abiff-2:~/src]$ cd framework/
>> [11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff
> ...snip...
>
> Can you paste the output of "git status" right after the "cd framework"?
>
> Looks like you have some external process that goes and touches your
> file after the git clone, or that git fails to check out the files
> after cloning but isn't able to work out it failed to checkout those
> files.
>
> Philippe

FYI this behavior persists across reboots so this rogue process is also restarting itself :)

Thanks, -Chris

-- 
Christopher Patti - Geek At Large | GTalk: cpatti@gmail.com | AIM:
chrisfeohpatti | P: (260) 54PATTI
"Technology challenges art, art inspires technology." - John Lasseter, Pixar
Jeff King· Dec 7, 2011, 22:03 UTC · re: Chris Patti · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Wed, Dec 07, 2011 at 11:54:26AM -0500, Chris Patti wrote:
Show 6 quoted lines
> OK.  Let me give you a very specific series of commands, sorry about
> the poor question / report (Not convinced it's a bug, probably pilot
> error?)
> 
> If my understanding of the way Git works is correct, there should be
> NO pending diffs in a freshly cloned repository, yes?

Yes. It's probably a bug, perhaps related to the case-insensitive filesystem (we've seen similar weird "phantom changes right after clone" bugs before).

Show 16 quoted lines
> 11:35][admin@Hiram-Abiff-2:~/src]$ rm -rf framework/
> [11:37][admin@Hiram-Abiff-2:~/src]$
> [11:44][admin@Hiram-Abiff-2:~/src]$ git clone
> ssh://git.bluestatedigital.com/home/git/framework.git
> Cloning into 'framework'...
> remote: Counting objects: 378540, done.
> remote: Compressing objects: 100% (100469/100469), done.
> remote: Total 378540 (delta 261046), reused 374685 (delta 258447)
> Receiving objects: 100% (378540/378540), 148.33 MiB | 2.08 MiB/s, done.
> Resolving deltas: 100% (261046/261046), done.
> [11:51][admin@Hiram-Abiff-2:~/src]$ cd framework/
> [11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff
> diff --git a/app/modules/Core/controllers/CloudSponge.php b/app/modules/Core/con
> index 615a7b3..911d456 100644
> --- a/app/modules/Core/controllers/CloudSponge.php
> +++ b/app/modules/Core/controllers/CloudSponge.php

Are there other files in the repository that differ from this path only in capitalization? Can you show us the output of "git ls-files"?

Is it possible to make this repo public, or at least available privately to git developers?

You mentioned v1.7.8. Do you see the bug with other git versions? If not, can you try bisecting?

-Peff
Chris Patti· Dec 7, 2011, 22:24 UTC · re: Jeff King · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Wed, Dec 7, 2011 at 5:03 PM, Jeff King <peff@peff.net> wrote:
Show 40 quoted lines
> On Wed, Dec 07, 2011 at 11:54:26AM -0500, Chris Patti wrote:
>
>> OK.  Let me give you a very specific series of commands, sorry about
>> the poor question / report (Not convinced it's a bug, probably pilot
>> error?)
>>
>> If my understanding of the way Git works is correct, there should be
>> NO pending diffs in a freshly cloned repository, yes?
>
> Yes. It's probably a bug, perhaps related to the case-insensitive
> filesystem (we've seen similar weird "phantom changes right after clone"
> bugs before).
>
>> 11:35][admin@Hiram-Abiff-2:~/src]$ rm -rf framework/
>> [11:37][admin@Hiram-Abiff-2:~/src]$
>> [11:44][admin@Hiram-Abiff-2:~/src]$ git clone
>> ssh://git.bluestatedigital.com/home/git/framework.git
>> Cloning into 'framework'...
>> remote: Counting objects: 378540, done.
>> remote: Compressing objects: 100% (100469/100469), done.
>> remote: Total 378540 (delta 261046), reused 374685 (delta 258447)
>> Receiving objects: 100% (378540/378540), 148.33 MiB | 2.08 MiB/s, done.
>> Resolving deltas: 100% (261046/261046), done.
>> [11:51][admin@Hiram-Abiff-2:~/src]$ cd framework/
>> [11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff
>> diff --git a/app/modules/Core/controllers/CloudSponge.php b/app/modules/Core/con
>> index 615a7b3..911d456 100644
>> --- a/app/modules/Core/controllers/CloudSponge.php
>> +++ b/app/modules/Core/controllers/CloudSponge.php
>
> Are there other files in the repository that differ from this path only
> in capitalization? Can you show us the output of "git ls-files"?
>
> Is it possible to make this repo public, or at least available privately
> to git developers?
>
> You mentioned v1.7.8. Do you see the bug with other git versions? If
> not, can you try bisecting?
>
> -Peff

Yup, you nailed it. The files in question are CloudSponge.php (deleted) and Cloudsponge.php (still being actively maintained).

I am seeing the same behavior with 1.7.7.4 which I backrevved to yesterday while troubleshooting this issue. Can you suggest an older version for me to try next?

I'm not sure how I would git bisect in this case, I'd need to have all the different git revs installed in order to do that right? (I'm relatively new to git bisect, just figured it out the other day).

Thanks, -Chris

-- 
Christopher Patti - Geek At Large | GTalk: cpatti@gmail.com | AIM:
chrisfeohpatti | P: (260) 54PATTI
"Technology challenges art, art inspires technology." - John Lasseter, Pixar
Chris Patti· Dec 7, 2011, 22:30 UTC · re: Chris Patti · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

Actually I'm wrong on that count, but in an interesting way.

Both CloudSponge.php and Cloudsponge.php exist and are *not* deleted in the remote repository, but on OSX only Cloudsponge.php shows up on the filesystem, yet CloudSponge.php is being reported as modified.

Turns out two of our other developers are also seeing this behavior.
-Chris
On Wed, Dec 7, 2011 at 5:24 PM, Chris Patti <cpatti@gmail.com> wrote:
Show 60 quoted lines
> On Wed, Dec 7, 2011 at 5:03 PM, Jeff King <peff@peff.net> wrote:
>> On Wed, Dec 07, 2011 at 11:54:26AM -0500, Chris Patti wrote:
>>
>>> OK.  Let me give you a very specific series of commands, sorry about
>>> the poor question / report (Not convinced it's a bug, probably pilot
>>> error?)
>>>
>>> If my understanding of the way Git works is correct, there should be
>>> NO pending diffs in a freshly cloned repository, yes?
>>
>> Yes. It's probably a bug, perhaps related to the case-insensitive
>> filesystem (we've seen similar weird "phantom changes right after clone"
>> bugs before).
>>
>>> 11:35][admin@Hiram-Abiff-2:~/src]$ rm -rf framework/
>>> [11:37][admin@Hiram-Abiff-2:~/src]$
>>> [11:44][admin@Hiram-Abiff-2:~/src]$ git clone
>>> ssh://git.bluestatedigital.com/home/git/framework.git
>>> Cloning into 'framework'...
>>> remote: Counting objects: 378540, done.
>>> remote: Compressing objects: 100% (100469/100469), done.
>>> remote: Total 378540 (delta 261046), reused 374685 (delta 258447)
>>> Receiving objects: 100% (378540/378540), 148.33 MiB | 2.08 MiB/s, done.
>>> Resolving deltas: 100% (261046/261046), done.
>>> [11:51][admin@Hiram-Abiff-2:~/src]$ cd framework/
>>> [11:51][admin@Hiram-Abiff-2:~/src/framework(master)]$ git diff
>>> diff --git a/app/modules/Core/controllers/CloudSponge.php b/app/modules/Core/con
>>> index 615a7b3..911d456 100644
>>> --- a/app/modules/Core/controllers/CloudSponge.php
>>> +++ b/app/modules/Core/controllers/CloudSponge.php
>>
>> Are there other files in the repository that differ from this path only
>> in capitalization? Can you show us the output of "git ls-files"?
>>
>> Is it possible to make this repo public, or at least available privately
>> to git developers?
>>
>> You mentioned v1.7.8. Do you see the bug with other git versions? If
>> not, can you try bisecting?
>>
>> -Peff
>
> Yup, you nailed it.  The files in question are CloudSponge.php
> (deleted) and Cloudsponge.php (still being actively maintained).
>
> I am seeing the same behavior with 1.7.7.4 which I backrevved to
> yesterday while troubleshooting this issue.  Can you suggest an older
> version for me to try next?
>
> I'm not sure how I would git bisect in this case, I'd need to have all
> the different git revs installed in order to do that right? (I'm
> relatively new to git bisect, just figured it out the other day).
>
> Thanks,
> -Chris
>
> --
> Christopher Patti - Geek At Large | GTalk: cpatti@gmail.com | AIM:
> chrisfeohpatti | P: (260) 54PATTI
> "Technology challenges art, art inspires technology." - John Lasseter, Pixar
-- 
Christopher Patti - Geek At Large | GTalk: cpatti@gmail.com | AIM:
chrisfeohpatti | P: (260) 54PATTI
"Technology challenges art, art inspires technology." - John Lasseter, Pixar
Carlos Martín Nieto· Dec 7, 2011, 22:58 UTC · re: Chris Patti · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Wed, Dec 07, 2011 at 05:30:19PM -0500, Chris Patti wrote:
Show 7 quoted lines
> Actually I'm wrong on that count, but in an interesting way.
> 
> Both CloudSponge.php and Cloudsponge.php exist and are *not* deleted
> in the remote repository, but on OSX only Cloudsponge.php shows up on
> the filesystem, yet CloudSponge.php is being reported as modified.
> 
> Turns out two of our other developers are also seeing this behavior.

HFS+ (the filesystem used by OSX) is case insensitive unless you toggle some magic switch, so git set core.ignorecase to true on clone (the config manpage claims its done on init or clone, in any case) which makes it assume that Cloudsponge.php and CloudSponge.php are the same file (which in a case-insensitive filesystem is true).

If you want to use OSX to develop this project, you'll have to either rename one of those files or set your filesystem to be case-sensitive (and unset core.ignorecase afterwards). From what I've heard, the OS itself will work fine with a case-sensitive filesystem, but not all applications might. YMMV.

   cmn
Jeff King· Dec 7, 2011, 23:06 UTC · re: Carlos Martín Nieto · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Wed, Dec 07, 2011 at 11:58:27PM +0100, Carlos Martín Nieto wrote:
Show 5 quoted lines
> If you want to use OSX to develop this project, you'll have to either
> rename one of those files or set your filesystem to be case-sensitive
> (and unset core.ignorecase afterwards). From what I've heard, the OS
> itself will work fine with a case-sensitive filesystem, but not all
> applications might. YMMV.

I've never done it, but my understanding is that for HFS+, going case-sensitive is not a simple flip of a switch, but you have to actually make a new filesystem. Given that complexity, and the fact that some other apps might not like it, your best bet might be to create a new case-sensitive filesystem in a loopback file, and then mount that just for this project.

I'm not sure of the exact commands under OS X, but I'm sure some googling could probably turn up a solution.

-Peff
Robin Rosenberg· Sep 5, 2012, 19:38 UTC · re: Jeff King · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

Jeff King skrev 2011-12-08 00.06:
Show 17 quoted lines
> On Wed, Dec 07, 2011 at 11:58:27PM +0100, Carlos Martín Nieto wrote:
>
>> If you want to use OSX to develop this project, you'll have to either
>> rename one of those files or set your filesystem to be case-sensitive
>> (and unset core.ignorecase afterwards). From what I've heard, the OS
>> itself will work fine with a case-sensitive filesystem, but not all
>> applications might. YMMV.
>
> I've never done it, but my understanding is that for HFS+, going
> case-sensitive is not a simple flip of a switch, but you have to
> actually make a new filesystem. Given that complexity, and the fact that
> some other apps might not like it, your best bet might be to create a
> new case-sensitive filesystem in a loopback file, and then mount that
> just for this project.
>
> I'm not sure of the exact commands under OS X, but I'm sure some
> googling could probably turn up a solution.
The disk tool does this for you. Can't be much easier than it is.
-- robin
Jeff King· Dec 7, 2011, 23:03 UTC · re: Chris Patti · lore

Re: Odd issue - The Diffs That WILL NOT DIE.

On Wed, Dec 07, 2011 at 05:24:01PM -0500, Chris Patti wrote:
Show 10 quoted lines
> Yup, you nailed it.  The files in question are CloudSponge.php
> (deleted) and Cloudsponge.php (still being actively maintained).
> [...]
> Actually I'm wrong on that count, but in an interesting way.
> 
> Both CloudSponge.php and Cloudsponge.php exist and are *not* deleted
> in the remote repository, but on OSX only Cloudsponge.php shows up on
> the filesystem, yet CloudSponge.php is being reported as modified.
> 
> Turns out two of our other developers are also seeing this behavior.

OK. Then it's not a bug[1], but rather an incompatibility issue. Your repository stores two files which differ only in case, but your underlying case-insensitive filesystem is incapable of storing both of them simultaneously.

There's really no way around it except to either use a case-sensitive filesystem, rename your files (or if one if obsolete, get rid of it).

[1] Arguably git could be better at noticing and reporting this issue, but that wouldn't change the fundamental problem.

> I am seeing the same behavior with 1.7.7.4 which I backrevved to
> yesterday while troubleshooting this issue.  Can you suggest an older
> version for me to try next?

No, you'll see the same behavior in all versions of git (I was mostly concerned that it was a regression new in v1.7.8, as I fixed some case-sensitivity bugs recently).

> I'm not sure how I would git bisect in this case, I'd need to have all
> the different git revs installed in order to do that right? (I'm
> relatively new to git bisect, just figured it out the other day).

You can't bisect, because you don't have a version that actually worked. But if you had, you would do it by cloning and building the git repository itself, then starting a bisection like:

  git clone git://git.kernel.org/pub/scm/git/git.git
  git bisect start
  git bisect bad v1.7.8
  git bisect good v1.7.7.4 ;# if it had turned out to be OK

and then repeatedly build and try your test with each version of git, until if finally narrowed it down to a single offending commit.

-Peff

← back to recent threads