summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-17 20:21:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-17 20:21:20 (GMT)
commit92251b1b5b5e53ac9de890105e2a2bd9d15e2ecb (patch)
treeed77d1e0ceaf2142ce14583a1b60c4af204571a0 /remote.h
parentd8cf714c0edf261a2bcc126fc240b10ed04a5b8d (diff)
parent3b32a7ca90b9c63f2306feb2a66b62b94c1a640f (diff)
downloadgit-92251b1b5b5e53ac9de890105e2a2bd9d15e2ecb.zip
git-92251b1b5b5e53ac9de890105e2a2bd9d15e2ecb.tar.gz
git-92251b1b5b5e53ac9de890105e2a2bd9d15e2ecb.tar.bz2
Merge branch 'nd/shallow-clone'
Fetching from a shallow-cloned repository used to be forbidden, primarily because the codepaths involved were not carefully vetted and we did not bother supporting such usage. This attempts to allow object transfer out of a shallow-cloned repository in a controlled way (i.e. the receiver become a shallow repository with truncated history). * nd/shallow-clone: (31 commits) t5537: fix incorrect expectation in test case 10 shallow: remove unused code send-pack.c: mark a file-local function static git-clone.txt: remove shallow clone limitations prune: clean .git/shallow after pruning objects clone: use git protocol for cloning shallow repo locally send-pack: support pushing from a shallow clone via http receive-pack: support pushing to a shallow clone via http smart-http: support shallow fetch/clone remote-curl: pass ref SHA-1 to fetch-pack as well send-pack: support pushing to a shallow clone receive-pack: allow pushes that update .git/shallow connected.c: add new variant that runs with --shallow-file add GIT_SHALLOW_FILE to propagate --shallow-file to subprocesses receive/send-pack: support pushing from a shallow clone receive-pack: reorder some code in unpack() fetch: add --update-shallow to accept refs that update .git/shallow upload-pack: make sure deepening preserves shallow roots fetch: support fetching from a shallow repository clone: support remote shallow repository ...
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/remote.h b/remote.h
index 00c6a76..fb7647f 100644
--- a/remote.h
+++ b/remote.h
@@ -109,6 +109,7 @@ struct ref {
REF_STATUS_REJECT_FETCH_FIRST,
REF_STATUS_REJECT_NEEDS_FORCE,
REF_STATUS_REJECT_STALE,
+ REF_STATUS_REJECT_SHALLOW,
REF_STATUS_UPTODATE,
REF_STATUS_REMOTE_REJECT,
REF_STATUS_EXPECTING_REPORT
@@ -138,13 +139,11 @@ int check_ref_type(const struct ref *ref, int flags);
*/
void free_refs(struct ref *ref);
-struct extra_have_objects {
- int nr, alloc;
- unsigned char (*array)[20];
-};
+struct sha1_array;
extern struct ref **get_remote_heads(int in, char *src_buf, size_t src_len,
struct ref **list, unsigned int flags,
- struct extra_have_objects *);
+ struct sha1_array *extra_have,
+ struct sha1_array *shallow);
int resolve_remote_symref(struct ref *ref, struct ref *list);
int ref_newer(const unsigned char *new_sha1, const unsigned char *old_sha1);