summaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-11-11 07:29:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-12 01:09:55 (GMT)
commita3b0079c6a2e6336b061465623b8f2db308a6978 (patch)
tree9192306cee52de1be2a20b0c7ef99ba9d2b452b1 /run-command.h
parent7666cdedb4e73948690587cda61b256ea2367c56 (diff)
downloadgit-a3b0079c6a2e6336b061465623b8f2db308a6978.zip
git-a3b0079c6a2e6336b061465623b8f2db308a6978.tar.gz
git-a3b0079c6a2e6336b061465623b8f2db308a6978.tar.bz2
git-fetch: Always fetch tags if the object they reference exists
Previously git-fetch.sh used `git cat-file -t` to determine if an object referenced by a tag exists, and if so fetch that tag locally. This was subtly broken during the port to C based builtin-fetch as lookup_object() only works to locate an object if it was previously accessed by the transport. Not all transports will access all objects in this way, so tags were not always being fetched. The rsync transport never loads objects into the internal object table so automated tag following didn't work if rsync was used. Automated tag following also didn't work on the native transport if the new tag was behind the common point(s) negotiated between the two ends of the connection as the tag's referrant would not be loaded into the internal object table. Further the automated tag following was broken with the HTTP commit walker if the new tag's referrant was behind an existing ref, as the walker would stop before loading the tag's referrant into the object table. Switching to has_sha1_file() restores the original behavior from the shell script by checking if the object exists in the ODB, without relying on the state left behind by a transport. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'run-command.h')
0 files changed, 0 insertions, 0 deletions