Commits gone AWOL, but not reported by git-fsck --unreachable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Background:
-----------
Using git-svn to work with an external project (non-public), and the
other day I happened to run 'git-svn dcommit' right as their SVN went
down for a moment (under 5 seconds) for the snapshot-backup. I recall
swearing profusely at the time, but thought nothing of it after that,
until now, when I saw that parts of my tree weren't as they should be.

Problem:
--------
A bunch of my commits are NOT present in git-log, git-rev-list, or any
tool that provides the history of my branches.

If I hack around and recover the commitid, I can pass it to git-show,
and the commit does still exist in the data.

git-fsck --unreachable does not list the commit in question either, but
does list other blobs and trees.

Luckily, since the entire tree had ~900 commits, I was able to work some
magic and recovery my work:
1. Hack to get list of all commits
2. Exclude all commits that had git-svn-id in their description.
3. Exclude all merges.
4. Manually review all remaining commits (~70).

The following questions are mainly things that would have made my
recovery far easier.

Questions:
----------
1. Is there a plumbing tool to list EVERY single object of a given type
   (blob, tree, commit, tag) that git is aware of, regardless of it
   being reachable? (Right now I have a hack to read the pack index, and
   use find to find the non-packed object ids, then git-cat-file -t for
   the type).
2. A sane way to view an ordered set of commits, so that it should be
   possible to spot when there's a path of commits that went off and
   isn't used anymore.
3. Given a set of commits, list which are actually unique (in my tree,
   git-svn uses rebase often, so I have a lot of commits that are
   identical bar the commitid).
4. Strongly related to #4, given everything a commit, tell me what other
   identical commits exist in the tree.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Council Member
E-Mail     : robbat2@xxxxxxxxxx
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachment: pgpT89LnV2PnL.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux