From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Martin Ågren" <martin.agren@gmail.com>,
"Elijah Newren" <newren@gmail.com>,
"Derrick Stolee" <derrickstolee@github.com>,
"brian m . carlson" <sandals@crustytoothpaste.net>,
"Phillip Wood" <phillip.wood123@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v5 10/27] stash: always have the owner of "stash_info" free it
Date: Sat, 2 Apr 2022 12:49:24 +0200 [thread overview]
Message-ID: <patch-v5-10.27-4c5404912e9-20220402T102002Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-v5-00.27-00000000000-20220402T102002Z-avarab@gmail.com>
Change the initialization of the "revision" member of "struct
stash_info" to be initialized vi a macro, and more importantly that
that initializing function be tasked to free it, usually via a "goto
cleanup" pattern.
Despite the "revision" name (and the topic of the series containing
this commit) the "stash info" has nothing to do with the "struct
rev_info". I'm making this change because in the subsequent commit
when we do want to free the "struct rev_info" via a "goto cleanup"
pattern we'd otherwise free() uninitialized memory in some cases, as
we only strbuf_init() the string in get_stash_info().
So while it's not the smallest possible change, let's convert all
users of this pattern in the file while we're at it.
A good follow-up to this change would be to change all the "ret = -1;
goto done;" in this file to instead use a "goto cleanup", and
initialize "int ret = -1" at the start of the relevant functions. That
would allow us to drop a lot of needless brace verbosity on two-line
"if" statements, but let's leave that alone for now.
To ensure that there's a 1=1 mapping between owners of the "struct
stash_info" and free_stash_info() change the assert_stash_ref()
function to be a trivial get_stash_info_assert() wrapper. The caller
will call free_stash_info(), and by returning -1 we'll eventually (via
!!ret) exit with status 1 anyway.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
builtin/stash.c | 107 ++++++++++++++++++++++++++----------------------
1 file changed, 59 insertions(+), 48 deletions(-)
diff --git a/builtin/stash.c b/builtin/stash.c
index 74fa810cf8c..ba030238939 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -116,6 +116,10 @@ struct stash_info {
int has_u;
};
+#define STASH_INFO_INIT { \
+ .revision = STRBUF_INIT, \
+}
+
static void free_stash_info(struct stash_info *info)
{
strbuf_release(&info->revision);
@@ -157,10 +161,8 @@ static int get_stash_info(struct stash_info *info, int argc, const char **argv)
if (argc == 1)
commit = argv[0];
- strbuf_init(&info->revision, 0);
if (!commit) {
if (!ref_exists(ref_stash)) {
- free_stash_info(info);
fprintf_ln(stderr, _("No stash entries found."));
return -1;
}
@@ -174,11 +176,8 @@ static int get_stash_info(struct stash_info *info, int argc, const char **argv)
revision = info->revision.buf;
- if (get_oid(revision, &info->w_commit)) {
- error(_("%s is not a valid reference"), revision);
- free_stash_info(info);
- return -1;
- }
+ if (get_oid(revision, &info->w_commit))
+ return error(_("%s is not a valid reference"), revision);
assert_stash_like(info, revision);
@@ -197,7 +196,7 @@ static int get_stash_info(struct stash_info *info, int argc, const char **argv)
info->is_stash_ref = !strcmp(expanded_ref, ref_stash);
break;
default: /* Invalid or ambiguous */
- free_stash_info(info);
+ break;
}
free(expanded_ref);
@@ -598,10 +597,10 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
static int apply_stash(int argc, const char **argv, const char *prefix)
{
- int ret;
+ int ret = -1;
int quiet = 0;
int index = 0;
- struct stash_info info;
+ struct stash_info info = STASH_INFO_INIT;
struct option options[] = {
OPT__QUIET(&quiet, N_("be quiet, only report errors")),
OPT_BOOL(0, "index", &index,
@@ -613,9 +612,10 @@ static int apply_stash(int argc, const char **argv, const char *prefix)
git_stash_apply_usage, 0);
if (get_stash_info(&info, argc, argv))
- return -1;
+ goto cleanup;
ret = do_apply_stash(prefix, &info, index, quiet);
+cleanup:
free_stash_info(&info);
return ret;
}
@@ -651,20 +651,25 @@ static int do_drop_stash(struct stash_info *info, int quiet)
return 0;
}
-static void assert_stash_ref(struct stash_info *info)
+static int get_stash_info_assert(struct stash_info *info, int argc,
+ const char **argv)
{
- if (!info->is_stash_ref) {
- error(_("'%s' is not a stash reference"), info->revision.buf);
- free_stash_info(info);
- exit(1);
- }
+ int ret = get_stash_info(info, argc, argv);
+
+ if (ret < 0)
+ return ret;
+
+ if (!info->is_stash_ref)
+ return error(_("'%s' is not a stash reference"), info->revision.buf);
+
+ return 0;
}
static int drop_stash(int argc, const char **argv, const char *prefix)
{
- int ret;
+ int ret = -1;
int quiet = 0;
- struct stash_info info;
+ struct stash_info info = STASH_INFO_INIT;
struct option options[] = {
OPT__QUIET(&quiet, N_("be quiet, only report errors")),
OPT_END()
@@ -673,22 +678,21 @@ static int drop_stash(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, options,
git_stash_drop_usage, 0);
- if (get_stash_info(&info, argc, argv))
- return -1;
-
- assert_stash_ref(&info);
+ if (get_stash_info_assert(&info, argc, argv))
+ goto cleanup;
ret = do_drop_stash(&info, quiet);
+cleanup:
free_stash_info(&info);
return ret;
}
static int pop_stash(int argc, const char **argv, const char *prefix)
{
- int ret;
+ int ret = -1;
int index = 0;
int quiet = 0;
- struct stash_info info;
+ struct stash_info info = STASH_INFO_INIT;
struct option options[] = {
OPT__QUIET(&quiet, N_("be quiet, only report errors")),
OPT_BOOL(0, "index", &index,
@@ -699,25 +703,25 @@ static int pop_stash(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, options,
git_stash_pop_usage, 0);
- if (get_stash_info(&info, argc, argv))
- return -1;
+ if (get_stash_info_assert(&info, argc, argv))
+ goto cleanup;
- assert_stash_ref(&info);
if ((ret = do_apply_stash(prefix, &info, index, quiet)))
printf_ln(_("The stash entry is kept in case "
"you need it again."));
else
ret = do_drop_stash(&info, quiet);
+cleanup:
free_stash_info(&info);
return ret;
}
static int branch_stash(int argc, const char **argv, const char *prefix)
{
- int ret;
+ int ret = -1;
const char *branch = NULL;
- struct stash_info info;
+ struct stash_info info = STASH_INFO_INIT;
struct child_process cp = CHILD_PROCESS_INIT;
struct option options[] = {
OPT_END()
@@ -734,7 +738,7 @@ static int branch_stash(int argc, const char **argv, const char *prefix)
branch = argv[0];
if (get_stash_info(&info, argc - 1, argv + 1))
- return -1;
+ goto cleanup;
cp.git_cmd = 1;
strvec_pushl(&cp.args, "checkout", "-b", NULL);
@@ -746,8 +750,8 @@ static int branch_stash(int argc, const char **argv, const char *prefix)
if (!ret && info.is_stash_ref)
ret = do_drop_stash(&info, 0);
+cleanup:
free_stash_info(&info);
-
return ret;
}
@@ -825,8 +829,8 @@ static void diff_include_untracked(const struct stash_info *info, struct diff_op
static int show_stash(int argc, const char **argv, const char *prefix)
{
int i;
- int ret = 0;
- struct stash_info info;
+ int ret = -1;
+ struct stash_info info = STASH_INFO_INIT;
struct rev_info rev;
struct strvec stash_args = STRVEC_INIT;
struct strvec revision_args = STRVEC_INIT;
@@ -844,6 +848,7 @@ static int show_stash(int argc, const char **argv, const char *prefix)
UNTRACKED_ONLY, PARSE_OPT_NONEG),
OPT_END()
};
+ int do_usage = 0;
init_diff_ui_defaults();
git_config(git_diff_ui_config, NULL);
@@ -861,10 +866,8 @@ static int show_stash(int argc, const char **argv, const char *prefix)
strvec_push(&revision_args, argv[i]);
}
- ret = get_stash_info(&info, stash_args.nr, stash_args.v);
- strvec_clear(&stash_args);
- if (ret)
- return -1;
+ if (get_stash_info(&info, stash_args.nr, stash_args.v))
+ goto cleanup;
/*
* The config settings are applied only if there are not passed
@@ -878,16 +881,14 @@ static int show_stash(int argc, const char **argv, const char *prefix)
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
if (!show_stat && !show_patch) {
- free_stash_info(&info);
- return 0;
+ ret = 0;
+ goto cleanup;
}
}
argc = setup_revisions(revision_args.nr, revision_args.v, &rev, NULL);
- if (argc > 1) {
- free_stash_info(&info);
- usage_with_options(git_stash_show_usage, options);
- }
+ if (argc > 1)
+ goto usage;
if (!rev.diffopt.output_format) {
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
diff_setup_done(&rev.diffopt);
@@ -912,8 +913,16 @@ static int show_stash(int argc, const char **argv, const char *prefix)
}
log_tree_diff_flush(&rev);
+ ret = diff_result_code(&rev.diffopt, 0);
+cleanup:
+ strvec_clear(&stash_args);
free_stash_info(&info);
- return diff_result_code(&rev.diffopt, 0);
+ if (do_usage)
+ usage_with_options(git_stash_show_usage, options);
+ return ret;
+usage:
+ do_usage = 1;
+ goto cleanup;
}
static int do_store_stash(const struct object_id *w_commit, const char *stash_msg,
@@ -1409,9 +1418,9 @@ static int do_create_stash(const struct pathspec *ps, struct strbuf *stash_msg_b
static int create_stash(int argc, const char **argv, const char *prefix)
{
- int ret = 0;
+ int ret;
struct strbuf stash_msg_buf = STRBUF_INIT;
- struct stash_info info;
+ struct stash_info info = STASH_INFO_INIT;
struct pathspec ps;
/* Starting with argv[1], since argv[0] is "create" */
@@ -1426,6 +1435,7 @@ static int create_stash(int argc, const char **argv, const char *prefix)
if (!ret)
printf_ln("%s", oid_to_hex(&info.w_commit));
+ free_stash_info(&info);
strbuf_release(&stash_msg_buf);
return ret;
}
@@ -1434,7 +1444,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
int keep_index, int patch_mode, int include_untracked, int only_staged)
{
int ret = 0;
- struct stash_info info;
+ struct stash_info info = STASH_INFO_INIT;
struct strbuf patch = STRBUF_INIT;
struct strbuf stash_msg_buf = STRBUF_INIT;
struct strbuf untracked_files = STRBUF_INIT;
@@ -1633,6 +1643,7 @@ static int do_push_stash(const struct pathspec *ps, const char *stash_msg, int q
}
done:
+ free_stash_info(&info);
strbuf_release(&stash_msg_buf);
return ret;
}
--
2.35.1.1585.gd85f8dcb745
next prev parent reply other threads:[~2022-04-02 10:50 UTC|newest]
Thread overview: 252+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 13:16 [PATCH 00/24] revision.[ch]: add and use release_revisions() Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 01/24] t/helper/test-fast-rebase.c: don't leak "struct strbuf" Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 02/24] blame: use "goto cleanup" for cleanup_scoreboard() Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 03/24] format-patch: don't leak "extra_headers" or "ref_message_ids" Ævar Arnfjörð Bjarmason
2022-03-09 20:34 ` Taylor Blau
2022-03-09 13:16 ` [PATCH 04/24] revision.[ch]: split freeing of revs->commit into a function Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 05/24] revision.[ch]: provide and start using a release_revisions() Ævar Arnfjörð Bjarmason
2022-03-09 21:32 ` Taylor Blau
2022-03-09 22:57 ` Junio C Hamano
2022-03-10 0:28 ` Ævar Arnfjörð Bjarmason
2022-03-10 1:11 ` Junio C Hamano
2022-03-10 14:57 ` Ævar Arnfjörð Bjarmason
2022-03-10 14:56 ` Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 06/24] revisions API users: add straightforward release_revisions() Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 07/24] revisions API users: use release_revisions() needing "{ 0 }" init Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 08/24] revisions API users: add "goto cleanup" for release_revisions() Ævar Arnfjörð Bjarmason
2022-03-09 19:08 ` Derrick Stolee
2022-03-09 13:16 ` [PATCH 09/24] revisions API users: use release_revisions() in http-push.c Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 10/24] revisions API users: use release_revisions() in builtin/log.c Ævar Arnfjörð Bjarmason
2022-03-09 19:12 ` Derrick Stolee
2022-03-09 21:58 ` Taylor Blau
2022-03-09 21:53 ` Taylor Blau
2022-03-09 13:16 ` [PATCH 11/24] revisions API users: use release_revisions() with UNLEAK() Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 12/24] revisions API users: use release_revisions() in submodule.c edge case Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 13/24] revisions API users: use release_revisions() in wt-status.c " Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 14/24] revisions API users: use release_revisions() for "prune_data" users Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 15/24] revisions API: have release_revisions() release "commits" Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 16/24] revisions API: have release_revisions() release "mailmap" Ævar Arnfjörð Bjarmason
2022-03-09 19:17 ` Derrick Stolee
2022-03-09 13:16 ` [PATCH 17/24] revisions API: have release_revisions() release "cmdline" Ævar Arnfjörð Bjarmason
2022-03-09 19:19 ` Derrick Stolee
2022-03-10 15:10 ` Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 18/24] revisions API: have release_revisions() release "grep_filter" Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 19/24] revisions API: have release_revisions() release "prune_data" Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 20/24] revisions API: clear "boundary_commits" in release_revisions() Ævar Arnfjörð Bjarmason
2022-03-09 19:21 ` Derrick Stolee
2022-03-10 14:55 ` Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 21/24] revisions API: release "reflog_info" in release revisions() Ævar Arnfjörð Bjarmason
2022-03-09 19:24 ` Derrick Stolee
2022-03-10 0:13 ` Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 22/24] revisions API: call diff_free(&revs->pruning) in revisions_release() Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 23/24] revisions API: have release_revisions() release "date_mode" Ævar Arnfjörð Bjarmason
2022-03-09 13:16 ` [PATCH 24/24] revisions API: have release_revisions() release "topo_walk_info" Ævar Arnfjörð Bjarmason
2022-03-09 19:27 ` Derrick Stolee
2022-03-09 14:34 ` [PATCH 00/24] revision.[ch]: add and use release_revisions() Derrick Stolee
2022-03-09 19:30 ` Derrick Stolee
2022-03-09 19:39 ` Ævar Arnfjörð Bjarmason
2022-03-09 20:05 ` Junio C Hamano
2022-03-23 20:31 ` [PATCH v2 00/27] " Ævar Arnfjörð Bjarmason
2022-03-23 20:31 ` [PATCH v2 01/27] t/helper/test-fast-rebase.c: don't leak "struct strbuf" Ævar Arnfjörð Bjarmason
2022-03-24 4:13 ` Junio C Hamano
2022-03-24 16:57 ` Ævar Arnfjörð Bjarmason
2022-03-24 17:34 ` Junio C Hamano
2022-03-23 20:31 ` [PATCH v2 02/27] blame: use "goto cleanup" for cleanup_scoreboard() Ævar Arnfjörð Bjarmason
2022-03-24 4:23 ` Junio C Hamano
2022-03-23 20:31 ` [PATCH v2 03/27] string_list API users: use string_list_init_{no,}dup Ævar Arnfjörð Bjarmason
2022-03-23 20:31 ` [PATCH v2 04/27] format-patch: don't leak "extra_headers" or "ref_message_ids" Ævar Arnfjörð Bjarmason
2022-03-24 4:33 ` Junio C Hamano
2022-03-24 16:59 ` Ævar Arnfjörð Bjarmason
2022-03-23 20:31 ` [PATCH v2 05/27] revision.[ch]: split freeing of revs->commit into a function Ævar Arnfjörð Bjarmason
2022-03-24 4:33 ` Junio C Hamano
2022-03-24 17:01 ` Ævar Arnfjörð Bjarmason
2022-03-23 20:31 ` [PATCH v2 06/27] revision.[ch]: provide and start using a release_revisions() Ævar Arnfjörð Bjarmason
2022-03-24 4:43 ` Junio C Hamano
2022-03-24 17:02 ` Ævar Arnfjörð Bjarmason
2022-03-23 20:31 ` [PATCH v2 07/27] revisions API users: add straightforward release_revisions() Ævar Arnfjörð Bjarmason
2022-03-23 20:31 ` [PATCH v2 08/27] revisions API users: use release_revisions() needing "{ 0 }" init Ævar Arnfjörð Bjarmason
2022-03-24 4:53 ` Junio C Hamano
2022-03-24 17:04 ` Ævar Arnfjörð Bjarmason
2022-03-24 17:39 ` Junio C Hamano
2022-03-25 0:47 ` Junio C Hamano
2022-03-23 20:31 ` [PATCH v2 09/27] stash: always have the owner of "stash_info" free it Ævar Arnfjörð Bjarmason
2022-03-25 0:51 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 10/27] revisions API users: add "goto cleanup" for release_revisions() Ævar Arnfjörð Bjarmason
2022-03-25 0:52 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 11/27] revisions API users: use release_revisions() in http-push.c Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 12/27] revisions API users: use release_revisions() in builtin/log.c Ævar Arnfjörð Bjarmason
2022-03-25 1:03 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 13/27] revisions API users: use release_revisions() with UNLEAK() Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 14/27] revisions API users: use release_revisions() in submodule.c edge case Ævar Arnfjörð Bjarmason
2022-03-25 1:07 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 15/27] revisions API users: use release_revisions() for "prune_data" users Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 16/27] revisions API: have release_revisions() release "commits" Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 17/27] revisions API: have release_revisions() release "mailmap" Ævar Arnfjörð Bjarmason
2022-03-25 1:11 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 18/27] revisions API: have release_revisions() release "cmdline" Ævar Arnfjörð Bjarmason
2022-03-25 1:16 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 19/27] revisions API: have release_revisions() release "filter" Ævar Arnfjörð Bjarmason
2022-03-25 1:17 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 20/27] revisions API: have release_revisions() release "grep_filter" Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 21/27] revisions API: have release_revisions() release "prune_data" Ævar Arnfjörð Bjarmason
2022-03-25 1:20 ` Junio C Hamano
2022-03-23 20:32 ` [PATCH v2 22/27] revisions API: clear "boundary_commits" in release_revisions() Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 23/27] revisions API: release "reflog_info" in release revisions() Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 24/27] revisions API: call diff_free(&revs->pruning) in revisions_release() Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 25/27] revisions API: have release_revisions() release "date_mode" Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 26/27] revisions API: have release_revisions() release "topo_walk_info" Ævar Arnfjörð Bjarmason
2022-03-23 20:32 ` [PATCH v2 27/27] revisions API: add a TODO for diff_free(&revs->diffopt) Ævar Arnfjörð Bjarmason
2022-03-25 1:41 ` [PATCH v2 00/27] revision.[ch]: add and use release_revisions() Junio C Hamano
2022-03-25 9:14 ` Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 " Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 01/27] t/helper/test-fast-rebase.c: don't leak "struct strbuf" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 02/27] blame: use "goto cleanup" for cleanup_scoreboard() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 03/27] string_list API users: use string_list_init_{no,}dup Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 04/27] format-patch: don't leak "extra_headers" or "ref_message_ids" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 05/27] revision.[ch]: split freeing of revs->commit into a function Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 06/27] revision.[ch]: provide and start using a release_revisions() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 07/27] revisions API users: add straightforward release_revisions() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 08/27] revisions API users: add "goto cleanup" for "rev_info" early exit Ævar Arnfjörð Bjarmason
2022-03-25 20:30 ` Junio C Hamano
2022-03-26 0:37 ` Ævar Arnfjörð Bjarmason
2022-03-26 5:24 ` Junio C Hamano
2022-03-28 17:55 ` Derrick Stolee
2022-03-28 18:55 ` Ævar Arnfjörð Bjarmason
2022-03-28 20:03 ` Junio C Hamano
2022-03-25 17:18 ` [PATCH v3 09/27] revisions API users: use release_revisions() in submodule.c edge case Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 10/27] stash: always have the owner of "stash_info" free it Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 11/27] revisions API users: add "goto cleanup" for release_revisions() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 12/27] revisions API users: use release_revisions() in http-push.c Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 13/27] revisions API users: use release_revisions() in builtin/log.c Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 14/27] revisions API users: use release_revisions() with UNLEAK() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 15/27] revisions API users: use release_revisions() for "prune_data" users Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 16/27] revisions API: have release_revisions() release "commits" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 17/27] revisions API: have release_revisions() release "mailmap" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 18/27] revisions API: have release_revisions() release "cmdline" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 19/27] revisions API: have release_revisions() release "filter" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 20/27] revisions API: have release_revisions() release "grep_filter" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 21/27] revisions API: have release_revisions() release "prune_data" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 22/27] revisions API: clear "boundary_commits" in release_revisions() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 23/27] revisions API: release "reflog_info" in release revisions() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 24/27] revisions API: call diff_free(&revs->pruning) in revisions_release() Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 25/27] revisions API: have release_revisions() release "date_mode" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 26/27] revisions API: have release_revisions() release "topo_walk_info" Ævar Arnfjörð Bjarmason
2022-03-25 17:18 ` [PATCH v3 27/27] revisions API: add a TODO for diff_free(&revs->diffopt) Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 00/27] revision.[ch]: add and use release_revisions() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 01/27] t/helper/test-fast-rebase.c: don't leak "struct strbuf" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 02/27] blame: use "goto cleanup" for cleanup_scoreboard() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 03/27] string_list API users: use string_list_init_{no,}dup Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 04/27] format-patch: don't leak "extra_headers" or "ref_message_ids" Ævar Arnfjörð Bjarmason
2022-04-01 15:13 ` Phillip Wood
2022-04-01 17:16 ` Ævar Arnfjörð Bjarmason
2022-04-01 19:32 ` Junio C Hamano
2022-03-31 1:11 ` [PATCH v4 05/27] revision.[ch]: split freeing of revs->commit into a function Ævar Arnfjörð Bjarmason
2022-04-01 15:15 ` Phillip Wood
2022-04-01 17:03 ` Junio C Hamano
2022-03-31 1:11 ` [PATCH v4 06/27] revision.[ch]: provide and start using a release_revisions() Ævar Arnfjörð Bjarmason
2022-04-01 15:17 ` Phillip Wood
2022-04-01 17:25 ` Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 07/27] revisions API users: add straightforward release_revisions() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 08/27] revision.[ch]: document and move code declared around "init" Ævar Arnfjörð Bjarmason
2022-04-01 15:20 ` Phillip Wood
2022-03-31 1:11 ` [PATCH v4 09/27] revisions API users: use release_revisions() needing REV_INFO_INIT Ævar Arnfjörð Bjarmason
2022-03-31 21:14 ` Junio C Hamano
2022-04-01 10:31 ` Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 10/27] stash: always have the owner of "stash_info" free it Ævar Arnfjörð Bjarmason
2022-04-01 15:29 ` Phillip Wood
2022-04-01 17:29 ` Ævar Arnfjörð Bjarmason
2022-04-01 15:33 ` Phillip Wood
2022-03-31 1:11 ` [PATCH v4 11/27] revisions API users: add "goto cleanup" for release_revisions() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 12/27] revisions API users: use release_revisions() in http-push.c Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 13/27] revisions API users: use release_revisions() in builtin/log.c Ævar Arnfjörð Bjarmason
2022-04-02 9:22 ` Phillip Wood
2022-04-03 14:07 ` Ævar Arnfjörð Bjarmason
2022-04-04 9:27 ` Phillip Wood
2022-04-03 21:49 ` Junio C Hamano
2022-03-31 1:11 ` [PATCH v4 14/27] revisions API users: use release_revisions() with UNLEAK() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 15/27] revisions API users: use release_revisions() for "prune_data" users Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 16/27] revisions API: have release_revisions() release "commits" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 17/27] revisions API: have release_revisions() release "mailmap" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 18/27] revisions API: have release_revisions() release "cmdline" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 19/27] revisions API: have release_revisions() release "filter" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 20/27] revisions API: have release_revisions() release "grep_filter" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 21/27] revisions API: have release_revisions() release "prune_data" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 22/27] revisions API: clear "boundary_commits" in release_revisions() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 23/27] revisions API: release "reflog_info" in release revisions() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 24/27] revisions API: call diff_free(&revs->pruning) in revisions_release() Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 25/27] revisions API: have release_revisions() release "date_mode" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 26/27] revisions API: have release_revisions() release "topo_walk_info" Ævar Arnfjörð Bjarmason
2022-03-31 1:11 ` [PATCH v4 27/27] revisions API: add a TODO for diff_free(&revs->diffopt) Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 00/27] revision.[ch]: add and use release_revisions() Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 01/27] t/helper/test-fast-rebase.c: don't leak "struct strbuf" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 02/27] blame: use "goto cleanup" for cleanup_scoreboard() Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 03/27] string_list API users: use string_list_init_{no,}dup Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 04/27] format-patch: don't leak "extra_headers" or "ref_message_ids" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 05/27] cocci: add and apply free_commit_list() rules Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 06/27] revision.[ch]: provide and start using a release_revisions() Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 07/27] revisions API users: add straightforward release_revisions() Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 08/27] revision.[ch]: document and move code declared around "init" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 09/27] revisions API users: use release_revisions() needing REV_INFO_INIT Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` Ævar Arnfjörð Bjarmason [this message]
2022-04-02 10:49 ` [PATCH v5 11/27] revisions API users: add "goto cleanup" for release_revisions() Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 12/27] revisions API users: use release_revisions() in http-push.c Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 13/27] revisions API users: use release_revisions() in builtin/log.c Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 14/27] revisions API users: use release_revisions() with UNLEAK() Ævar Arnfjörð Bjarmason
2022-04-03 9:27 ` Phillip Wood
2022-04-03 13:55 ` Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 15/27] revisions API users: use release_revisions() for "prune_data" users Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 16/27] revisions API: have release_revisions() release "commits" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 17/27] revisions API: have release_revisions() release "mailmap" Ævar Arnfjörð Bjarmason
2022-04-03 9:33 ` Phillip Wood
2022-04-03 13:57 ` Ævar Arnfjörð Bjarmason
2022-04-04 9:19 ` Phillip Wood
2022-04-02 10:49 ` [PATCH v5 18/27] revisions API: have release_revisions() release "cmdline" Ævar Arnfjörð Bjarmason
2022-04-03 12:54 ` Phillip Wood
2022-04-03 14:01 ` Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 19/27] revisions API: have release_revisions() release "filter" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 20/27] revisions API: have release_revisions() release "grep_filter" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 21/27] revisions API: have release_revisions() release "prune_data" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 22/27] revisions API: clear "boundary_commits" in release_revisions() Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 23/27] revisions API: release "reflog_info" in release revisions() Ævar Arnfjörð Bjarmason
2022-04-03 15:19 ` Phillip Wood
2022-04-02 10:49 ` [PATCH v5 24/27] revisions API: call diff_free(&revs->pruning) in revisions_release() Ævar Arnfjörð Bjarmason
2022-04-03 13:00 ` Phillip Wood
2022-04-03 14:04 ` Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 25/27] revisions API: have release_revisions() release "date_mode" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 26/27] revisions API: have release_revisions() release "topo_walk_info" Ævar Arnfjörð Bjarmason
2022-04-02 10:49 ` [PATCH v5 27/27] revisions API: add a TODO for diff_free(&revs->diffopt) Ævar Arnfjörð Bjarmason
2022-04-03 13:07 ` [PATCH v5 00/27] revision.[ch]: add and use release_revisions() Phillip Wood
2022-04-03 14:18 ` Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 " Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 01/27] t/helper/test-fast-rebase.c: don't leak "struct strbuf" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 02/27] blame: use "goto cleanup" for cleanup_scoreboard() Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 03/27] string_list API users: use string_list_init_{no,}dup Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 04/27] format-patch: don't leak "extra_headers" or "ref_message_ids" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 05/27] cocci: add and apply free_commit_list() rules Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 06/27] revision.[ch]: provide and start using a release_revisions() Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 07/27] revisions API users: add straightforward release_revisions() Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 08/27] revision.[ch]: document and move code declared around "init" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 09/27] revisions API users: use release_revisions() needing REV_INFO_INIT Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 10/27] stash: always have the owner of "stash_info" free it Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 11/27] revisions API users: add "goto cleanup" for release_revisions() Ævar Arnfjörð Bjarmason
2022-07-11 18:06 ` Jeff King
2022-07-11 20:12 ` Ævar Arnfjörð Bjarmason
2022-07-12 6:54 ` Jeff King
2022-07-12 7:03 ` [PATCH] diff-files: move misplaced cleanup label Jeff King
2022-04-13 20:01 ` [PATCH v6 12/27] revisions API users: use release_revisions() in http-push.c Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 13/27] revisions API users: use release_revisions() in builtin/log.c Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 14/27] revisions API users: use release_revisions() with UNLEAK() Ævar Arnfjörð Bjarmason
2022-04-15 13:58 ` Phillip Wood
2022-04-13 20:01 ` [PATCH v6 15/27] revisions API users: use release_revisions() for "prune_data" users Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 16/27] revisions API: have release_revisions() release "commits" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 17/27] revisions API: have release_revisions() release "mailmap" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 18/27] revisions API: have release_revisions() release "cmdline" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 19/27] revisions API: have release_revisions() release "filter" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 20/27] revisions API: have release_revisions() release "grep_filter" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 21/27] revisions API: have release_revisions() release "prune_data" Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 22/27] revisions API: clear "boundary_commits" in release_revisions() Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 23/27] revisions API: release "reflog_info" in release revisions() Ævar Arnfjörð Bjarmason
2022-04-13 20:01 ` [PATCH v6 24/27] revisions API: call diff_free(&revs->pruning) in revisions_release() Ævar Arnfjörð Bjarmason
2022-04-14 5:56 ` [PATCH v6 25/27] revisions API: have release_revisions() release "date_mode" Ævar Arnfjörð Bjarmason
2022-04-14 5:56 ` [PATCH v6 26/27] revisions API: have release_revisions() release "topo_walk_info" Ævar Arnfjörð Bjarmason
2022-04-14 5:56 ` [PATCH v6 27/27] revisions API: add a TODO for diff_free(&revs->diffopt) Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=patch-v5-10.27-4c5404912e9-20220402T102002Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=martin.agren@gmail.com \
--cc=newren@gmail.com \
--cc=phillip.wood123@gmail.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).