summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-06-02 14:09:22 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-02 14:09:22 -0700
commited6e8038f98e7f15e571a9a291ee4acf438b4dc5 (patch)
tree82560db1d8fef5db3c449213f992bd26a5473ac5 /builtin
parentGit 2.9-rc1 (diff)
downloadtgif-ed6e8038f98e7f15e571a9a291ee4acf438b4dc5.tar.xz
pathspec: rename free_pathspec() to clear_pathspec()
The function takes a pointer to a pathspec structure, and releases the resources held by it, but does not free() the structure itself. Such a function should be called "clear", not "free". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c6
-rw-r--r--builtin/reset.c2
-rw-r--r--builtin/update-index.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 21f42b0b62..759d84affb 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -609,7 +609,7 @@ static struct origin *find_origin(struct scoreboard *sb,
}
}
diff_flush(&diff_opts);
- free_pathspec(&diff_opts.pathspec);
+ clear_pathspec(&diff_opts.pathspec);
return porigin;
}
@@ -651,7 +651,7 @@ static struct origin *find_rename(struct scoreboard *sb,
}
}
diff_flush(&diff_opts);
- free_pathspec(&diff_opts.pathspec);
+ clear_pathspec(&diff_opts.pathspec);
return porigin;
}
@@ -1343,7 +1343,7 @@ static void find_copy_in_parent(struct scoreboard *sb,
} while (unblamed);
target->suspects = reverse_blame(leftover, NULL);
diff_flush(&diff_opts);
- free_pathspec(&diff_opts.pathspec);
+ clear_pathspec(&diff_opts.pathspec);
}
/*
diff --git a/builtin/reset.c b/builtin/reset.c
index 092c3a5399..acd6278868 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -158,7 +158,7 @@ static int read_from_tree(const struct pathspec *pathspec,
return 1;
diffcore_std(&opt);
diff_flush(&opt);
- free_pathspec(&opt.pathspec);
+ clear_pathspec(&opt.pathspec);
return 0;
}
diff --git a/builtin/update-index.c b/builtin/update-index.c
index b8b8522249..6cdfd5f730 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -759,7 +759,7 @@ static int do_reupdate(int ac, const char **av,
if (save_nr != active_nr)
goto redo;
}
- free_pathspec(&pathspec);
+ clear_pathspec(&pathspec);
return 0;
}