@@ -236,6 +236,8 @@ struct commit_graft {
236236typedef int (* each_commit_graft_fn )(const struct commit_graft * , void * );
237237
238238struct commit_graft * read_graft_line (struct strbuf * line );
239+ /* commit_graft_pos returns an index into r->parsed_objects->grafts. */
240+ int commit_graft_pos (struct repository * r , const unsigned char * sha1 );
239241int register_commit_graft (struct repository * r , struct commit_graft * , int );
240242void prepare_commit_graft (struct repository * r );
241243struct commit_graft * lookup_commit_graft (struct repository * r , const struct object_id * oid );
@@ -247,55 +249,7 @@ struct commit *get_fork_point(const char *refname, struct commit *commit);
247249
248250struct oid_array ;
249251struct ref ;
250- int register_shallow (struct repository * r , const struct object_id * oid );
251- int unregister_shallow (const struct object_id * oid );
252- int commit_shallow_file (struct repository * r , struct lock_file * lk );
253- void rollback_shallow_file (struct repository * r , struct lock_file * lk );
254252int for_each_commit_graft (each_commit_graft_fn , void * );
255- int is_repository_shallow (struct repository * r );
256- struct commit_list * get_shallow_commits (struct object_array * heads ,
257- int depth , int shallow_flag , int not_shallow_flag );
258- struct commit_list * get_shallow_commits_by_rev_list (
259- int ac , const char * * av , int shallow_flag , int not_shallow_flag );
260- void set_alternate_shallow_file (struct repository * r , const char * path , int override );
261- int write_shallow_commits (struct strbuf * out , int use_pack_protocol ,
262- const struct oid_array * extra );
263- void setup_alternate_shallow (struct lock_file * shallow_lock ,
264- const char * * alternate_shallow_file ,
265- const struct oid_array * extra );
266- const char * setup_temporary_shallow (const struct oid_array * extra );
267- void advertise_shallow_grafts (int );
268-
269- /*
270- * Initialize with prepare_shallow_info() or zero-initialize (equivalent to
271- * prepare_shallow_info with a NULL oid_array).
272- */
273- struct shallow_info {
274- struct oid_array * shallow ;
275- int * ours , nr_ours ;
276- int * theirs , nr_theirs ;
277- struct oid_array * ref ;
278-
279- /* for receive-pack */
280- uint32_t * * used_shallow ;
281- int * need_reachability_test ;
282- int * reachable ;
283- int * shallow_ref ;
284- struct commit * * commits ;
285- int nr_commits ;
286- };
287-
288- void prepare_shallow_info (struct shallow_info * , struct oid_array * );
289- void clear_shallow_info (struct shallow_info * );
290- void remove_nonexistent_theirs_shallow (struct shallow_info * );
291- void assign_shallow_commits_to_refs (struct shallow_info * info ,
292- uint32_t * * used ,
293- int * ref_status );
294- int delayed_reachability_test (struct shallow_info * si , int c );
295- #define PRUNE_SHOW_ONLY 1
296- #define PRUNE_QUICK 2
297- void prune_shallow (unsigned options );
298- extern struct trace_key trace_shallow ;
299253
300254int interactive_add (int argc , const char * * argv , const char * prefix , int patch );
301255int run_add_interactive (const char * revision , const char * patch_mode ,
0 commit comments