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

[PATCH v2 6/7] update-ref: add support for symref-update

From
Karthik Nayak <karthik.188@gmail.com>
Date
Apr 12, 2024, 09:59 UTC
Message-ID
<20240412095908.1134387-7-knayak@gitlab.com>
In-Reply-To
<20240412095908.1134387-1-knayak@gitlab.com>
From: Karthik Nayak <karthik.188@gmail.com>

Add 'symref-update' to allow updates of symbolic refs in a transaction via the 'git-update-ref' command. The 'symref-update' command takes in a <new-ref>, which the <ref> will be updated to. If the <ref> doesn't exist it will be created.

It also optionally takes either an <old-ref> or <old-oid>. If the <old-ref> is provided, it checks to see if the <ref> ponints to the <old-ref> before the update. If <old-oid> is provided it checks <ref> to ensure that it is a regular ref and <old-oid> is the OID before the update. This by extension also means that this when a zero <old-oid> is provided, it ensures that the ref didn't exist before.

This command will also support deref mode, to ensure that we can update dereferenced regular refs to symrefs.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
 Documentation/git-update-ref.txt |   6 ++
 builtin/update-ref.c             |  49 +++++++++++
 refs.c                           |  24 ++----
 refs/files-backend.c             |  15 ++--
 refs/reftable-backend.c          |   7 +-
 t/t1400-update-ref.sh            | 143 +++++++++++++++++++++++++++++++
 6 files changed, 220 insertions(+), 24 deletions(-)
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index a5b1f42728..9710c9bc78 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -65,6 +65,7 @@ performs all modifications together.  Specify commands of the form:
 	create SP <ref> SP <new-oid> LF
 	delete SP <ref> [SP <old-oid>] LF
 	verify SP <ref> [SP <old-oid>] LF
+	symref-update SP <ref> SP <new-ref> [SP (<old-ref> | <old-oid>)] LF
 	symref-create SP <ref> SP <new-ref> LF
 	symref-delete SP <ref> [SP <old-ref>] LF
 	symref-verify SP <ref> [SP <old-ref>] LF
@@ -89,6 +90,7 @@ quoting:
 	create SP <ref> NUL <new-oid> NUL
 	delete SP <ref> NUL [<old-oid>] NUL
 	verify SP <ref> NUL [<old-oid>] NUL
+	symref-update SP <ref> NUL <new-ref> [NUL (<old-ref> | <old-oid>)] NUL
 	symref-create SP <ref> NUL <new-ref> NUL
 	symref-delete SP <ref> [NUL <old-ref>] NUL
 	symref-verify SP <ref> [NUL <old-ref>] NUL
@@ -123,6 +125,10 @@ verify::
 	Verify <ref> against <old-oid> but do not change it.  If
 	<old-oid> is zero or missing, the ref must not exist.
 
+symref-update::
+	Set <ref> to <new-ref> after verifying <old-ref> or <old-oid>,
+	if given. Can be used to delete or create symrefs too.
+
 symref-create::
 	Create symbolic ref <ref> with <new-ref> after verifying
 	it does not exist.  Can only be used in `no-deref` mode.
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 24556a28a8..809c1c7a76 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -238,6 +238,54 @@ static void parse_cmd_update(struct ref_transaction *transaction,
 	strbuf_release(&err);
 }
 
