diff options
author | Junio C Hamano <junio@hera.kernel.org> | 2006-11-02 00:22:48 +0000 |
---|---|---|
committer | Junio C Hamano <junio@hera.kernel.org> | 2006-11-02 00:22:48 +0000 |
commit | a2ec14f96e29dae631eb6013e11e0f03dc934660 (patch) | |
tree | f4d716a443cc5c550abb84d11c966deb197728d9 /git-update-ref.txt | |
parent | b19b4f0f2e3316230172f636dc5ad4c300fff4e4 (diff) | |
download | git-htmldocs-a2ec14f96e29dae631eb6013e11e0f03dc934660.tar.gz |
Autogenerated HTML docs for v1.4.3.3-g7854
Diffstat (limited to 'git-update-ref.txt')
-rw-r--r-- | git-update-ref.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/git-update-ref.txt b/git-update-ref.txt index e062030e9..71bcb7954 100644 --- a/git-update-ref.txt +++ b/git-update-ref.txt @@ -7,7 +7,7 @@ git-update-ref - update the object name stored in a ref safely SYNOPSIS -------- -'git-update-ref' [-m <reason>] <ref> <newvalue> [<oldvalue>] +'git-update-ref' [-m <reason>] (-d <ref> <oldvalue> | <ref> <newvalue> [<oldvalue>]) DESCRIPTION ----------- @@ -20,7 +20,9 @@ possibly dereferencing the symbolic refs, after verifying that the current value of the <ref> matches <oldvalue>. E.g. `git-update-ref refs/heads/master <newvalue> <oldvalue>` updates the master branch head to <newvalue> only if its current -value is <oldvalue>. +value is <oldvalue>. You can specify 40 "0" or an empty string +as <oldvalue> 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 ref file by starting with the four-byte header sequence of @@ -49,6 +51,10 @@ for reading but not for writing (so we'll never write through a 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 <ref> after verifying it +still contains <oldvalue>. + + Logging Updates --------------- If config parameter "core.logAllRefUpdates" is true or the file |