Allow writing invalid OIDs into refs for testing purposes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest8 patches 1 replyIn review
- v38 patches 1 replySuperseded
- v26 patches 11 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 1 reply | Superseded |
Changes in v4 from the cover letter
* fix stack OOB read due to missing array terminator.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | test-ref-store: remove force-create argument for create-reflogt/ t/ t/ | +4 | 0 replies | |
| 2/8 | test-ref-store: parse symbolic flag constantst/ t/ | +60 | 0 replies | |
| 3/8 | test-ref-store: plug memory leak in cmd_delete_refst/ | +4 | 0 replies | |
| 4/8 | refs: update comment.refs/ | +1 | 0 replies | |
| 5/8 | refs: introduce REF_SKIP_OID_VERIFICATION flagrefs.h refs/ t/ +2 more | +43 | 0 replies | |
| 6/8 | refs: introduce REF_SKIP_REFNAME_VERIFICATION flagrefs.c refs.h t/ +1 more | +45 | 0 replies | |
| 7/8 | t1430: remove refs using test-toolt/ | +12 | 0 replies | |
| 8/8 | t1430: create valid symrefs using test-helpert/ | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/8] Allow writing invalid OIDs into refs for testing purposes
this covers a few cases of direct filesystem access to the ref database in tests.
v4:
* fix stack OOB read due to missing array terminator.
Han-Wen Nienhuys (8):
test-ref-store: remove force-create argument for create-reflog
test-ref-store: parse symbolic flag constants
test-ref-store: plug memory leak in cmd_delete_refs
refs: update comment.
refs: introduce REF_SKIP_OID_VERIFICATION flag
refs: introduce REF_SKIP_REFNAME_VERIFICATION flag
t1430: remove refs using test-tool
t1430: create valid symrefs using test-helper
refs.c | 7 +-- refs.h | 16 +++++- refs/files-backend.c | 53 ++++++++++--------- t/helper/test-ref-store.c | 75 +++++++++++++++++++++++---- t/t1006-cat-file.sh | 5 +- t/t1405-main-ref-store.sh | 8 ++- t/t1406-submodule-ref-store.sh | 2 +- t/t1430-bad-ref-name.sh | 93 ++++++++++++++++++---------------- t/t3800-mktag.sh | 6 ++- 9 files changed, 172 insertions(+), 93 deletions(-)
base-commit: abe6bb3905392d5eb6b01fa6e54d7e784e0522aa
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1147%2Fhanwen%2Fskip-verification-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1147/hanwen/skip-verification-v4
Pull-Request: https://github.com/git/git/pull/1147
Range-diff vs v3:
1: 3649ef6d0fa = 1: 3649ef6d0fa test-ref-store: remove force-create argument for create-reflog
2: 3cdebd2dbca ! 2: 865458bc0cb test-ref-store: parse symbolic flag constants
@@ t/helper/test-ref-store.c
+ return result;
+}
+
-+static struct flag_definition empty_flags[] = {
-+ { NULL, 0 },
-+};
++static struct flag_definition empty_flags[] = { { NULL, 0 } };
+
static const char *notnull(const char *arg, const char *name)
{
@@ t/helper/test-ref-store.c: static const char **get_store(const char **argv, stru
return argv + 1;
}
-+static struct flag_definition pack_flags[] = {
-+ FLAG_DEF(PACK_REFS_PRUNE),
-+ FLAG_DEF(PACK_REFS_ALL),
-+};
++static struct flag_definition pack_flags[] = { FLAG_DEF(PACK_REFS_PRUNE),
++ FLAG_DEF(PACK_REFS_ALL),
++ { NULL, 0 } };
static int cmd_pack_refs(struct ref_store *refs, const char **argv)
{
@@ t/helper/test-ref-store.c: static int cmd_create_symref(struct ref_store *refs,
+static struct flag_definition transaction_flags[] = {
+ FLAG_DEF(REF_NO_DEREF),
+ FLAG_DEF(REF_FORCE_CREATE_REFLOG),
-+ { NULL, 0 },
++ { NULL, 0 }
+};
+
static int cmd_delete_refs(struct ref_store *refs, const char **argv)
3: 536005d65a2 = 3: dcd4e9f5f26 test-ref-store: plug memory leak in cmd_delete_refs
4: 466b4451015 = 4: 67d22211ac4 refs: update comment.
5: 89d692a34b8 ! 5: a8713dd59ee refs: introduce REF_SKIP_OID_VERIFICATION flag @@ t/helper/test-ref-store.c: static int cmd_create_symref(struct ref_store *refs,
FLAG_DEF(REF_NO_DEREF),
FLAG_DEF(REF_FORCE_CREATE_REFLOG),
+ FLAG_DEF(REF_SKIP_OID_VERIFICATION),
- { NULL, 0 },
+ { NULL, 0 }
};
6: af9e94935bf ! 6: 577726dc9df refs: introduce REF_SKIP_REFNAME_VERIFICATION flag
@@ t/helper/test-ref-store.c: static struct flag_definition transaction_flags[] = {
FLAG_DEF(REF_FORCE_CREATE_REFLOG), FLAG_DEF(REF_SKIP_OID_VERIFICATION),
+ FLAG_DEF(REF_SKIP_REFNAME_VERIFICATION),
- { NULL, 0 },
+ { NULL, 0 }
};
7: d4f1d209468 = 7: d85cfa3fee1 t1430: remove refs using test-tool 8: ca7f8aea3d9 = 8: 7597620ec83 t1430: create valid symrefs using test-helper
Signature · 1 line
gitgitgadget