🌐 AI搜索 & 代理 主页
blob: be48c6f19092a81672dd24eb38e9ffca39f5b53c [file] [log] [blame]
Daniel Barkalow4250a5e2005-04-30 23:53:561#ifndef PULL_H
2#define PULL_H
3
Junio C Hamanoa81efcb2005-06-25 09:26:294/*
5 * Fetch object given SHA1 from the remote, and store it locally under
6 * GIT_OBJECT_DIRECTORY. Return 0 on success, -1 on failure. To be
7 * provided by the particular implementation.
8 */
Daniel Barkalow4250a5e2005-04-30 23:53:569extern int fetch(unsigned char *sha1);
10
Junio C Hamanoa81efcb2005-06-25 09:26:2911/*
barkalow@iabervon.org1e8be592005-08-02 23:46:1012 * Fetch the specified object and store it locally; fetch() will be
13 * called later to determine success. To be provided by the particular
14 * implementation.
15 */
16extern void prefetch(unsigned char *sha1);
17
18/*
Junio C Hamanoa81efcb2005-06-25 09:26:2919 * Fetch ref (relative to $GIT_DIR/refs) from the remote, and store
20 * the 20-byte SHA1 in sha1. Return 0 on success, -1 on failure. To
21 * be provided by the particular implementation.
22 */
Daniel Barkalowcd541a62005-06-06 20:38:2623extern int fetch_ref(char *ref, unsigned char *sha1);
24
Junio C Hamanoa81efcb2005-06-25 09:26:2925/* Set to fetch the target tree. */
Daniel Barkalow4250a5e2005-04-30 23:53:5626extern int get_tree;
27
Junio C Hamanoa81efcb2005-06-25 09:26:2928/* Set to fetch the commit history. */
Daniel Barkalow4250a5e2005-04-30 23:53:5629extern int get_history;
30
Junio C Hamanoa81efcb2005-06-25 09:26:2931/* Set to fetch the trees in the commit history. */
Daniel Barkalow4250a5e2005-04-30 23:53:5632extern int get_all;
33
Junio C Hamanoe78d9772005-05-06 08:37:2134/* Set to be verbose */
35extern int get_verbosely;
36
Daniel Barkalow820eca62005-09-27 01:38:0837/* Set to check on all reachable objects. */
38extern int get_recover;
39
Junio C Hamanoe78d9772005-05-06 08:37:2140/* Report what we got under get_verbosely */
41extern void pull_say(const char *, const char *);
42
Petr Baudis8e87ca62006-07-27 21:56:1943/* Load pull targets from stdin */
44extern int pull_targets_stdin(char ***target, const char ***write_ref);
45
46/* Free up loaded targets */
47extern void pull_targets_free(int targets, char **target, const char **write_ref);
48
Petr Baudisc6b69bd2006-07-27 21:56:1449/* If write_ref is set, the ref filename to write the target value to. */
50/* If write_ref_log_details is set, additional text will appear in the ref log. */
Petr Baudis4211e4d2006-07-27 21:56:1751extern int pull(int targets, char **target, const char **write_ref,
Petr Baudisc6b69bd2006-07-27 21:56:1452 const char *write_ref_log_details);
Daniel Barkalow4250a5e2005-04-30 23:53:5653
54#endif /* PULL_H */