<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/refs.c, branch mh/update-ref-errors</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>ref_transaction_update(): check refname_is_safe() at a minimum</title>
<updated>2016-06-13T09:23:50+00:00</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-04-27T13:54:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=8a679de6f1a4bd077f828273f75eea46947b5b73'/>
<id>8a679de6f1a4bd077f828273f75eea46947b5b73</id>
<content type='text'>
If the user has asked that a new value be set for a reference, we use
check_refname_format() to verify that the reference name satisfies all
of the rules. But in other cases, at least check that refname_is_safe().

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the user has asked that a new value be set for a reference, we use
check_refname_format() to verify that the reference name satisfies all
of the rules. But in other cases, at least check that refname_is_safe().

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>add_update(): initialize the whole ref_update</title>
<updated>2016-06-13T09:23:49+00:00</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-04-25T09:39:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=71564516deccafba0a58129bd7d3851e28fdb4bb'/>
<id>71564516deccafba0a58129bd7d3851e28fdb4bb</id>
<content type='text'>
Change add_update() to initialize all of the fields in the new
ref_update object. Rename the function to ref_transaction_add_update(),
and increase its visibility to all of the refs-related code.

All of this makes the function more useful for other future callers.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change add_update() to initialize all of the fields in the new
ref_update object. Rename the function to ref_transaction_add_update(),
and increase its visibility to all of the refs-related code.

All of this makes the function more useful for other future callers.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ref_transaction_create(): disallow recursive pruning</title>
<updated>2016-06-13T09:23:49+00:00</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-04-24T07:48:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=c52ce248d63a185eb0a616b361d1fd72c5c66451'/>
<id>c52ce248d63a185eb0a616b361d1fd72c5c66451</id>
<content type='text'>
It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
without REF_NODEREF. Forbid it explicitly. Change the one REF_ISPRUNING
caller to pass REF_NODEREF too.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
without REF_NODEREF. Forbid it explicitly. Change the one REF_ISPRUNING
caller to pass REF_NODEREF too.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: make error messages more consistent</title>
<updated>2016-06-13T09:23:49+00:00</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-04-27T13:21:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=0568c8e9dce2aa0dd18f41f23e3465f3639e371e'/>
<id>0568c8e9dce2aa0dd18f41f23e3465f3639e371e</id>
<content type='text'>
* Always start error messages with a lower-case letter.

* Always enclose reference names in single quotes.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Always start error messages with a lower-case letter.

* Always enclose reference names in single quotes.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refname_is_safe(): insist that the refname already be normalized</title>
<updated>2016-05-05T14:37:30+00:00</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-04-27T10:40:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=e40f3557f7e767bd2be2a824bc3bc2379aa69931'/>
<id>e40f3557f7e767bd2be2a824bc3bc2379aa69931</id>
<content type='text'>
The reference name is going to be compared to other reference names, so
it should be in its normalized form.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reference name is going to be compared to other reference names, so
it should be in its normalized form.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refname_is_safe(): don't allow the empty string</title>
<updated>2016-05-05T14:37:30+00:00</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-04-27T10:42:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=35db25c65f6f77c153ef2b1183ea7821236201c8'/>
<id>35db25c65f6f77c153ef2b1183ea7821236201c8</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refname_is_safe(): use skip_prefix()</title>
<updated>2016-05-05T14:37:30+00:00</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-04-27T10:39:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=39950fef8bb45e944655e48393ee04c0b33211f5'/>
<id>39950fef8bb45e944655e48393ee04c0b33211f5</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: move resolve_ref_unsafe into common code</title>
<updated>2016-04-10T18:35:41+00:00</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2016-04-07T19:03:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=2d0663b21661f2677bce5742204ccdd73745a062'/>
<id>2d0663b21661f2677bce5742204ccdd73745a062</id>
<content type='text'>
Now that resolve_ref_unsafe's only interaction with the backend is
through read_raw_ref, we can move it into the common code. Later,
we'll replace read_raw_ref with a backend function.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Reviewed-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that resolve_ref_unsafe's only interaction with the backend is
through read_raw_ref, we can move it into the common code. Later,
we'll replace read_raw_ref with a backend function.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Reviewed-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: move for_each_*ref* functions into common code</title>
<updated>2016-04-10T18:34:55+00:00</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2016-04-07T19:02:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=937705901b83737a35996f62dbfbfefd8e5c8d7f'/>
<id>937705901b83737a35996f62dbfbfefd8e5c8d7f</id>
<content type='text'>
Make do_for_each_ref take a submodule as an argument instead of a
ref_cache.  Since all for_each_*ref* functions are defined in terms of
do_for_each_ref, we can then move them into the common code.

Later, we can simply make do_for_each_ref into a backend function.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Reviewed-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make do_for_each_ref take a submodule as an argument instead of a
ref_cache.  Since all for_each_*ref* functions are defined in terms of
do_for_each_ref, we can then move them into the common code.

Later, we can simply make do_for_each_ref into a backend function.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Reviewed-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refs: move head_ref{,_submodule} to the common code</title>
<updated>2016-04-10T18:34:41+00:00</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2016-04-07T19:02:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=2bf68ed5aa79fcccba6ea4c021b15e51c019a85e'/>
<id>2bf68ed5aa79fcccba6ea4c021b15e51c019a85e</id>
<content type='text'>
These don't use any backend-specific functions.  These were previously
defined in terms of the do_head_ref helper function, but since they
are otherwise identical, we don't need that function.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Reviewed-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These don't use any backend-specific functions.  These were previously
defined in terms of the do_head_ref helper function, but since they
are otherwise identical, we don't need that function.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Reviewed-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
