This patch implements a "negative" hide which causes matches to immediately be marked as unhidden, even if another match would hide it. If you hide a hierarchy of refs using the transfer.hideRefs config, there is no way to later override that config to "unhide" it. (Merged by Junio C Hamano - gitster - in commit 824a0be, ) refs: support negative transfer.hideRefs See commit 2bc31d1, commit cc118a6 () by Jeff King ( peff). Git 2.6 (Q3 2015) will improve that model. (The Gerrit case has already been solved through allowTipSHA1InWant as every Gerrit change has a ref.) when sharing a sha1 without telling which exact branch it belongs to and in Gerrit, if you think in terms of commits instead of change numbers.fetching only the needed data for a submodule checkout,.repositories containing large files in the history,. Repository, especially if a shallow fetch is used. This feature can be used when obtaining the content of a certain commit,įor which the sha1 is known, without the need of cloning the whole Note that there is an associated cost of having to walk back the history to check the reachability. the union of advertised branches and branches hidden by transfer.hideRefs, will be processed. Only objects reachable from the branch tips, i.e. With uploadpack.allowReachableSHA1InWant configuration option set on the server side, " git fetch" can make a request with a "want" line that names an object that has not been advertised (likely to have been obtained out of band or from a submodule pointer). The full documentation is: upload-pack: optionally allow fetching reachable sha1 Note that SHA must be the full unabbreviated SHA, otherwise Git will claim it couldn't find the commit Reachable from a ref, with uploadpack.allowReachableSHA1InWant " git upload-pack" that serves " git fetch" can be told to serveĬommits that are not at the tip of any ref, as long as they are You can use the git cat-file command to see that the commit has been fetched: git cat-file commit If you combine that server-side configuration with a shallow clone ( git fetch -depth=1), you can ask for a single commit (see t/t5516-fetch-push.sh: git fetch -depth=1. However, note that calculating object reachability is computationally expensive. You now have a new config (on the server side) uploadpack.allowReachableSHA1InWantĪllow upload-pack to accept a fetch request that asks for an object that is reachable from any ref tip. (Merged by Junio C Hamano - gitster - in commit a9d3493, ) See commit 68ee628 by Fredrik Medley ( moroten). Starting with Git version 2.5+ (Q2 2015), fetching a single commit (without cloning the full repo) is actually possible.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |