<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.h, branch v2.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.6.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-08-25T21:57:08Z</updated>
<entry>
<title>Merge branch 'dt/refs-pseudo'</title>
<updated>2015-08-25T21:57:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-25T21:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=080cc646637f20494138c62fe6b8b0fee8d521fa'/>
<id>urn:sha1:080cc646637f20494138c62fe6b8b0fee8d521fa</id>
<content type='text'>
To prepare for allowing a different "ref" backend to be plugged in
to the system, update_ref()/delete_ref() have been taught about
ref-like things like MERGE_HEAD that are per-worktree (they will
always be written to the filesystem inside $GIT_DIR).

* dt/refs-pseudo:
  pseudoref: check return values from read_ref()
  sequencer: replace write_cherry_pick_head with update_ref
  bisect: use update_ref
  pseudorefs: create and use pseudoref update and delete functions
  refs: add ref_type function
  refs: introduce pseudoref and per-worktree ref concepts
</content>
</entry>
<entry>
<title>Merge branch 'jk/refspec-parse-wildcard'</title>
<updated>2015-08-03T18:01:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d3981ccbed9fc211b4e67105015179d9d2a5692'/>
<id>urn:sha1:8d3981ccbed9fc211b4e67105015179d9d2a5692</id>
<content type='text'>
Allow an asterisk as a substring (as opposed to the entirety) of
a path component for both side of a refspec, e.g.
"refs/heads/o*:refs/remotes/heads/i*".

* jk/refspec-parse-wildcard:
  refs: loosen restriction on wildcard "*" refspecs
  refs: cleanup comments regarding check_refname_component()
</content>
</entry>
<entry>
<title>Merge branch 'dt/refs-backend-preamble'</title>
<updated>2015-08-03T18:01:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6d323f1646d7204fc6693071e5be84377ece70b'/>
<id>urn:sha1:b6d323f1646d7204fc6693071e5be84377ece70b</id>
<content type='text'>
In preparation for allowing different "backends" to store the refs
in a way different from the traditional "one ref per file in $GIT_DIR
or in a $GIT_DIR/packed-refs file" filesystem storage, reduce
direct filesystem access to ref-like things like CHERRY_PICK_HEAD
from scripts and programs.

* dt/refs-backend-preamble:
  git-stash: use update-ref --create-reflog instead of creating files
  update-ref and tag: add --create-reflog arg
  refs: add REF_FORCE_CREATE_REFLOG flag
  git-reflog: add exists command
  refs: new public ref function: safe_create_reflog
  refs: break out check for reflog autocreation
  refs.c: add err arguments to reflog functions
</content>
</entry>
<entry>
<title>refs: add ref_type function</title>
<updated>2015-07-31T17:39:04Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2015-07-31T06:06:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=266b18273a742a33970e634d1858f292befdf943'/>
<id>urn:sha1:266b18273a742a33970e634d1858f292befdf943</id>
<content type='text'>
Add a function ref_type, which categorizes refs as per-worktree,
pseudoref, or normal ref.

Later, we will use this in refs.c to treat pseudorefs specially.
Alternate ref backends may use it to treat both pseudorefs and
per-worktree refs differently.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: loosen restriction on wildcard "*" refspecs</title>
<updated>2015-07-27T16:21:31Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.keller@gmail.com</email>
</author>
<published>2015-07-22T21:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cd377f45c9d06e8ab3e87d5a687ed22ab34e1c48'/>
<id>urn:sha1:cd377f45c9d06e8ab3e87d5a687ed22ab34e1c48</id>
<content type='text'>
Loosen restrictions on refspecs by allowing patterns that have a "*"
within a component instead of only as the whole component.

Remove the logic to accept a single "*" as a whole component from
check_refname_format(), and implement an extended form of that logic
in check_refname_component().  Pass the pointer to the flags argument
to the latter, as it has to clear REFNAME_REFSPEC_PATTERN bit when
it sees "*".

Teach check_refname_component() function to allow an asterisk "*"
only when REFNAME_REFSPEC_PATTERN is set in the flags, and drop the
bit after seeing a "*", to ensure that one side of a refspec
contains at most one asterisk.

This will allow us to accept refspecs such as `for/bar*:foo/baz*`.
Any refspec which functioned before shall continue functioning with
the new logic.

