* Losing branches (whee, data loss)
@ 2007-05-16 5:18 Jeff Garzik
2007-05-16 5:48 ` Lars Hjemli
2007-05-16 6:12 ` Junio C Hamano
0 siblings, 2 replies; 10+ messages in thread
From: Jeff Garzik @ 2007-05-16 5:18 UTC (permalink / raw)
To: Git Mailing List
Grumble!
When all this started, the branch 'upstream-fixes' exists, and branch
'tmp' does not exist. This is my local clone of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
[jgarzik@pretzel libata-dev]$ git branch -m upstream-fixes tmp
error: Could not open config file!
fatal: Branch rename failed
[jgarzik@pretzel libata-dev]$ git-branch -m upstream-fixes tmp
fatal: A branch named 'tmp' already exists.
[jgarzik@pretzel libata-dev]$ git branch -D tmp
Deleted branch tmp.
[jgarzik@pretzel libata-dev]$ git-branch -m upstream-fixes tmp
error: refname refs/heads/upstream-fixes not found
fatal: Branch rename failed
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 5:18 Losing branches (whee, data loss) Jeff Garzik
@ 2007-05-16 5:48 ` Lars Hjemli
2007-05-16 5:54 ` Jeff Garzik
2007-05-16 6:12 ` Junio C Hamano
1 sibling, 1 reply; 10+ messages in thread
From: Lars Hjemli @ 2007-05-16 5:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Git Mailing List
On 5/16/07, Jeff Garzik <jeff@garzik.org> wrote:
> [jgarzik@pretzel libata-dev]$ git branch -m upstream-fixes tmp
> error: Could not open config file!
> fatal: Branch rename failed
This should have been fixed in v1.5.1.1, what version do you run?
> [jgarzik@pretzel libata-dev]$ git-branch -m upstream-fixes tmp
> fatal: A branch named 'tmp' already exists.
>
> [jgarzik@pretzel libata-dev]$ git branch -D tmp
> Deleted branch tmp.
Could you try to run "git log -g" and see if it finds your lost branch?
--
larsh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 5:48 ` Lars Hjemli
@ 2007-05-16 5:54 ` Jeff Garzik
2007-05-16 6:14 ` Jan Hudec
0 siblings, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2007-05-16 5:54 UTC (permalink / raw)
To: Lars Hjemli; +Cc: Git Mailing List
Lars Hjemli wrote:
> On 5/16/07, Jeff Garzik <jeff@garzik.org> wrote:
>> [jgarzik@pretzel libata-dev]$ git branch -m upstream-fixes tmp
>> error: Could not open config file!
>> fatal: Branch rename failed
>
> This should have been fixed in v1.5.1.1, what version do you run?
[jgarzik@core ~]$ rpm -q git-core
git-core-1.5.0.6-1.fc6
>> [jgarzik@pretzel libata-dev]$ git-branch -m upstream-fixes tmp
>> fatal: A branch named 'tmp' already exists.
>>
>> [jgarzik@pretzel libata-dev]$ git branch -D tmp
>> Deleted branch tmp.
>
> Could you try to run "git log -g" and see if it finds your lost branch?
Doesn't seem to..
Thanks,
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 5:18 Losing branches (whee, data loss) Jeff Garzik
2007-05-16 5:48 ` Lars Hjemli
@ 2007-05-16 6:12 ` Junio C Hamano
2007-05-16 6:40 ` Jeff Garzik
1 sibling, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2007-05-16 6:12 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Git Mailing List
Jeff Garzik <jeff@garzik.org> writes:
> Grumble!
>
> When all this started, the branch 'upstream-fixes' exists, and branch
> 'tmp' does not exist. This is my local clone of
> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
>
> [jgarzik@pretzel libata-dev]$ git branch -m upstream-fixes tmp
> error: Could not open config file!
> fatal: Branch rename failed
Sorry to hear that.
We used to have a problem with "branch -m" when you did not have
a .git/config file (or it was unwritable). I think 1.5.0.X
series and 1.5.1 release had this bug; 1.5.1.1 and later should
have the appropriate fix.
Was this really a "whee, data loss", I wonder...?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 5:54 ` Jeff Garzik
@ 2007-05-16 6:14 ` Jan Hudec
2007-05-16 6:40 ` Jeff Garzik
0 siblings, 1 reply; 10+ messages in thread
From: Jan Hudec @ 2007-05-16 6:14 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Lars Hjemli, Git Mailing List
On Wed, May 16, 2007 at 01:54:35AM -0400, Jeff Garzik wrote:
> Lars Hjemli wrote:
> >On 5/16/07, Jeff Garzik <jeff@garzik.org> wrote:
> >>[jgarzik@pretzel libata-dev]$ git branch -m upstream-fixes tmp
> >>error: Could not open config file!
> >>fatal: Branch rename failed
> >
> >This should have been fixed in v1.5.1.1, what version do you run?
>
> [jgarzik@core ~]$ rpm -q git-core
> git-core-1.5.0.6-1.fc6
>
>
> >>[jgarzik@pretzel libata-dev]$ git-branch -m upstream-fixes tmp
> >>fatal: A branch named 'tmp' already exists.
> >>
> >>[jgarzik@pretzel libata-dev]$ git branch -D tmp
> >>Deleted branch tmp.
> >
> >Could you try to run "git log -g" and see if it finds your lost branch?
>
> Doesn't seem to..
And does the .git/logs/refs/heads/upstream-fixes still exist?
If it does, than revspec upstream-fixes@{1} would still work, so you can
check it out, re-create the branch and update the ref (git update-ref).
If it does not, as last resort you'd have to git fsck --unreachable
(this gives you all things that are not reachable from any ref), filter
out only commit objects and than remember which one should have been on
that branch after reading it's log, date and changes.
--------------------------------------------------------------------------------
- Jan Hudec `Bulb' <bulb@ucw.cz>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 6:12 ` Junio C Hamano
@ 2007-05-16 6:40 ` Jeff Garzik
0 siblings, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2007-05-16 6:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
Junio C Hamano wrote:
> Jeff Garzik <jeff@garzik.org> writes:
>
>> Grumble!
>>
>> When all this started, the branch 'upstream-fixes' exists, and branch
>> 'tmp' does not exist. This is my local clone of
>> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
>>
>> [jgarzik@pretzel libata-dev]$ git branch -m upstream-fixes tmp
>> error: Could not open config file!
>> fatal: Branch rename failed
>
> Sorry to hear that.
>
> We used to have a problem with "branch -m" when you did not have
> a .git/config file (or it was unwritable). I think 1.5.0.X
> series and 1.5.1 release had this bug; 1.5.1.1 and later should
> have the appropriate fix.
Using the latest version from Fedora Extras: git-core-1.5.0.6-1.fc6
> Was this really a "whee, data loss", I wonder...?
The branches definitely went away. The sha1-indexed commits are
probably still there...
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 6:14 ` Jan Hudec
@ 2007-05-16 6:40 ` Jeff Garzik
2007-05-16 6:43 ` Junio C Hamano
2007-05-16 7:10 ` Lars Hjemli
0 siblings, 2 replies; 10+ messages in thread
From: Jeff Garzik @ 2007-05-16 6:40 UTC (permalink / raw)
To: Jan Hudec; +Cc: Lars Hjemli, Git Mailing List
Jan Hudec wrote:
> And does the .git/logs/refs/heads/upstream-fixes still exist?
Nope.
> If it does not, as last resort you'd have to git fsck --unreachable
> (this gives you all things that are not reachable from any ref), filter
> out only commit objects and than remember which one should have been on
> that branch after reading it's log, date and changes.
Yeah, that will probably recover it. I wound up digging the emails out
of the trash bin, and applying them again.
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 6:40 ` Jeff Garzik
@ 2007-05-16 6:43 ` Junio C Hamano
2007-05-16 7:10 ` Lars Hjemli
1 sibling, 0 replies; 10+ messages in thread
From: Junio C Hamano @ 2007-05-16 6:43 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Jan Hudec, Lars Hjemli, Git Mailing List
Jeff Garzik <jeff@garzik.org> writes:
> Jan Hudec wrote:
>> And does the .git/logs/refs/heads/upstream-fixes still exist?
>
> Nope.
>
>
>> If it does not, as last resort you'd have to git fsck --unreachable
>> (this gives you all things that are not reachable from any ref), filter
>> out only commit objects and than remember which one should have been on
>> that branch after reading it's log, date and changes.
>
> Yeah, that will probably recover it. I wound up digging the emails
> out of the trash bin, and applying them again.
Ah, sorry to hear that. Trying to rename and lost both old and
new -- that is bad.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 6:40 ` Jeff Garzik
2007-05-16 6:43 ` Junio C Hamano
@ 2007-05-16 7:10 ` Lars Hjemli
2007-05-16 7:36 ` Junio C Hamano
1 sibling, 1 reply; 10+ messages in thread
From: Lars Hjemli @ 2007-05-16 7:10 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Jan Hudec, Git Mailing List
On 5/16/07, Jeff Garzik <jeff@garzik.org> wrote:
> Jan Hudec wrote:
> > And does the .git/logs/refs/heads/upstream-fixes still exist?
>
> Nope.
>
>
> > If it does not, as last resort you'd have to git fsck --unreachable
> > (this gives you all things that are not reachable from any ref), filter
> > out only commit objects and than remember which one should have been on
> > that branch after reading it's log, date and changes.
>
> Yeah, that will probably recover it. I wound up digging the emails out
> of the trash bin, and applying them again.
>
That's bad.
Just out of curiosity: do you get any output from 'git log RENAMED-REF'?
--
larsh
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Losing branches (whee, data loss)
2007-05-16 7:10 ` Lars Hjemli
@ 2007-05-16 7:36 ` Junio C Hamano
0 siblings, 0 replies; 10+ messages in thread
From: Junio C Hamano @ 2007-05-16 7:36 UTC (permalink / raw)
To: Lars Hjemli; +Cc: Jeff Garzik, Jan Hudec, Git Mailing List
"Lars Hjemli" <hjemli@gmail.com> writes:
> On 5/16/07, Jeff Garzik <jeff@garzik.org> wrote:
>> Jan Hudec wrote:
>> > And does the .git/logs/refs/heads/upstream-fixes still exist?
>>
>> Nope.
>>
>>
>> > If it does not, as last resort you'd have to git fsck --unreachable
>> > (this gives you all things that are not reachable from any ref), filter
>> > out only commit objects and than remember which one should have been on
>> > that branch after reading it's log, date and changes.
>>
>> Yeah, that will probably recover it. I wound up digging the emails out
>> of the trash bin, and applying them again.
>>
>
> That's bad.
>
> Just out of curiosity: do you get any output from 'git log RENAMED-REF'?
Another probably easier way to recover them would be 'git
lost-found'.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-05-16 7:36 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16 5:18 Losing branches (whee, data loss) Jeff Garzik
2007-05-16 5:48 ` Lars Hjemli
2007-05-16 5:54 ` Jeff Garzik
2007-05-16 6:14 ` Jan Hudec
2007-05-16 6:40 ` Jeff Garzik
2007-05-16 6:43 ` Junio C Hamano
2007-05-16 7:10 ` Lars Hjemli
2007-05-16 7:36 ` Junio C Hamano
2007-05-16 6:12 ` Junio C Hamano
2007-05-16 6:40 ` Jeff Garzik
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).