<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/update-ref.c, branch v1.3.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.3.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.3.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2006-03-24T07:41:18Z</updated>
<entry>
<title>sha1_name: warning ambiguous refs.</title>
<updated>2006-03-24T07:41:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-03-24T07:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=84a9b58c421f9b2d1cc6c195ed441fac48e60392'/>
<id>urn:sha1:84a9b58c421f9b2d1cc6c195ed441fac48e60392</id>
<content type='text'>
This makes sure that many commands that take refs on the command
line to honor core.warnambiguousrefs configuration.  Earlier,
the commands affected by this patch did not read the
configuration file.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>allow git-update-ref create refs with slashes in names</title>
<updated>2005-11-15T01:15:32Z</updated>
<author>
<name>Alex Riesen</name>
<email>raa.lkml@gmail.com</email>
</author>
<published>2005-11-14T22:10:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08db81a9f1e4072790f0257f5398e8408e3d6816'/>
<id>urn:sha1:08db81a9f1e4072790f0257f5398e8408e3d6816</id>
<content type='text'>
Make git-update-ref create references with slashes in them. git-branch
and git-checkout already support such reference names.

git-branch can use git-update-ref to create the references in a more
formal manner now.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Fix confusing git-update-ref error message</title>
<updated>2005-11-10T23:57:21Z</updated>
<author>
<name>Petr Baudis</name>
<email>pasky@suse.cz</email>
</author>
<published>2005-11-10T19:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad7db62113368279a1b6994790bf30925fabea33'/>
<id>urn:sha1:ad7db62113368279a1b6994790bf30925fabea33</id>
<content type='text'>
When git-update-ref has hit the "Ref %s changed to %s" error, I just stare
at it, left puzzled. This patch attempts to reword that to a more useful
and less confusing error message.

Signed-off-by: Petr Baudis &lt;pasky@suse.cz&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Unlocalized isspace and friends</title>
<updated>2005-10-15T00:17:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2005-10-13T18:03:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4546738b58a0134eef154231b07d60fc174d56e3'/>
<id>urn:sha1:4546738b58a0134eef154231b07d60fc174d56e3</id>
<content type='text'>
Do our own ctype.h, just to get the sane semantics: we want
locale-independence, _and_ we want the right signed behaviour. Plus we
only use a very small subset of ctype.h anyway (isspace, isalpha,
isdigit and isalnum).

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Use resolve_ref() to implement read_ref().</title>
<updated>2005-10-02T06:19:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junio@twinsun.com</email>
</author>
<published>2005-09-30T21:08:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a876ed83be5467d6075da8a16306724cb1babc2a'/>
<id>urn:sha1:a876ed83be5467d6075da8a16306724cb1babc2a</id>
<content type='text'>
Symbolic refs are understood by resolve_ref(), so existing read_ref()
users will automatically understand them as well.

Signed-off-by: Junio C Hamano &lt;junio@twinsun.com&gt;
</content>
</entry>
<entry>
<title>Teach update-ref about a symbolic ref stored in a textfile.</title>
<updated>2005-10-02T06:19:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-09-26T02:30:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9b143c6e155a8eead165b2a813b533e0f3e0018a'/>
<id>urn:sha1:9b143c6e155a8eead165b2a813b533e0f3e0018a</id>
<content type='text'>
A symbolic ref is a regular file whose contents is "ref:", followed by
optional leading whitespaces, followed by a GIT_DIR relative pathname,
followed by optional trailing whitespaces (the optional whitespaces
are unconditionally removed, so you cannot have leading nor trailing
whitespaces).  This can be used in place of a traditional symbolic
link .git/HEAD that usually points at "refs/heads/master".  You can
instead have a regular file .git/HEAD whose contents is
"ref: refs/heads/master".

[jc: currently the code does not enforce the symbolic ref to begin with
 refs/, unlike the symbolic link case.  It may be worthwhile to require
 either case to begin with refs/ and not have any /./ nor /../ in them.]

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>[PATCH] Make some needlessly global stuff static</title>
<updated>2005-09-28T23:38:52Z</updated>
<author>
<name>Peter Hagervall</name>
<email>hager@cs.umu.se</email>
</author>
<published>2005-09-28T12:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a7928f8ec7fb3c368e6086ab48f41e33a22e1b94'/>
<id>urn:sha1:a7928f8ec7fb3c368e6086ab48f41e33a22e1b94</id>
<content type='text'>
Insert 'static' where appropriate.

Signed-off-by: Peter Hagervall &lt;hager@cs.umu.se&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Plug a small race in update-ref.c.</title>
<updated>2005-09-26T02:25:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2005-09-25T23:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=152da3dfcf2c16d7c240a0dbdcb8a3ae1d332d81'/>
<id>urn:sha1:152da3dfcf2c16d7c240a0dbdcb8a3ae1d332d81</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>[PATCH] Add "git-update-ref" to update the HEAD (or other) ref</title>
<updated>2005-09-25T23:18:25Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2005-09-25T18:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66bf85a462893f9df7e516a5f334dbba08122617'/>
<id>urn:sha1:66bf85a462893f9df7e516a5f334dbba08122617</id>
<content type='text'>
This is a careful version of the script stuff that currently just
blindly writes HEAD with a new value.

You can use

	git-update-ref HEAD &lt;newhead&gt;

or

	git-update-ref HEAD &lt;newhead&gt; &lt;oldhead&gt;

where the latter version verifies that the old value of HEAD matches
oldhead.

It basically allows a "ref" file to be a symbolic pointer to another ref
file by starting with the four-byte header sequence of "ref:".

More importantly, it allows the update of a ref file to follow these
symbolic pointers, whether they are symlinks or these "regular file
symbolic refs".

NOTE! It follows _real_ symlinks only if they start with "refs/":
otherwise it will just try to read them and update them as a regular file
(ie it will allow the filesystem to follow them, but will overwrite such a
symlink to somewhere else with a regular filename).

In general, using

	git-update-ref HEAD "$head"

should be a _lot_ safer than doing

	echo "$head" &gt; "$GIT_DIR/HEAD"

both from a symlink following standpoint _and_ an error checking
standpoint.  The "refs/" rule for symlinks means that symlinks that point
to "outside" the tree are safe: they'll be followed 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).

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
