fast-import: convert to struct object_id
[gitweb.git] / builtin / am.c
index f08b7e6626021e425e4712763bee2236b8eab47b..a95dd8b4e6c793d9e51658e2ccbe535cf5a5af45 100644 (file)
@@ -134,17 +134,15 @@ struct am_state {
 };
 
 /**
- * Initializes am_state with the default values. The state directory is set to
- * dir.
+ * Initializes am_state with the default values.
  */
-static void am_state_init(struct am_state *state, const char *dir)
+static void am_state_init(struct am_state *state)
 {
        int gpgsign;
 
        memset(state, 0, sizeof(*state));
 
-       assert(dir);
-       state->dir = xstrdup(dir);
+       state->dir = git_pathdup("rebase-apply");
 
        state->prec = 4;
 
@@ -2323,7 +2321,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
 
        git_config(git_am_config, NULL);
 
-       am_state_init(&state, git_path("rebase-apply"));
+       am_state_init(&state);
 
        in_progress = am_in_progress(&state);
        if (in_progress)