]> git.ipfire.org Git - thirdparty/git.git/blobdiff - tmp-objdir.h
Merge branch 'l10n-tr' of github.com:bitigchi/git-po
[thirdparty/git.git] / tmp-objdir.h
index cda5ec7677881c5a47bb5f2ebf3edc3a3140a73c..237d96b66050c82340af3c18b531bd5c877c15ab 100644 (file)
  *
  * Example:
  *
+ *     struct child_process child = CHILD_PROCESS_INIT;
  *     struct tmp_objdir *t = tmp_objdir_create("incoming");
- *     if (!run_command_v_opt_cd_env(cmd, 0, NULL, tmp_objdir_env(t)) &&
- *         !tmp_objdir_migrate(t))
+ *     strvec_push(&child.args, cmd);
+ *     strvec_pushv(&child.env, tmp_objdir_env(t));
+ *     if (!run_command(&child)) && !tmp_objdir_migrate(t))
  *             printf("success!\n");
  *     else
  *             die("failed...tmp_objdir will clean up for us");
@@ -46,6 +48,12 @@ int tmp_objdir_migrate(struct tmp_objdir *);
  */
 int tmp_objdir_destroy(struct tmp_objdir *);
 
+/*
+ * Remove all objects from the temporary object directory, while leaving it
+ * around so more objects can be added.
+ */
+void tmp_objdir_discard_objects(struct tmp_objdir *);
+
 /*
  * Add the temporary object directory as an alternate object store in the
  * current process.