git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Checkout fails when one branch contains a directory with the name of a file in the other branch
@ 2007-05-07 11:07 Tom Koelman
  2007-05-07 11:31 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Koelman @ 2007-05-07 11:07 UTC (permalink / raw)
  To: git


Hi,

I am not sure whether this is intentional or not. I am wondering why
this scenario fails, and if it is by design, how I should handle this
situation:

--------------------------------------------------------------------------------
$ mkdir test

$ cd test

$ git init
Initialized empty Git repository in .git/

$ echo aFile > aFile

$ git add aFile

$ git commit -m "initial"
Created initial commit a4aa48bb4ca57699341e380b17a1c3d92e44d08b
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 aFile

$ git checkout -b branch
Switched to a new branch "branch"

$ git rm aFile
rm 'aFile'

$ git commit -m "No aFile file anymore"

Created commit 6ac689ae4d7e8c0d82526d84563c12109b6cd900
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 jacob

$ mkdir aFile

$ touch aFile/anotherFile

$ git add aFile/anotherFile 

$ git commit -m "added aFile directory"
Created commit 634e5fff2fdb6365d4be5b2dca29e9c78164cb07
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 aFile/anotherFile

$ git checkout master
fatal: Untracked working tree file 'aFile' would be overwritten by merge.
--------------------------------------------------------------------------------

Regards,
Tom Koelman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Checkout fails when one branch contains a directory with the name of a file in the other branch
  2007-05-07 11:07 Checkout fails when one branch contains a directory with the name of a file in the other branch Tom Koelman
@ 2007-05-07 11:31 ` Johannes Schindelin
  2007-05-07 11:32   ` Tom Koelman
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2007-05-07 11:31 UTC (permalink / raw)
  To: Tom Koelman; +Cc: git

Hi,

On Mon, 7 May 2007, Tom Koelman wrote:

> I am not sure whether this is intentional or not. I am wondering why
> this scenario fails, and if it is by design, how I should handle this
> situation:
>
> [...]
> 
> $ git checkout master
> fatal: Untracked working tree file 'aFile' would be overwritten by merge.

I tried to reproduce this behaviour, but it worked here. What Git version 
do you use? Mine says "git version 1.5.2.rc2.2435.ge5a9b".

Hth,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Checkout fails when one branch contains a directory with the name of a file in the other branch
  2007-05-07 11:31 ` Johannes Schindelin
@ 2007-05-07 11:32   ` Tom Koelman
  2007-05-07 13:00     ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Koelman @ 2007-05-07 11:32 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

Johannes Schindelin wrote:
> Hi,
> 
> On Mon, 7 May 2007, Tom Koelman wrote:
> 
>> I am not sure whether this is intentional or not. I am wondering why
>> this scenario fails, and if it is by design, how I should handle this
>> situation:
>>
>> [...]
>>
>> $ git checkout master
>> fatal: Untracked working tree file 'aFile' would be overwritten by merge.
> 
> I tried to reproduce this behaviour, but it worked here. What Git version 
> do you use? Mine says "git version 1.5.2.rc2.2435.ge5a9b".
> 
> Hth,
> Dscho

I tried 1.5.1.3 under cygwin and 1.5.0.6 under Linux FC5.

Regards,
Tom Koelman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Checkout fails when one branch contains a directory with the name of a file in the other branch
  2007-05-07 11:32   ` Tom Koelman
@ 2007-05-07 13:00     ` Johannes Schindelin
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2007-05-07 13:00 UTC (permalink / raw)
  To: Tom Koelman; +Cc: git

Hi,

On Mon, 7 May 2007, Tom Koelman wrote:

> Johannes Schindelin wrote:
> 
> > On Mon, 7 May 2007, Tom Koelman wrote:
> > 
> > > I am not sure whether this is intentional or not. I am wondering why
> > > this scenario fails, and if it is by design, how I should handle this
> > > situation:
> > > 
> > > [...]
> > > 
> > > $ git checkout master
> > > fatal: Untracked working tree file 'aFile' would be overwritten by merge.
> > 
> > I tried to reproduce this behaviour, but it worked here. What Git version
> > do you use? Mine says "git version 1.5.2.rc2.2435.ge5a9b".
> > 
> > Hth,
> > Dscho
> 
> I tried 1.5.1.3 under cygwin and 1.5.0.6 under Linux FC5.

I can confirm that it reproduces with 1.5.1.3. So, it has been fixed in 
1.5.2.rc2.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-07 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-07 11:07 Checkout fails when one branch contains a directory with the name of a file in the other branch Tom Koelman
2007-05-07 11:31 ` Johannes Schindelin
2007-05-07 11:32   ` Tom Koelman
2007-05-07 13:00     ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).