<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/replace.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-04-18T04:56:54Z</updated>
<entry>
<title>replace: plug a memory leak</title>
<updated>2017-04-18T04:56:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-18T04:56:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=372b050b6bd4bd3256e6fa21ab0fef47dd768d98'/>
<id>urn:sha1:372b050b6bd4bd3256e6fa21ab0fef47dd768d98</id>
<content type='text'>
Recent update to for_each_replace_name() to make it use a strbuf in
place of a fixed buffer forgot to release the memory held by the
strbuf before leaving the function.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>avoid using fixed PATH_MAX buffers for refs</title>
<updated>2017-03-30T21:59:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-03-28T19:46:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f897b6f176319ec0f490d286c3fee11187d7095'/>
<id>urn:sha1:7f897b6f176319ec0f490d286c3fee11187d7095</id>
<content type='text'>
Many functions which handle refs use a PATH_MAX-sized buffer
to do so. This is mostly reasonable as we have to write
loose refs into the filesystem, and at least on Linux the 4K
PATH_MAX is big enough that nobody would care. But:

  1. The static PATH_MAX is not always the filesystem limit.

  2. On other platforms, PATH_MAX may be much smaller.

  3. As we move to alternate ref storage, we won't be bound
     by filesystem limits.

Let's convert these to heap buffers so we don't have to
worry about truncation or size limits.

We may want to eventually constrain ref lengths for sanity
and to prevent malicious names, but we should do so
consistently across all platforms, and in a central place
(like the ref code).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/object-id'</title>
<updated>2017-03-17T20:50:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-17T20:50:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e1fae930193b3e8ff02cee936605625f63e1d1e4'/>
<id>urn:sha1:e1fae930193b3e8ff02cee936605625f63e1d1e4</id>
<content type='text'>
"uchar [40]" to "struct object_id" conversion continues.

* bc/object-id:
  wt-status: convert to struct object_id
  builtin/merge-base: convert to struct object_id
  Convert object iteration callbacks to struct object_id
  sha1_file: introduce an nth_packed_object_oid function
  refs: simplify parsing of reflog entries
  refs: convert each_reflog_ent_fn to struct object_id
  reflog-walk: convert struct reflog_info to struct object_id
  builtin/replace: convert to struct object_id
  Convert remaining callers of resolve_refdup to object_id
  builtin/merge: convert to struct object_id
  builtin/clone: convert to struct object_id
  builtin/branch: convert to struct object_id
  builtin/grep: convert to struct object_id
  builtin/fmt-merge-message: convert to struct object_id
  builtin/fast-export: convert to struct object_id
  builtin/describe: convert to struct object_id
  builtin/diff-tree: convert to struct object_id
  builtin/commit: convert to struct object_id
  hex: introduce parse_oid_hex
</content>
</entry>
<entry>
<title>builtin/replace: convert to struct object_id</title>
<updated>2017-02-22T18:12:15Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-02-21T23:47:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cea4332e5414f5506e6d0803811ba0b095d08518'/>
<id>urn:sha1:cea4332e5414f5506e6d0803811ba0b095d08518</id>
<content type='text'>
Convert various uses of unsigned char [20] to struct object_id.  Rename
replace_object_sha1 to replace_object_oid.  Finally, specify a constant
in terms of GIT_SHA1_HEXSZ.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>delete_ref: accept a reflog message argument</title>
<updated>2017-02-21T06:04:47Z</updated>
<author>
<name>Kyle Meyer</name>
<email>kyle@kyleam.com</email>
</author>
<published>2017-02-21T01:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=755b49ae965c9d17d91fbe7902050428f366bf69'/>
<id>urn:sha1:755b49ae965c9d17d91fbe7902050428f366bf69</id>
<content type='text'>
When the current branch is renamed with 'git branch -m/-M' or deleted
with 'git update-ref -m&lt;msg&gt; -d', the event is recorded in HEAD's log
with an empty message.  In preparation for adding a more meaningful
message to HEAD's log in these cases, update delete_ref() to take a
message argument and pass it along to ref_transaction_delete().
Modify all callers to pass NULL for the new message argument; no
change in behavior is intended.

Note that this is relevant for HEAD's log but not for the deleted
ref's log, which is currently deleted along with the ref.  Even if it
were not, an entry for the deletion wouldn't be present in the deleted
ref's log.  files_transaction_commit() writes to the log if
REF_NEEDS_COMMIT or REF_LOG_ONLY are set, but lock_ref_for_update()
doesn't set REF_NEEDS_COMMIT for the deleted ref because REF_DELETING
is set.  In contrast, the update for HEAD has REF_LOG_ONLY set by
split_head_update(), resulting in the deletion being logged.

Signed-off-by: Kyle Meyer &lt;kyle@kyleam.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/replace-edit-use-editor-configuration'</title>
<updated>2016-04-29T19:59:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-04-29T19:59:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=60b3e9b959f4423f6927ef77e7097bea3ad24e45'/>
<id>urn:sha1:60b3e9b959f4423f6927ef77e7097bea3ad24e45</id>
<content type='text'>
"git replace -e" did not honour "core.editor" configuration.

* js/replace-edit-use-editor-configuration:
  replace --edit: respect core.editor
</content>
</entry>
<entry>
<title>replace --edit: respect core.editor</title>
<updated>2016-04-20T16:11:36Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-04-20T06:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36b14370dbafbe6682ea6b21c8de012253bff451'/>
<id>urn:sha1:36b14370dbafbe6682ea6b21c8de012253bff451</id>
<content type='text'>
We simply need to read the config, is all.

This fixes https://github.com/git-for-windows/git/issues/733

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Convert struct object to object_id</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2fd0760f62e79609fef7bfd7ecebb002e8e4ced'/>
<id>urn:sha1:f2fd0760f62e79609fef7bfd7ecebb002e8e4ced</id>
<content type='text'>
struct object is one of the major data structures dealing with object
IDs.  Convert it to use struct object_id instead of an unsigned char
array.  Convert get_object_hash to refer to the new member as well.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/replace-refs'</title>
<updated>2015-08-03T18:01:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31a0ad545681159be2ccc633a1a16a891cafbae3'/>
<id>urn:sha1:31a0ad545681159be2ccc633a1a16a891cafbae3</id>
<content type='text'>
Add an environment variable to tell Git to look into refs hierarchy
other than refs/replace/ for the object replacement data.

* mh/replace-refs:
  Allow to control where the replace refs are looked for
</content>
</entry>
<entry>
<title>Allow to control where the replace refs are looked for</title>
<updated>2015-06-12T22:28:17Z</updated>
<author>
<name>Mike Hommey</name>
<email>mh@glandium.org</email>
</author>
<published>2015-06-11T21:34:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=58d121b22b5b83a27a1891dcf335458f687cac1e'/>
<id>urn:sha1:58d121b22b5b83a27a1891dcf335458f687cac1e</id>
<content type='text'>
It can be useful to have grafts or replace refs for specific use-cases while
keeping the default "view" of the repository pristine (or with a different
set of grafts/replace refs).

It is possible to use a different graft file with GIT_GRAFT_FILE, but while
replace refs are more powerful, they don't have an equivalent override.

Add a GIT_REPLACE_REF_BASE environment variable to control where git is
going to look for replace refs.

Signed-off-by: Mike Hommey &lt;mh@glandium.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
