git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: fsck --full is Ok, but clones are not, "missing commits"?!

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Apr 17, 2008, 15:41 UTC
Message-ID
<48076F94.7030206@nrlssc.navy.mil>
In-Reply-To
<a537dd660804170753i4dcfd189m45a9581294ce5091@mail.gmail.com>
Brian Foster wrote:
Show 8 quoted lines
>  before trying the copying suggestion, I played some
>  more with `filter-branch'.  I had no success at all.
>  as one example, with `--branches' instead of `--all'
>  (one of Brandon's suggestions) produced:
> 
> 	$ git filter-branch --tag-name-filter cat -- --branches
> 	Which ref do you want to rewrite?
> 	$

That's strange. Are there any branches in this repository? Yes, looking at your earlier email:

  at toplevel of a (not-bare) clone, with  info/grafts  in-place,
  and a happy `fsck -full' (same machine so same git version):
	$ git filter-branch --tag-name-filter cat -- --all  # at not-bare toplevel
	Rewrite 7df30811617517bc4d5ec7c190a435667228320c (168/168)
	Ref 'refs/heads/master' was rewritten
	Ref 'refs/remotes/origin/HEAD' was rewritten
  [snip]
Looks like there is a single branch named 'master'.
The command within git-filter-branch.sh that is being called is
   git rev-parse --no-flags --revs-only --symbolic-full-name --default HEAD --branches
In a trim git repository for example this command returns:
   refs/heads/master
   refs/heads/next

Referring to two branches 'master' and 'next'. These are the references that exist in .git/refs/heads/*.

I'd be interested to see what this command returns in your repo. You can compare this output to the output you get using --all and also relate that to the directory structure beneath .git/refs/

-brandon
p.s. It's more polite to keep the people you are responding to in the cc list.
     Take a look at how Hannes did it (the email to which this one is replying).
     Usually it's enough to select 'Reply All'.
Previous: Brian FosterNext: Brian Foster
Message 6 of 9 in “Re: fsck --full is Ok, but clones are not, "missing commits"?!”
  1. Brian FosterApr 16, 2008
  2. Johannes SixtApr 16, 2008
  3. Brandon CaseyApr 16, 2008
  4. Dmitry PotapovApr 16, 2008
  5. Brian FosterApr 17, 2008
  6. Brandon CaseyApr 17, 2008
  7. Brian FosterApr 18, 2008
  8. Johannes SixtApr 18, 2008
  9. Brian FosterApr 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.