Signed-off-by: Jacob Keller &lt;jacob.keller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: add REF_FORCE_CREATE_REFLOG flag</title>
<updated>2015-07-21T21:08:26Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2015-07-21T21:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f2a71d9923b4cf010ad0801eb71ee3666798204'/>
<id>urn:sha1:0f2a71d9923b4cf010ad0801eb71ee3666798204</id>
<content type='text'>
Add a flag to allow forcing the creation of a reflog even if the ref
name and core.logAllRefUpdates setting would not ordinarily cause ref
creation.

In a moment, we will use this to add options to git tag and git
update-ref to force reflog creation.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: new public ref function: safe_create_reflog</title>
<updated>2015-07-21T21:07:59Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2015-07-21T21:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=abd0cd3a3018e1c4e9e4437fb3911d6658e99fec'/>
<id>urn:sha1:abd0cd3a3018e1c4e9e4437fb3911d6658e99fec</id>
<content type='text'>
The safe_create_reflog function creates a reflog, if it does not
already exist.

The log_ref_setup function becomes private and gains a force_create
parameter to force the creation of a reflog even if log_all_ref_updates
is false or the refname is not one of the special refnames.

The new parameter also reduces the need to store, modify, and restore
the log_all_ref_updates global before reflog creation.

In a moment, we will use this to add reflog creation commands to
git-reflog.

Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs.c: add err arguments to reflog functions</title>
<updated>2015-07-21T21:07:28Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twopensource.com</email>
</author>
<published>2015-07-21T21:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a4c653dfcd05c987028b847092a1ee7e5d86a596'/>
<id>urn:sha1:a4c653dfcd05c987028b847092a1ee7e5d86a596</id>
<content type='text'>
Add an err argument to log_ref_setup that can explain the reason
for a failure. This then eliminates the need to manage errno through
this function since we can just add strerror(errno) to the err string
when meaningful. No callers relied on errno from this function for
anything else than the error message.

Also add err arguments to private functions write_ref_to_lockfile,
log_ref_write_1, commit_ref_update. This again eliminates the need to
manage errno in these functions.

Some error messages are slightly reordered.

Update of a patch by Ronnie Sahlberg.

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: David Turner &lt;dturner@twopensource.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>delete_ref(): use the usual convention for old_sha1</title>
<updated>2015-06-22T20:17:14Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-06-22T14:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c03c4d34771db20b78231359caa6fda28e2d9fe'/>
<id>urn:sha1:1c03c4d34771db20b78231359caa6fda28e2d9fe</id>
<content type='text'>
The ref_transaction_update() family of functions use the following
convention for their old_sha1 parameters:

* old_sha1 == NULL: Don't check the old value at all.
* is_null_sha1(old_sha1): Ensure that the reference didn't exist
  before the transaction.
* otherwise: Ensure that the reference had the specified value before
  the transaction.

delete_ref() had a different convention, namely treating
is_null_sha1(old_sha1) as "don't care". Change it to adhere to the
standard convention to reduce the scope for confusion.

Please note that it is now a bug to pass old_sha1=NULL_SHA1 to
delete_ref() (because it doesn't make sense to delete a reference that
you already know doesn't exist). This is consistent with the behavior
of ref_transaction_delete().

Most of the callers of delete_ref() never pass old_sha1=NULL_SHA1 to
delete_ref(), and are therefore unaffected by this change. The
two exceptions are:

* The call in cmd_update_ref(), which passed NULL_SHA1 if the old
  value passed in on the command line was 0{40} or the empty string.
  Change that caller to pass NULL in those cases.

  Arguably, it should be an error to call "update-ref -d" with the old
  value set to "does not exist", just as it is for the `--stdin`
  command "delete". But since this usage was accepted until now,
  continue to accept it.

* The call in delete_branches(), which could pass NULL_SHA1 if
  deleting a broken or symbolic ref. Change it to pass NULL in these
  cases.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs.h: add some parameter names to function declarations</title>
<updated>2015-06-22T20:17:13Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-06-22T14:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=243371023e90560f8ef44fa9dfa00f9f01cc1c4d'/>
<id>urn:sha1:243371023e90560f8ef44fa9dfa00f9f01cc1c4d</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
