git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 5/8] update-ref: support symrefs in the delete command

From
Karthik Nayak <karthik.188@gmail.com>
Date
Apr 23, 2024, 21:28 UTC
Message-ID
<20240423212818.574123-6-knayak@gitlab.com>
In-Reply-To
<20240423212818.574123-1-knayak@gitlab.com>
From: Karthik Nayak <karthik.188@gmail.com>

The 'delete' command in 'git-update-ref' allows users to delete `<ref>` after verifying it exists with `<old-oid>`, if given. Extend this command to alternatively take in `ref:<old-target>` which is used to verify if the symbolic ref targets the provided `<old-target>` before deletion. This will only work when used with the 'no-deref' mode as it doesn't make sense to deref a symref during deletion.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
 Documentation/git-update-ref.txt | 10 +++++---
 builtin/fetch.c                  |  2 +-
 builtin/receive-pack.c           |  3 ++-
 builtin/update-ref.c             | 18 +++++++++----
 refs.c                           | 12 ++++++---
 refs.h                           |  4 ++-
 refs/files-backend.c             |  2 +-
 refs/reftable-backend.c          |  2 +-
 t/t1400-update-ref.sh            | 44 ++++++++++++++++++++++++++++++++
 9 files changed, 79 insertions(+), 18 deletions(-)
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index 9f8c059944..f28b026cd7 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -63,7 +63,7 @@ performs all modifications together.  Specify commands of the form:
 
 	update SP <ref> SP <new-oid> [SP <old-oid>] LF
 	create SP <ref> SP <new-oid> LF
-	delete SP <ref> [SP <old-oid>] LF
+	delete SP <ref> [SP (<old-oid> | ref:<old-target>)] LF
 	verify SP <ref> [SP (<old-oid> | ref:<old-target>)] LF
 	option SP <opt> LF
 	start LF
@@ -84,7 +84,7 @@ quoting:
 
 	update SP <ref> NUL <new-oid> NUL [<old-oid>] NUL
 	create SP <ref> NUL <new-oid> NUL
-	delete SP <ref> NUL [<old-oid>] NUL
+	delete SP <ref> NUL [(<old-oid> | ref:<old-target>)] NUL
 	verify SP <ref> NUL [(<old-oid> | ref:<old-target>)] NUL
 	option SP <opt> NUL
 	start NUL
@@ -116,8 +116,10 @@ create::
 	exist.  The given <new-oid> may not be zero.
 
 delete::