+static void parse_cmd_symref_update(struct ref_transaction *transaction,
+				    const char *next, const char *end)
+{
+	struct strbuf err = STRBUF_INIT;
+	char *refname, *new_ref, *old_ref;
+	struct object_id old_oid;
+	int have_old = 0;
+
+	refname = parse_refname(&next);
+	if (!refname)
+		die("symref-update: missing <ref>");
+
+	new_ref = parse_next_refname(&next);
+	if (!new_ref)
+		die("symref-update %s: missing <new-ref>", refname);
+	if (read_ref(new_ref, NULL))
+		die("symref-update %s: invalid <new-ref>", refname);
+
+	old_ref = parse_next_refname(&next);
+	/*
+	 * Since the user can also send in an old-oid, we try to parse
+	 * it as such too.
+	 */
+	if (old_ref && read_ref(old_ref, NULL)) {
+		if (!repo_get_oid(the_repository, old_ref, &old_oid)) {
+			old_ref = NULL;
+			have_old = 1;
+		} else
+			die("symref-update %s: invalid <old-ref> or <old-oid>", refname);
+	}
+
+	if (*next != line_termination)
+		die("symref-update %s: extra input: %s", refname, next);
+
+	update_flags |= create_reflog_flag | REF_SYMREF_UPDATE;
+	if (ref_transaction_update(transaction, refname, NULL,
+				   have_old ? &old_oid : NULL,
+				   new_ref, old_ref, update_flags,
+				   msg, &err))
+		die("%s", err.buf);
+
+	update_flags = default_flags;
+	free(refname);
+	free(old_ref);
+	free(new_ref);
+	strbuf_release(&err);
+}
+
 static void parse_cmd_create(struct ref_transaction *transaction,
 			     const char *next, const char *end)
 {
@@ -509,6 +557,7 @@ static const struct parse_cmd {
 	{ "create",        parse_cmd_create,        2, UPDATE_REFS_OPEN },
 	{ "delete",        parse_cmd_delete,        2, UPDATE_REFS_OPEN },
 	{ "verify",        parse_cmd_verify,        2, UPDATE_REFS_OPEN },
+	{ "symref-update", parse_cmd_symref_update, 3, UPDATE_REFS_OPEN },
 	{ "symref-create", parse_cmd_symref_create, 2, UPDATE_REFS_OPEN },
 	{ "symref-delete", parse_cmd_symref_delete, 2, UPDATE_REFS_OPEN },
 	{ "symref-verify", parse_cmd_symref_verify, 2, UPDATE_REFS_OPEN },
diff --git a/refs.c b/refs.c
index e62c0f4aca..31c09c3317 100644
--- a/refs.c
+++ b/refs.c
@@ -1246,21 +1246,15 @@ struct ref_update *ref_transaction_add_update(
 
 	update->flags = flags;
 
-	/*
-	 * The ref values are to be considered over the oid values when we're
-	 * doing symref operations.
-	 */
-	if (update->flags & REF_SYMREF_UPDATE) {
-		if (old_ref)
-			update->old_ref = xstrdup(old_ref);
-		if (new_ref)
-			update->new_ref = xstrdup(new_ref);
-	} else {
-		if (flags & REF_HAVE_NEW)
-			oidcpy(&update->new_oid, new_oid);
-		if (flags & REF_HAVE_OLD)
-			oidcpy(&update->old_oid, old_oid);
-	}
+	if (old_ref)
+		update->old_ref = xstrdup(old_ref);
+	if (new_ref)
+		update->new_ref = xstrdup(new_ref);
+	if (new_oid && flags & REF_HAVE_NEW)
+		oidcpy(&update->new_oid, new_oid);
+	if (old_oid && flags & REF_HAVE_OLD)
+		oidcpy(&update->old_oid, old_oid);
+
 	update->msg = normalize_reflog_message(msg);
 	return update;
 }
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 59d438878a..fb9886484c 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2386,7 +2386,7 @@ static int split_symref_update(struct ref_update *update,
 	new_update = ref_transaction_add_update(
 			transaction, referent, new_flags,
 			&update->new_oid, &update->old_oid,
-			NULL, NULL, update->msg);
+			update->new_ref, update->old_ref, update->msg);
 
 	new_update->parent_update = update;
 
@@ -2609,7 +2609,9 @@ static int lock_ref_for_update(struct files_ref_store *refs,
 		}
 	}
 
-	if (update->flags & REF_SYMREF_UPDATE && update->new_ref) {
+	if (update->flags & REF_SYMREF_UPDATE &&
+	    !(update->flags & REF_LOG_ONLY) &&
+	    update->new_ref) {
 		if (create_symref_lock(refs, lock, update->refname, update->new_ref)) {
 			ret = TRANSACTION_GENERIC_ERROR;
 			goto out;
@@ -2627,12 +2629,9 @@ static int lock_ref_for_update(struct files_ref_store *refs,
 		 * phase of the transaction only needs to commit the lock.
 		 */
 		update->flags |= REF_NEEDS_COMMIT;
-	}
-
-
-	if ((update->flags & REF_HAVE_NEW) &&
-	    !(update->flags & REF_DELETING) &&
-	    !(update->flags & REF_LOG_ONLY)) {
+	} else if ((update->flags & REF_HAVE_NEW) &&
+		   !(update->flags & REF_DELETING) &&
+		   !(update->flags & REF_LOG_ONLY)) {
 		if (!(update->type & REF_ISSYMREF) &&
 		    oideq(&lock->old_oid, &update->new_oid)) {
 			/*
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
index 6d42838e15..4bc6a369c7 100644
--- a/refs/reftable-backend.c
+++ b/refs/reftable-backend.c
@@ -908,7 +908,7 @@ static int reftable_be_transaction_prepare(struct ref_store *ref_store,
 				 */
 				new_update = ref_transaction_add_update(
 						transaction, referent.buf, new_flags,
-						&u->new_oid, &u->old_oid, NULL, NULL, u->msg);
+						&u->new_oid, &u->old_oid, u->new_ref, u->old_ref, u->msg);
 				new_update->parent_update = u;
 
 				/*
@@ -1106,6 +1106,11 @@ static int write_transaction_table(struct reftable_writer *writer, void *cb_data
 			    should_write_log(&arg->refs->base, u->refname))) {
 			struct reftable_log_record *log;
 
+			if (u->flags & REF_SYMREF_UPDATE && u->new_ref)
+				if (!refs_resolve_ref_unsafe(&arg->refs->base, u->new_ref,
+				     RESOLVE_REF_READING, &u->new_oid, NULL))
+					goto done;
+
 			ALLOC_GROW(logs, logs_nr + 1, logs_alloc);
 			log = &logs[logs_nr++];
 			memset(log, 0, sizeof(*log));
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index f4e63fae6e..eeb3ee7952 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -1360,6 +1360,7 @@ test_expect_success 'fails with duplicate HEAD update' '
 '
 
 test_expect_success 'fails with duplicate ref update via symref' '
+	test_when_finished "git symbolic-ref -d refs/heads/symref2" &&
 	git branch target2 $A &&
 	git symbolic-ref refs/heads/symref2 refs/heads/target2 &&
 	cat >stdin <<-EOF &&
@@ -1812,6 +1813,148 @@ test_expect_success "stdin ${type} symref-create reflogs with --create-reflog" '
 	git reflog exists refs/heads/symref
 '
 
+test_expect_success "stdin ${type} fails symref-update with no ref" '
+	create_stdin_buf ${type} "symref-update " >stdin &&
+	test_must_fail git update-ref --stdin ${type} --no-deref <stdin 2>err &&
+	grep "fatal: symref-update: missing <ref>" err
+'
+
+test_expect_success "stdin ${type} fails symref-update with no new value" '
+	create_stdin_buf ${type} "symref-update refs/heads/symref" >stdin &&
+	test_must_fail git update-ref --stdin ${type} --no-deref <stdin 2>err &&
+	grep "fatal: symref-update refs/heads/symref: missing <new-ref>" err
+'
+
+test_expect_success "stdin ${type} fails symref-update with too many arguments" '
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$a" "$a" "$a" >stdin &&
+	test_must_fail git update-ref --stdin ${type} --no-deref <stdin 2>err &&
+	if test "$type" = "-z"
+	then
+		grep "fatal: unknown command: $a" err
+	else
+		grep "fatal: symref-update refs/heads/symref: extra input:  $a" err
+	fi
+'
+
+test_expect_success "stdin ${type} symref-update ref creates with zero old value" '
+	test_when_finished "git symbolic-ref -d refs/heads/symref" &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$a" "$Z" >stdin &&
+	git update-ref --stdin ${type} --no-deref <stdin &&
+	echo $a >expect &&
+	git symbolic-ref refs/heads/symref >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success "stdin ${type} symref-update ref creates with empty old value" '
+	test_when_finished "git symbolic-ref -d refs/heads/symref" &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$a" >stdin &&
+	git update-ref --stdin ${type} --no-deref <stdin &&
+	echo $a >expect &&
+	git symbolic-ref refs/heads/symref >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success "stdin ${type} symref-update ref fails with wrong old value" '
+	test_when_finished "git symbolic-ref -d refs/heads/symref" &&
+	git symbolic-ref refs/heads/symref $a &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$m" "$b" >stdin &&
+	test_must_fail git update-ref --stdin ${type} --no-deref <stdin 2>err &&
+	grep "fatal: symref-update refs/heads/symref: invalid <old-ref> or <old-oid>" err &&
+	test_must_fail git rev-parse --verify -q $c
+'
+
+test_expect_success "stdin ${type} symref-update ref works with right old value" '
+	test_when_finished "git symbolic-ref -d refs/heads/symref" &&
+	git symbolic-ref refs/heads/symref $a &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$m" "$a" >stdin &&
+	git update-ref --stdin ${type} --no-deref <stdin &&
+	echo $m >expect &&
+	git symbolic-ref refs/heads/symref >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success "stdin ${type} symref-update creates symref (with deref)" '
+	test_when_finished "git symbolic-ref -d refs/heads/symref" &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$a" >stdin &&
+	git update-ref --stdin ${type} <stdin &&
+	echo $a >expect &&
+	git symbolic-ref --no-recurse refs/heads/symref >actual &&
+	test_cmp expect actual &&
+	test-tool ref-store main for-each-reflog-ent refs/heads/symref >actual &&
+	grep "$Z $(git rev-parse $a)" actual
+'
+
+test_expect_success "stdin ${type} symref-update updates symref (with deref)" '
+	test_when_finished "git symbolic-ref -d refs/heads/symref" &&
+	test_when_finished "git update-ref -d --no-deref refs/heads/symref2" &&
+	git update-ref refs/heads/symref2 $a &&
+	git symbolic-ref --no-recurse refs/heads/symref refs/heads/symref2 &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$a" >stdin &&
+	git update-ref --stdin ${type} <stdin &&
+	echo $a >expect &&
+	git symbolic-ref --no-recurse refs/heads/symref2 >actual &&
+	test_cmp expect actual &&
+	echo refs/heads/symref2 >expect &&
+	git symbolic-ref --no-recurse refs/heads/symref >actual &&
+	test_cmp expect actual &&
+	test-tool ref-store main for-each-reflog-ent refs/heads/symref >actual &&
+	grep "$(git rev-parse $a) $(git rev-parse $a)" actual
+'
+
+test_expect_success "stdin ${type} symref-update regular ref" '
+	test_when_finished "git symbolic-ref -d --no-recurse refs/heads/regularref" &&
+	git update-ref --no-deref refs/heads/regularref $a &&
+	create_stdin_buf ${type} "symref-update refs/heads/regularref" "$a" >stdin &&
+	git update-ref --stdin ${type} <stdin &&
+	echo $a >expect &&
+	git symbolic-ref --no-recurse refs/heads/regularref >actual &&
+	test_cmp expect actual &&
+	test-tool ref-store main for-each-reflog-ent refs/heads/regularref >actual &&
+	grep "$(git rev-parse $a) $(git rev-parse $a)" actual
+'
+
+test_expect_success "stdin ${type} symref-update regular ref with correct old-oid" '
+	test_when_finished "git symbolic-ref -d --no-recurse refs/heads/regularref" &&
+	git update-ref --no-deref refs/heads/regularref $a &&
+	create_stdin_buf ${type} "symref-update refs/heads/regularref" "$a" "$(git rev-parse $a)" >stdin &&
+	git update-ref --stdin ${type} <stdin &&
+	echo $a >expect &&
+	git symbolic-ref --no-recurse refs/heads/regularref >actual &&
+	test_cmp expect actual &&
+	test-tool ref-store main for-each-reflog-ent refs/heads/regularref >actual &&
+	grep "$(git rev-parse $a) $(git rev-parse $a)" actual
+'
+
+test_expect_success "stdin ${type} symref-update regular ref fails with wrong old-oid" '
+	test_when_finished "git update-ref -d refs/heads/regularref" &&
+	git update-ref --no-deref refs/heads/regularref $a &&
+	create_stdin_buf ${type} "symref-update refs/heads/regularref" "$a" "$(git rev-parse refs/heads/target2)" >stdin &&
+	test_must_fail git update-ref --stdin ${type} <stdin 2>err &&
+	echo $(git rev-parse $a) >expect &&
+	git rev-parse refs/heads/regularref >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success "stdin ${type} symref-update with zero old-oid" '
+	test_when_finished "git symbolic-ref -d --no-recurse refs/heads/symref" &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$a" "$Z" >stdin &&
+	git update-ref --stdin ${type} <stdin 2>err &&
+	echo $a >expect &&
+	git symbolic-ref refs/heads/symref >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success "stdin ${type} symref-update ref with zero old-oid" '
+	test_when_finished "git symbolic-ref -d --no-recurse refs/heads/symref" &&
+	git symbolic-ref refs/heads/symref refs/heads/target2 &&
+	create_stdin_buf ${type} "symref-update refs/heads/symref" "$a" "$Z" >stdin &&
+	test_must_fail git update-ref --stdin ${type} <stdin 2>err &&
+	grep "fatal: cannot lock ref '"'"'refs/heads/symref'"'"': reference already exists" err &&
+	echo refs/heads/target2 >expect &&
+	git symbolic-ref refs/heads/symref >actual &&
+	test_cmp expect actual
+'
+
 done
 
 test_done
-- 
2.43.GIT
Previous: Karthik NayakNext: Patrick Steinhardt
Message 63 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.