From 67e943c308d6440b6358531dba67ffba88ec30ae Mon Sep 17 00:00:00 2001 From: Karthik Nayak Date: Tue, 2 Apr 2024 08:49:14 +0200 Subject: update-ref: use {old,new}-oid instead of {old,new}value The `git-update-ref` command is used to modify references. The usage of {old,new}value in the documentation refers to the OIDs. This is fine since the command only works with regular references which hold OIDs. But if the command is updated to support symrefs, we'd also be dealing with {old,new}-refs. To improve clarity around what exactly {old,new}value mean, let's rename it to {old,new}-oid. Signed-off-by: Karthik Nayak Acked-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- Documentation/git-update-ref.txt | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 0561808cca..374a2ebd2b 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -8,21 +8,21 @@ git-update-ref - Update the object name stored in a ref safely SYNOPSIS -------- [verse] -'git update-ref' [-m ] [--no-deref] (-d [] | [--create-reflog] [] | --stdin [-z]) +'git update-ref' [-m ] [--no-deref] (-d [] | [--create-reflog] [] | --stdin [-z]) DESCRIPTION ----------- -Given two arguments, stores the in the , possibly +Given two arguments, stores the in the , possibly dereferencing the symbolic refs. E.g. `git update-ref HEAD -` updates the current branch head to the new object. +` updates the current branch head to the new object. -Given three arguments, stores the in the , +Given three arguments, stores the in the , possibly dereferencing the symbolic refs, after verifying that -the current value of the matches . -E.g. `git update-ref refs/heads/master ` -updates the master branch head to only if its current -value is . You can specify 40 "0" or an empty string -as to make sure that the ref you are creating does +the current value of the matches . +E.g. `git update-ref refs/heads/master ` +updates the master branch head to only if its current +value is . You can specify 40 "0" or an empty string +as to make sure that the ref you are creating does not exist. It also allows a "ref" file to be a symbolic pointer to another @@ -56,15 +56,15 @@ ref symlink to some other tree, if you have copied a whole archive by creating a symlink tree). With `-d` flag, it deletes the named after verifying it -still contains . +still contains . With `--stdin`, update-ref reads instructions from standard input and performs all modifications together. Specify commands of the form: - update SP SP [SP ] LF - create SP SP LF - delete SP [SP ] LF - verify SP [SP ] LF + update SP SP [SP ] LF + create SP SP LF + delete SP [SP ] LF + verify SP [SP ] LF option SP LF start LF prepare LF @@ -82,10 +82,10 @@ specify a missing value, omit the value and its preceding SP entirely. Alternatively, use `-z` to specify in NUL-terminated format, without quoting: - update SP NUL NUL [] NUL - create SP NUL NUL - delete SP NUL [] NUL - verify SP NUL [] NUL + update SP NUL NUL [] NUL + create SP NUL NUL + delete SP NUL [] NUL + verify SP NUL [] NUL option SP NUL start NUL prepare NUL @@ -100,22 +100,22 @@ recognizes as an object name. Commands in any other format or a repeated produce an error. Command meanings are: update:: - Set to after verifying , if given. - Specify a zero to ensure the ref does not exist - after the update and/or a zero to make sure the + Set to after verifying , if given. + Specify a zero to ensure the ref does not exist + after the update and/or a zero to make sure the ref does not exist before the update. create:: - Create with after verifying it does not - exist. The given may not be zero. + Create with after verifying it does not + exist. The given may not be zero. delete:: - Delete after verifying it exists with , if - given. If given, may not be zero. + Delete after verifying it exists with , if + given. If given, may not be zero. verify:: - Verify against but do not change it. If - is zero or missing, the ref must not exist. + Verify against but do not change it. If + is zero or missing, the ref must not exist. option:: Modify the behavior of the next command naming a . @@ -141,7 +141,7 @@ abort:: Abort the transaction, releasing all locks if the transaction is in prepared state. -If all s can be locked with matching s +If all s can be locked with matching s simultaneously, all modifications are performed. Otherwise, no modifications are performed. Note that while each individual is updated or deleted atomically, a concurrent reader may @@ -161,7 +161,7 @@ formatted as: Where "oldsha1" is the 40 character hexadecimal value previously stored in , "newsha1" is the 40 character hexadecimal value of - and "committer" is the committer's name, email address + and "committer" is the committer's name, email address and date in the standard Git committer ident format. Optionally with -m: -- cgit v1.3