Daniel Barkalow | 4250a5e | 2005-04-30 23:53:56 | [diff] [blame] | 1 | #ifndef PULL_H |
| 2 | #define PULL_H |
| 3 | |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 4 | /* |
| 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 Barkalow | 4250a5e | 2005-04-30 23:53:56 | [diff] [blame] | 9 | extern int fetch(unsigned char *sha1); |
| 10 | |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 11 | /* |
barkalow@iabervon.org | 1e8be59 | 2005-08-02 23:46:10 | [diff] [blame] | 12 | * 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 | */ |
| 16 | extern void prefetch(unsigned char *sha1); |
| 17 | |
| 18 | /* |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 19 | * 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 Barkalow | cd541a6 | 2005-06-06 20:38:26 | [diff] [blame] | 23 | extern int fetch_ref(char *ref, unsigned char *sha1); |
| 24 | |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 25 | /* If set, the ref filename to write the target value to. */ |
Daniel Barkalow | cd541a6 | 2005-06-06 20:38:26 | [diff] [blame] | 26 | extern const char *write_ref; |
| 27 | |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 28 | /* If set, the hash that the current value of write_ref must be. */ |
Daniel Barkalow | cd541a6 | 2005-06-06 20:38:26 | [diff] [blame] | 29 | extern const unsigned char *current_ref; |
| 30 | |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 31 | /* Set to fetch the target tree. */ |
Daniel Barkalow | 4250a5e | 2005-04-30 23:53:56 | [diff] [blame] | 32 | extern int get_tree; |
| 33 | |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 34 | /* Set to fetch the commit history. */ |
Daniel Barkalow | 4250a5e | 2005-04-30 23:53:56 | [diff] [blame] | 35 | extern int get_history; |
| 36 | |
Junio C Hamano | a81efcb | 2005-06-25 09:26:29 | [diff] [blame] | 37 | /* Set to fetch the trees in the commit history. */ |
Daniel Barkalow | 4250a5e | 2005-04-30 23:53:56 | [diff] [blame] | 38 | extern int get_all; |
| 39 | |
Junio C Hamano | e78d977 | 2005-05-06 08:37:21 | [diff] [blame] | 40 | /* Set to be verbose */ |
| 41 | extern int get_verbosely; |
| 42 | |
Daniel Barkalow | 820eca6 | 2005-09-27 01:38:08 | [diff] [blame] | 43 | /* Set to check on all reachable objects. */ |
| 44 | extern int get_recover; |
| 45 | |
Junio C Hamano | e78d977 | 2005-05-06 08:37:21 | [diff] [blame] | 46 | /* Report what we got under get_verbosely */ |
| 47 | extern void pull_say(const char *, const char *); |
| 48 | |
Daniel Barkalow | 4250a5e | 2005-04-30 23:53:56 | [diff] [blame] | 49 | extern int pull(char *target); |
| 50 | |
| 51 | #endif /* PULL_H */ |