From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Turner Subject: Bug: Case-insensitive filesystems can cause merge and checkout problems Date: Tue, 29 Apr 2014 15:02:00 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: Git mailing list X-From: git-owner@vger.kernel.org Tue Apr 29 21:02:09 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WfDI8-0005Vj-Jc for gcvg-git-2@plane.gmane.org; Tue, 29 Apr 2014 21:02:08 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965011AbaD2TCD (ORCPT ); Tue, 29 Apr 2014 15:02:03 -0400 Received: from mail-we0-f175.google.com ([74.125.82.175]:44232 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965000AbaD2TCC (ORCPT ); Tue, 29 Apr 2014 15:02:02 -0400 Received: by mail-we0-f175.google.com with SMTP id q58so657339wes.34 for ; Tue, 29 Apr 2014 12:02:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=AtxSNHgs6szyfpQ7ACpeDjCt+V9Q+f9ZjajQBUkpLlU=; b=ia//QTzQDOLrAqI5HtRcxPx+6FDn8+ub05YOSbt7DlNAsz3nISYrgOqcAtx3JyhxtL zzGaP4VkOXdyykmbawBbFhbYjBdQZ3yLdmWh5vMBE1r2r/Ml7gvWq7kNEBzQKwZ4pOl4 lqGPFjCvFQMaNxTv4iQFBaeCpDNGrb+CVcFOZ2PclMd03JkBfDq6u78Enmp9hBlPutgG YxvVzOZPDumIAfdave08mN6JFBTMSaStiSFqG4UafFehd3y+Ne5pYsOASN9Wi7lKvEpw p1np+kzGU/tMeuJL9z2WlCU1lG9ZblN75wSKGIoUAH+phn0b021diUyQ0Wm0qGkCweWj 59aA== X-Gm-Message-State: ALoCoQmD25bRFcrMwBaq2jwt4W+wMZdskHM5Oo0aIa6zxGWjw1jhjzzL7nxzHJX+vP757UP7+huP X-Received: by 10.194.203.170 with SMTP id kr10mr981823wjc.19.1398798120926; Tue, 29 Apr 2014 12:02:00 -0700 (PDT) Received: by 10.180.18.104 with HTTP; Tue, 29 Apr 2014 12:02:00 -0700 (PDT) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: By default, git sets core.ignorecase=true when git init or git clone is run on a machine with a case-insensitive filesystem. Here's a test-case for some problems that this causes: git checkout master touch TestCase git add TestCase git commit -m 'add TestCase' git checkout -b with-camel touch foo git add foo git commit -m 'intervening commit' git checkout master git rm TestCase touch testcase git add testcase git commit -m 'rename to testcase' git checkout with-camel git merge master -m 'merge' One would expect a clean working copy at this point, but in fact, the file 'testcase' will be deleted. With core.ignorecase=false, we get a different failure. The penultimate command fails with: $ git checkout with-camel error: The following untracked working tree files would be overwritten by checkout: TestCase Please move or remove them before you can switch branches. Aborting Of course, there is no untracked working tree file by that name; there is a tracked working tree file named testcase (all-lowercase).