-	Delete <ref> after verifying it exists with <old-oid>, if
-	given.  If given, <old-oid> may not be zero.
+	Delete <ref> after verifying it exists with <old-oid>, if given.
+	If given, <old-oid> may not be zero.  If instead, ref:<old-target>
+	is provided, verify that the symbolic ref <ref> targets
+	<old-target> before deleting it.
 
 verify::
 	Verify <ref> against <old-oid> but do not change it.  If
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 66840b7c5b..d02592efca 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1383,7 +1383,7 @@ static int prune_refs(struct display_state *display_state,
 		if (transaction) {
 			for (ref = stale_refs; ref; ref = ref->next) {
 				result = ref_transaction_delete(transaction, ref->name, NULL, 0,
-								"fetch: prune", &err);
+								NULL, "fetch: prune", &err);
 				if (result)
 					goto cleanup;
 			}
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index b150ef39a8..9a4667d57d 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1576,7 +1576,8 @@ static const char *update(struct command *cmd, struct shallow_info *si)
 		if (ref_transaction_delete(transaction,
 					   namespaced_name,
 					   old_oid,
-					   0, "push", &err)) {
+					   0, NULL,
+					   "push", &err)) {
 			rp_error("%s", err.buf);
 			ret = "failed to delete";
 		} else {
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 246167e835..cee7a5ebc0 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -274,6 +274,7 @@ static void parse_cmd_delete(struct ref_transaction *transaction,
 			     const char *next, const char *end)
 {
 	struct strbuf err = STRBUF_INIT;
+	struct strbuf old_target = STRBUF_INIT;
 	char *refname;
 	struct object_id old_oid;
 	int have_old;
@@ -282,26 +283,33 @@ static void parse_cmd_delete(struct ref_transaction *transaction,
 	if (!refname)
 		die("delete: missing <ref>");
 
-	if (parse_next_arg(&next, end, &old_oid, NULL,
-			   "delete", refname, PARSE_SHA1_OLD)) {
+	if (parse_next_arg(&next, end, &old_oid, &old_target,
+			   "delete", refname, PARSE_SHA1_OLD |
+			   PARSE_REFNAME_TARGETS)) {
 		have_old = 0;
 	} else {
-		if (is_null_oid(&old_oid))
+		if (!old_target.len && is_null_oid(&old_oid))
 			die("delete %s: zero <old-oid>", refname);
-		have_old = 1;
+		have_old = 1 && !old_target.len;
 	}
 
+	if (old_target.len && !(update_flags & REF_NO_DEREF))
+		die("delete %s: cannot operate on symrefs in deref mode", refname);
+
 	if (*next != line_termination)
 		die("delete %s: extra input: %s", refname, next);
 
 	if (ref_transaction_delete(transaction, refname,
 				   have_old ? &old_oid : NULL,
-				   update_flags, msg, &err))
+				   update_flags,
+				   old_target.len ? old_target.buf : NULL,
+				   msg, &err))
 		die("%s", err.buf);
 
 	update_flags = default_flags;
 	free(refname);
 	strbuf_release(&err);
+	strbuf_release(&old_target);
 }
 
 static void parse_cmd_verify(struct ref_transaction *transaction,
diff --git a/refs.c b/refs.c
index 0e1013b5ab..6b7c46bfd8 100644
--- a/refs.c
+++ b/refs.c
@@ -979,7 +979,7 @@ int refs_delete_ref(struct ref_store *refs, const char *msg,
 	transaction = ref_store_transaction_begin(refs, &err);
 	if (!transaction ||
 	    ref_transaction_delete(transaction, refname, old_oid,
-				   flags, msg, &err) ||
+				   flags, NULL, msg, &err) ||
 	    ref_transaction_commit(transaction, &err)) {
 		error("%s", err.buf);
 		ref_transaction_free(transaction);
@@ -1318,14 +1318,18 @@ int ref_transaction_create(struct ref_transaction *transaction,
 int ref_transaction_delete(struct ref_transaction *transaction,
 			   const char *refname,
 			   const struct object_id *old_oid,
-			   unsigned int flags, const char *msg,
+			   unsigned int flags,
+			   const char *old_target,
+			   const char *msg,
 			   struct strbuf *err)
 {
 	if (old_oid && is_null_oid(old_oid))
 		BUG("delete called with old_oid set to zeros");
+	if (old_target && !(flags & REF_NO_DEREF))
+		BUG("delete cannot operate on symrefs with deref mode");
 	return ref_transaction_update(transaction, refname,
 				      null_oid(), old_oid,
-				      NULL, NULL, flags,
+				      NULL, old_target, flags,
 				      msg, err);
 }
 
@@ -2752,7 +2756,7 @@ int refs_delete_refs(struct ref_store *refs, const char *logmsg,
 
 	for_each_string_list_item(item, refnames) {
 		ret = ref_transaction_delete(transaction, item->string,
-					     NULL, flags, msg, &err);
+					     NULL, flags, NULL, msg, &err);
 		if (ret) {
 			warning(_("could not delete reference %s: %s"),
 				item->string, err.buf);
diff --git a/refs.h b/refs.h
index 27b9aeaf54..4be4930f04 100644
--- a/refs.h
+++ b/refs.h
@@ -766,7 +766,9 @@ int ref_transaction_create(struct ref_transaction *transaction,
 int ref_transaction_delete(struct ref_transaction *transaction,
 			   const char *refname,
 			   const struct object_id *old_oid,
-			   unsigned int flags, const char *msg,
+			   unsigned int flags,
+			   const char *old_target,
+			   const char *msg,
 			   struct strbuf *err);
 
 /*
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 53197fa3af..fc5037fe5a 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2516,7 +2516,7 @@ static int lock_ref_for_update(struct files_ref_store *refs,
 
 	files_assert_main_repository(refs, "lock_ref_for_update");
 
-	if ((update->flags & REF_HAVE_NEW) && is_null_oid(&update->new_oid))
+	if ((update->flags & REF_HAVE_NEW) && ref_update_is_null_new_value(update))
 		update->flags |= REF_DELETING;
 
 	if (head_ref) {
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
index a2474245aa..2b2cbca8c0 100644
--- a/refs/reftable-backend.c
+++ b/refs/reftable-backend.c
@@ -1120,7 +1120,7 @@ static int write_transaction_table(struct reftable_writer *writer, void *cb_data
 		if (u->flags & REF_LOG_ONLY)
 			continue;
 
-		if (u->flags & REF_HAVE_NEW && is_null_oid(&u->new_oid)) {
+		if (u->flags & REF_HAVE_NEW && ref_update_is_null_new_value(u)) {
 			struct reftable_ref_record ref = {
 				.refname = (char *)u->refname,
 				.update_index = ts,
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 1f2b63755a..cd1ad0d2ec 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -1714,6 +1714,50 @@ do
 		test_cmp expect actual
 	'
 
+	test_expect_success "stdin ${type} delete symref fails without --no-deref" '
+		git symbolic-ref refs/heads/symref $a &&
+		create_stdin_buf ${type} "delete refs/heads/symref" "ref:$a" &&
+		test_must_fail git update-ref --stdin ${type} <stdin 2>err &&
+		grep "fatal: delete refs/heads/symref: cannot operate on symrefs in deref mode" err
+	'
+
+	test_expect_success "stdin ${type} delete symref fails with no ref" '
+		create_stdin_buf ${type} "delete " &&
+		test_must_fail git update-ref --stdin ${type} --no-deref <stdin 2>err &&
+		grep "fatal: delete: missing <ref>" err
+	'
+
+	test_expect_success "stdin ${type} delete symref fails with too many arguments" '
+		create_stdin_buf ${type} "delete refs/heads/symref" "ref:$a" "ref:$a" &&
+		test_must_fail git update-ref --stdin ${type} --no-deref <stdin 2>err &&
+		if test "$type" = "-z"
+		then
+			grep "fatal: unknown command: ref:$a" err
+		else
+			grep "fatal: delete refs/heads/symref: extra input:  ref:$a" err
+		fi
+	'
+
+	test_expect_success "stdin ${type} delete symref fails with wrong old value" '
+		create_stdin_buf ${type} "delete refs/heads/symref" "ref:$m" &&
+		test_must_fail git update-ref --stdin ${type} --no-deref <stdin 2>err &&
+		if test_have_prereq REFTABLE
+		then
+			grep "fatal: verifying symref target: ${SQ}refs/heads/symref${SQ}: is at $a but expected refs/heads/main" err
+		else
+			grep "fatal: cannot lock ref ${SQ}refs/heads/symref${SQ}" err
+		fi &&
+		git symbolic-ref refs/heads/symref >expect &&
+		echo $a >actual &&
+		test_cmp expect actual
+	'
+
+	test_expect_success "stdin ${type} delete symref works with right old value" '
+		create_stdin_buf ${type} "delete refs/heads/symref" "ref:$a" &&
+		git update-ref --stdin ${type} --no-deref <stdin &&
+		test_must_fail git rev-parse --verify -q $b
+	'
+
 done
 
 test_done
-- 
2.43.GIT
Previous: Karthik NayakNext: Karthik Nayak
Message 79 of 194 in “update-ref: add support for update-symref option”
  1. 0/8 update-ref: add support for update-symref optionKarthik Nayak, Mar 30, 2024
  2. 1/8 files-backend: extract out `create_symref_lock`Karthik Nayak, Mar 30, 2024
  3. Patrick SteinhardtApr 2, 2024
  4. Karthik NayakApr 3, 2024
  5. 2/8 reftable-backend: extract out `write_symref_with_log`Karthik Nayak, Mar 30, 2024
  6. Patrick SteinhardtApr 2, 2024
  7. 3/8 reftable-backend: move `write_symref_with_log` upKarthik Nayak, Mar 30, 2024
  8. 4/8 refs: accept symref in `ref_transaction_add_update`Karthik Nayak, Mar 30, 2024
  9. 5/8 refs/files-backend: add support for symref updatesKarthik Nayak, Mar 30, 2024
  10. Patrick SteinhardtApr 2, 2024
  11. 6/8 refs/reftable-backend: add support for symref updatesKarthik Nayak, Mar 30, 2024
  12. Patrick SteinhardtApr 2, 2024
  13. 7/8 refs: add 'update-symref' command to 'update-ref'Karthik Nayak, Mar 30, 2024
  14. Junio C HamanoMar 31, 2024
  15. Chris TorekMar 31, 2024
  16. Junio C HamanoMar 31, 2024
  17. Junio C HamanoApr 1, 2024
  18. Patrick SteinhardtApr 2, 2024
  19. Junio C HamanoApr 2, 2024
  20. Patrick SteinhardtApr 9, 2024
  21. Karthik NayakApr 9, 2024
  22. Patrick SteinhardtApr 10, 2024
  23. Junio C HamanoApr 10, 2024
  24. Patrick SteinhardtApr 10, 2024
  25. Karthik NayakApr 1, 2024
  26. Karthik NayakApr 1, 2024
  27. Junio C HamanoApr 1, 2024
  28. Junio C HamanoApr 1, 2024
  29. Karthik NayakApr 1, 2024
  30. 8/8 refs: support symrefs in 'reference-transaction' hookKarthik Nayak, Mar 30, 2024
  31. Patrick SteinhardtApr 2, 2024
  32. 0/7 update-ref: add symref oriented commandsKarthik Nayak, Apr 12, 2024
  33. 1/7 refs: accept symref values in `ref_transaction[_add]_update`Karthik Nayak, Apr 12, 2024
  34. Christian CouderApr 18, 2024
  35. Karthik NayakApr 19, 2024
  36. Phillip WoodApr 18, 2024
  37. Patrick SteinhardtApr 19, 2024
  38. Karthik NayakApr 19, 2024
  39. phillip.wood123@gmail.comMay 4, 2024
  40. Patrick SteinhardtApr 19, 2024
  41. Karthik NayakApr 19, 2024
  42. Patrick SteinhardtApr 23, 2024
  43. Karthik NayakApr 23, 2024
  44. 2/7 update-ref: add support for symref-verifyKarthik Nayak, Apr 12, 2024
  45. Christian CouderApr 18, 2024
  46. Karthik NayakApr 19, 2024
  47. Patrick SteinhardtApr 19, 2024
  48. Karthik NayakApr 19, 2024
  49. 3/7 update-ref: add support for symref-deleteKarthik Nayak, Apr 12, 2024
  50. Christian CouderApr 18, 2024
  51. Karthik NayakApr 21, 2024
  52. Patrick SteinhardtApr 19, 2024
  53. Karthik NayakApr 21, 2024
  54. 4/7 files-backend: extract out `create_symref_lock`Karthik Nayak, Apr 12, 2024
  55. 5/7 update-ref: add support for symref-createKarthik Nayak, Apr 12, 2024
  56. Patrick SteinhardtApr 19, 2024
  57. Junio C HamanoApr 19, 2024
  58. Karthik NayakApr 21, 2024
  59. Karthik NayakApr 21, 2024
  60. Patrick SteinhardtApr 23, 2024
  61. Karthik NayakApr 23, 2024
  62. 7/7 refs: support symrefs in 'reference-transaction' hookKarthik Nayak, Apr 12, 2024
  63. 6/7 update-ref: add support for symref-updateKarthik Nayak, Apr 12, 2024
  64. Patrick SteinhardtApr 19, 2024
  65. Karthik NayakApr 21, 2024
  66. Patrick SteinhardtApr 23, 2024
  67. Karthik NayakApr 23, 2024
  68. Junio C HamanoApr 12, 2024
  69. Karthik NayakApr 12, 2024
  70. Christian CouderApr 18, 2024
  71. Karthik NayakApr 21, 2024
  72. Patrick SteinhardtApr 20, 2024
  73. Karthik NayakApr 21, 2024
  74. 0/8 refs: add symref support to 'git-update-ref'Karthik Nayak, Apr 23, 2024
  75. 1/8 refs: accept symref values in `ref_transaction[_add]_update`Karthik Nayak, Apr 23, 2024
  76. 2/8 update-ref: support parsing ref targets in `parse_next_oid`Karthik Nayak, Apr 23, 2024
  77. 3/8 files-backend: extract out `create_symref_lock`Karthik Nayak, Apr 23, 2024
  78. 4/8 update-ref: support symrefs in the verify commandKarthik Nayak, Apr 23, 2024
  79. 5/8 update-ref: support symrefs in the delete commandKarthik Nayak, Apr 23, 2024
  80. 6/8 update-ref: support symrefs in the create commandKarthik Nayak, Apr 23, 2024
  81. 7/8 update-ref: support symrefs in the update commandKarthik Nayak, Apr 23, 2024
  82. 8/8 ref: support symrefs in 'reference-transaction' hookKarthik Nayak, Apr 23, 2024
  83. Jeff KingApr 23, 2024
  84. Junio C HamanoApr 24, 2024
  85. Karthik NayakApr 24, 2024
  86. Patrick SteinhardtApr 25, 2024
  87. Karthik NayakApr 25, 2024
  88. Junio C HamanoApr 25, 2024
  89. Karthik NayakApr 25, 2024
  90. Junio C HamanoApr 25, 2024
  91. Karthik NayakApr 26, 2024
  92. Jeff KingApr 26, 2024
  93. Junio C HamanoApr 25, 2024
  94. Karthik NayakApr 25, 2024
  95. 0/7 add symref-* commands to 'git-update-ref --stdin'Karthik Nayak, Apr 26, 2024
  96. 1/7 refs: accept symref values in `ref_transaction[_add]_update`Karthik Nayak, Apr 26, 2024
  97. Junio C HamanoApr 26, 2024
  98. Jeff KingApr 26, 2024
  99. Patrick SteinhardtApr 29, 2024
  100. Jeff KingApr 29, 2024
  101. phillip.wood123@gmail.comApr 29, 2024
  102. phillip.wood123@gmail.comApr 29, 2024
  103. Junio C HamanoApr 29, 2024
  104. Jeff KingApr 30, 2024
  105. Jeff KingApr 30, 2024
  106. Karthik NayakApr 28, 2024
  107. Phillip WoodApr 29, 2024
  108. Karthik NayakApr 29, 2024
  109. 2/7 files-backend: extract out `create_symref_lock`Karthik Nayak, Apr 26, 2024
  110. Junio C HamanoApr 26, 2024
  111. Karthik NayakApr 28, 2024
  112. 3/7 update-ref: add support for 'symref-verify' commandKarthik Nayak, Apr 26, 2024
  113. Junio C HamanoApr 26, 2024
  114. Karthik NayakApr 28, 2024
  115. 4/7 update-ref: add support for 'symref-delete' commandKarthik Nayak, Apr 26, 2024
  116. 5/7 update-ref: add support for 'symref-create' commandKarthik Nayak, Apr 26, 2024
  117. 6/7 update-ref: add support for 'symref-update' commandKarthik Nayak, Apr 26, 2024
  118. 7/7 ref: support symrefs in 'reference-transaction' hookKarthik Nayak, Apr 26, 2024
  119. Karthik NayakApr 30, 2024
  120. 0/7 refs: add support for transactional symref updatesKarthik Nayak, May 1, 2024
  121. 1/7 refs: accept symref values in `ref_transaction_update()`Karthik Nayak, May 1, 2024
  122. 2/7 files-backend: extract out `create_symref_lock()`Karthik Nayak, May 1, 2024
  123. Junio C HamanoMay 1, 2024
  124. Patrick SteinhardtMay 2, 2024
  125. Karthik NayakMay 2, 2024
  126. Junio C HamanoMay 2, 2024
  127. 3/7 refs: support symrefs in 'reference-transaction' hookKarthik Nayak, May 1, 2024
  128. Junio C HamanoMay 1, 2024
  129. Karthik NayakMay 2, 2024
  130. 4/7 refs: add support for transactional symref updatesKarthik Nayak, May 1, 2024
  131. Junio C HamanoMay 1, 2024
  132. Karthik NayakMay 2, 2024
  133. Patrick SteinhardtMay 2, 2024
  134. Karthik NayakMay 2, 2024
  135. Junio C HamanoMay 2, 2024
  136. Junio C HamanoMay 2, 2024
  137. Junio C HamanoMay 2, 2024
  138. 5/7 refs: use transaction in `refs_create_symref()`Karthik Nayak, May 1, 2024
  139. Patrick SteinhardtMay 2, 2024
  140. 6/7 refs: rename `refs_create_symref()` to `refs_update_symref()`Karthik Nayak, May 1, 2024
  141. Patrick SteinhardtMay 2, 2024
  142. Karthik NayakMay 2, 2024
  143. 7/7 refs: remove `create_symref` and associated dead codeKarthik Nayak, May 1, 2024
  144. Patrick SteinhardtMay 2, 2024
  145. Junio C HamanoMay 2, 2024
  146. Junio C HamanoMay 2, 2024
  147. Karthik NayakMay 2, 2024
  148. 0/7 refs: add support for transactional symref updatesKarthik Nayak, May 3, 2024
  149. 1/7 refs: accept symref values in `ref_transaction_update()`Karthik Nayak, May 3, 2024
  150. Phillip WoodMay 4, 2024
  151. Karthik NayakMay 5, 2024
  152. phillip.wood123@gmail.comMay 5, 2024
  153. 2/7 files-backend: extract out `create_symref_lock()`Karthik Nayak, May 3, 2024
  154. 3/7 refs: support symrefs in 'reference-transaction' hookKarthik Nayak, May 3, 2024
  155. 4/7 refs: add support for transactional symref updatesKarthik Nayak, May 3, 2024
  156. Phillip WoodMay 5, 2024
  157. Karthik NayakMay 5, 2024
  158. Phillip WoodMay 6, 2024
  159. Karthik NayakMay 6, 2024
  160. Phillip WoodMay 6, 2024
  161. Phillip WoodMay 6, 2024
  162. Karthik NayakMay 6, 2024
  163. Phillip WoodMay 6, 2024
  164. 5/7 refs: use transaction in `refs_create_symref()`Karthik Nayak, May 3, 2024
  165. 6/7 refs: rename `refs_create_symref()` to `refs_update_symref()`Karthik Nayak, May 3, 2024
  166. 7/7 refs: remove `create_symref` and associated dead codeKarthik Nayak, May 3, 2024
  167. Junio C HamanoMay 3, 2024
  168. Karthik NayakMay 4, 2024
  169. Junio C HamanoMay 3, 2024
  170. Patrick SteinhardtMay 6, 2024
  171. 0/8 refs: add support for transactional symref updatesKarthik Nayak, May 7, 2024
  172. 1/8 refs: accept symref values in `ref_transaction_update()`Karthik Nayak, May 7, 2024
  173. 2/8 files-backend: extract out `create_symref_lock()`Karthik Nayak, May 7, 2024
  174. 3/8 refs: support symrefs in 'reference-transaction' hookKarthik Nayak, May 7, 2024
  175. 4/8 refs: move `original_update_refname` to 'refs.c'Karthik Nayak, May 7, 2024
  176. 5/8 refs: add support for transactional symref updatesKarthik Nayak, May 7, 2024
  177. 6/8 refs: use transaction in `refs_create_symref()`Karthik Nayak, May 7, 2024
  178. 7/8 refs: rename `refs_create_symref()` to `refs_update_symref()`Karthik Nayak, May 7, 2024
  179. 8/8 refs: remove `create_symref` and associated dead codeKarthik Nayak, May 7, 2024
  180. Junio C HamanoMay 7, 2024
  181. Junio C HamanoMay 7, 2024
  182. 0/8 refs: add support for transactional symref updatesKarthik Nayak, May 7, 2024
  183. 1/8 refs: accept symref values in `ref_transaction_update()`Karthik Nayak, May 7, 2024
  184. 2/8 files-backend: extract out `create_symref_lock()`Karthik Nayak, May 7, 2024
  185. 3/8 refs: support symrefs in 'reference-transaction' hookKarthik Nayak, May 7, 2024
  186. 4/8 refs: move `original_update_refname` to 'refs.c'Karthik Nayak, May 7, 2024
  187. 5/8 refs: add support for transactional symref updatesKarthik Nayak, May 7, 2024
  188. 6/8 refs: use transaction in `refs_create_symref()`Karthik Nayak, May 7, 2024
  189. 7/8 refs: rename `refs_create_symref()` to `refs_update_symref()`Karthik Nayak, May 7, 2024
  190. 8/8 refs: remove `create_symref` and associated dead codeKarthik Nayak, May 7, 2024
  191. phillip.wood123@gmail.comMay 7, 2024
  192. Junio C HamanoMay 7, 2024
  193. Karthik NayakMay 12, 2024
  194. Junio C HamanoMay 13, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.