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

[BUG] Git 1.6.6 can't clone tags after filter-branch

From
JPJames Pickens <jepicken@gmail.com>
Date
Jan 19, 2010, 22:05 UTC
Message-ID
<885649361001191405x7a4ca1a2i153ad952c7d41ad7@mail.gmail.com>
Hi,
This series of commands:
  git init
  touch file1
  git add file1
  git commit -m 1
  echo >> file1
  touch file2
  git add file1 file2
  git commit -m 2
  git tag -m 'mytag' mytag
  git filter-branch --index-filter 'git rm --cached --ignore-unmatch file2' \
    --tag-name-filter cat -f -- --all
  git clone file://$PWD temp
Results in an error from the clone command:
  error: refs/tags/mytag does not point to a valid object!

The clone command exits with zero status, but the new repo doesn't contain the tag 'mytag'.

Version 1.6.2.5 did not have this problem.  It bisects to:
  commit 5bdc32d3e50d8335c65e136e6b5234c5dd92a7a9
  Author: Nicolas Pitre <nico@fluxnic.net>
  Date:   Fri Sep 25 23:54:42 2009 -0400
      make 'git clone' ask the remote only for objects it cares about
James
Message 1 of 1 in “[BUG] Git 1.6.6 can't clone tags after filter-branch”
  1. James PickensJan 19, 2010

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.