Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348793 - Can't obtain Git reflog
Summary: Can't obtain Git reflog
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Git (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 15:10 EDT by Miles Parker CLA
Modified: 2012-11-07 15:48 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Parker CLA 2011-06-08 15:10:13 EDT
Hi guys,

It appears that I've lost some commits for Indigo. :( Probably something I did on this end, and I'm trying a last ditch rescue. But when I run

>cd /gitroot/amp/org.eclipse.amp.git
>git reflog

vi gives me 

lines ?-?/? (END)

This has been happening for some time, but I haven't been sure whether I was doing the right thing with the command. Shouldn't I be seeing something here?

Previous bugs that might shed light..

bug 346923
bug 333051
Comment 1 Denis Roy CLA 2011-06-08 15:16:21 EDT
git log shows your commit history... I'm not sure what you're trying to do with git reflog directly on the master... Can you help me understand?

If I clone your repo, I see this:

$ git reflog
12fcbf1 HEAD@{0}: clone: from git://git.eclipse.org/gitroot/amp/org.eclipse.amp.git
Comment 2 Denis Roy CLA 2011-06-08 15:17:44 EDT
git log from both my clone, and directly in /gitroot on the server, both give me this:

$ git log
commit 12fcbf12efa90915b7726729abdf2ccd6ee7c823
Author: mparker <milesparker@gmail.com>
Date:   Wed Jun 8 11:57:28 2011 -0700

    GEF3D dependencies snuck into IDE and Escape.

commit f6e6b01e132090aa34f0528955628ec67b6489fc
Author: mparker <milesparker@gmail.com>
Date:   Tue Jun 7 13:48:38 2011 -0700

    Build final documentation.

commit 507068042ef675b89c9949b465dd4bcade891ca2
Author: mparker <milesparker@gmail.com>
Date:   Tue Jun 7 13:36:18 2011 -0700

    Update build categories.

commit c79b1f8c0ec014f676dce8c12f254260e1ab81fd
Author: mparker <milesparker@gmail.com>
Date:   Tue Jun 7 12:53:42 2011 -0700

[snip]
Comment 3 Miles Parker CLA 2011-06-08 15:26:39 EDT
THx for quick reply. What I'm trying to do is rescue some pushes that Jonas Ruettimann made. There should be a number of changes June 7 (yesterday) as well as some from a little over a week ago. I'm not sure why they went away..there was a permissions issue in the prior bug but that was resolved, and I know I saw his earlier changes from last week because I reviewed them. But now they are not showing up in the log. I'm guessing that I somehow messed up a merge, though I'm not sure how as I was careful to fetch before pushing stuff back.

My hope was that if I could locate the orphaned refs, pull those, and then attempt to merge them back, but I don't even know what the refs are. My understanding was that I could get all of the history by running reflog on the remote repos.
Comment 4 Denis Roy CLA 2011-06-09 10:23:59 EDT
> Ruettimann made. There should be a number of changes June 7 (yesterday) as well
> as some from a little over a week ago. I'm not sure why they went away..there

We can restore a copy of your repo from tape backup to a different location, so that you can compare the contents.  Let me know if that works, and what date you'd like.
Comment 5 Jonas Ruttimann CLA 2011-06-09 10:55:41 EDT
> We can restore a copy of your repo from tape backup to a different location, so
> that you can compare the contents.  Let me know if that works, and what date
> you'd like.

I think it's easier to merge back in my local repository. So far I haven't deleted anything. =)
Comment 6 Miles Parker CLA 2011-06-09 15:43:22 EDT
Thanks Denis. I guess my concern is "why did this happen, and how can we prevent it in future?". i.e. I wonder if it is something that we are doing wrong, or potentially something up with git related to the prior permisions issues with Jonas. I know that I never did a Reset, and I thought that that was the only way to lose the tree, and that is a bit concerning. We'll just have to keep an eye on it, I guess. I do wonder why we don't see anything in the reflog. Any ideas there?
Comment 7 Denis Roy CLA 2012-11-07 14:04:50 EST
We've since added mechanisms to help protect Git repos, such as denyDeletes and denyNonFastForward.  I'll close this as fixed.
Comment 8 Miles Parker CLA 2012-11-07 15:48:44 EST
+1