# Lost uncommitted changes and cogito

3 messages from 2005-06-09 to 2005-06-10. Participants: Jon Smirl, Chris Wedgwood.
Thread: https://gitlist.dev/t/886

## Jon Smirl, 2005-06-09 19:23

Subject: Lost uncommitted changes and cogito
Message-ID: <9e473391050609122372080863@mail.gmail.com>
URL: https://gitlist.dev/e/9e473391050609122372080863%40mail.gmail.com

```
Uning current updated cogito I have three trees:

linus
linux-good 
linux-merge

linux-merge had uncommitted changes

>From linus I did cg update which pulled from linus.
From linux-merge I did cg update which pulled from linus.

At this point the uncommitted changes in linux-merge were fine. 

Then I wasn't thinking and did cg update linux-good from linux-merge.
linux-merge was already update to date with linux-good since there
were no changes to linux-good pending. Doing that update created an
empty commit and also lost my uncommitted changes. Shouldn't that have
just done nothing?

>From first update in linux-merge:
Applying changes...
drivers/char/drm/Kconfig: locally modified
drivers/char/drm/drm_drv.c: locally modified
drivers/char/drm/radeon_drv.c: locally modified
drivers/char/drm/radeon_drv.h: locally modified
drivers/video/aty/radeon_base.c: locally modified
Merging 35d1bc90546d1f0af198886ae8062a550142d926 ->
cf380ee7308db0f067ceb2ae8b852838788bf453
        to 4952d9aaa928e711b0cd40c6a6d48b73544b88f0...

Committed as 941cc5f620f6f4827885bc3f03519416bd9461ab.
[jonsmirl@jonsmirl linux-merge]$ make

>From second - local changes are gone.
Applying changes...
Merging cf380ee7308db0f067ceb2ae8b852838788bf453 ->
a7db5e4f33e72569936af357084e31305fab6618
        to 941cc5f620f6f4827885bc3f03519416bd9461ab...

Committed as b0165eea961c7f2809a0aaabae7904a3a766ee05.
[jonsmirl@jonsmirl linux-merge]$ make


-- 
Jon Smirl
jonsmirl@gmail.com

```

## Jon Smirl, 2005-06-10 00:28

Subject: Re: Lost uncommitted changes and cogito
Message-ID: <9e4733910506091728761275d7@mail.gmail.com>
URL: https://gitlist.dev/e/9e4733910506091728761275d7%40mail.gmail.com
In-Reply-To: <9e473391050609122372080863@mail.gmail.com>

```
After experimenting for a while it looks like any cg update to a
branch that the repository wasn't initially cloned from will lose the
pending uncomitted changes.

-- 
Jon Smirl
jonsmirl@gmail.com

```

## Chris Wedgwood, 2005-06-10 16:20

Subject: Re: Lost uncommitted changes and cogito
Message-ID: <059176.ed2e86bb7f91c5a63977e0fe2c7a5cac.ANY@taniwha.stupidest.org>
URL: https://gitlist.dev/e/059176.ed2e86bb7f91c5a63977e0fe2c7a5cac.ANY%40taniwha.stupidest.org
In-Reply-To: <9e4733910506091728761275d7@mail.gmail.com>

```
On Thu, Jun 09, 2005 at 08:28:25PM -0400, Jon Smirl wrote:

> After experimenting for a while it looks like any cg update to a
> branch that the repository wasn't initially cloned from will lose
> the pending uncomitted changes.

I've had my current working tree trashed too a few times so I more or
less backup my tree before doing anything adventurous in case of
accidents or bugs.

I'd actually like to see checked out files being RO and needing some
kind of explicit "cg-edit <filename>" or similar to frob them to RW so
that we can use the R/W status in order to determine what files are
safe to mess with.

```
