<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git/unpack-trees.h, branch sb/submodule-init-url-selection</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>diff-lib, read-tree, unpack-trees: mark cache_entry array paramters const</title>
<updated>2013-06-02T22:31:14+00:00</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2013-06-02T15:46:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=5828e8352c07753a1f751322800524bf9dff8679'/>
<id>5828e8352c07753a1f751322800524bf9dff8679</id>
<content type='text'>
Change the type merge_fn_t to accept the array of cache_entry pointers
as const pointers to const pointers.  This documents the fact that the
merge functions don't modify the cache_entry contents or replace any of
the pointers in the array.

Only a single cast is necessary in unpack_nondirectories because adding
two const modifiers at once is not allowed in C.  The cast is safe in
that it doesn't mask any modfication; call_unpack_fn only needs the
array for reading.

Signed-off-by: René Scharfe &lt;rene.scharfe@lsrfire.ath.cx&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>
Change the type merge_fn_t to accept the array of cache_entry pointers
as const pointers to const pointers.  This documents the fact that the
merge functions don't modify the cache_entry contents or replace any of
the pointers in the array.

Only a single cast is necessary in unpack_nondirectories because adding
two const modifiers at once is not allowed in C.  The cast is safe in
that it doesn't mask any modfication; call_unpack_fn only needs the
array for reading.

Signed-off-by: René Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dir.c: replace is_path_excluded with now equivalent is_excluded API</title>
<updated>2013-04-15T19:34:01+00:00</updated>
<author>
<name>Karsten Blees</name>
<email>karsten.blees@gmail.com</email>
</author>
<published>2013-04-15T19:12:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=b07bc8c8c3c492d657a8bedf04ff939763ea8222'/>
<id>b07bc8c8c3c492d657a8bedf04ff939763ea8222</id>
<content type='text'>
Signed-off-by: Karsten Blees &lt;blees@dcon.de&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>
Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unpack-trees.c: use path_excluded() in check_ok_to_remove()</title>
<updated>2012-06-06T05:21:42+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-06-06T05:21:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=589570dbe7d291e73defea367babb5400a87e9f0'/>
<id>589570dbe7d291e73defea367babb5400a87e9f0</id>
<content type='text'>
This function is responsible for determining if a path that is not
tracked is ignored and allow "checkout" to overwrite it as needed.
It used excluded() without checking if higher level directory in the
path is ignored; correct it to use path_excluded() for this check.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
---

 * There are uses of lower-level interface excluded_from_list() in
   the codepath for narrow-checkout hack; they are supposed to be
   already checking each level as they descend, and are not touched
   with this patch.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function is responsible for determining if a path that is not
tracked is ignored and allow "checkout" to overwrite it as needed.
It used excluded() without checking if higher level directory in the
path is ignored; correct it to use path_excluded() for this check.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
---

 * There are uses of lower-level interface excluded_from_list() in
   the codepath for narrow-checkout hack; they are supposed to be
   already checking each level as they descend, and are not touched
   with this patch.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jc/diff-index-unpack'</title>
<updated>2011-10-05T19:35:53+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-05T19:35:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=1b840a56629c8c0620c261672cc5d4d35ba253fa'/>
<id>1b840a56629c8c0620c261672cc5d4d35ba253fa</id>
<content type='text'>
* jc/diff-index-unpack:
  diff-index: pass pathspec down to unpack-trees machinery
  unpack-trees: allow pruning with pathspec
  traverse_trees(): allow pruning with pathspec
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* jc/diff-index-unpack:
  diff-index: pass pathspec down to unpack-trees machinery
  unpack-trees: allow pruning with pathspec
  traverse_trees(): allow pruning with pathspec
</pre>
</div>
</content>
</entry>
<entry>
<title>unpack-trees: allow pruning with pathspec</title>
<updated>2011-08-29T22:08:31+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-29T19:31:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=40e372563cfbcce4380820ae03e872f09fa25327'/>
<id>40e372563cfbcce4380820ae03e872f09fa25327</id>
<content type='text'>
Use the pathspec pruning of traverse_trees() from unpack_trees(). Again,
the unpack_trees() machinery is primarily meant for merging two (or more)
trees, and because a merge is a full tree operation, it didn't support any
pruning with pathspec, and this codepath probably should not be enabled
while running a merge, but the caller in diff-lib.c::diff_cache() should
be able to take advantage of it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the pathspec pruning of traverse_trees() from unpack_trees(). Again,
the unpack_trees() machinery is primarily meant for merging two (or more)
trees, and because a merge is a full tree operation, it didn't support any
pruning with pathspec, and this codepath probably should not be enabled
while running a merge, but the caller in diff-lib.c::diff_cache() should
be able to take advantage of it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jc/diff-index-quick-exit-early'</title>
<updated>2011-06-30T00:03:11+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-06-30T00:03:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=57e4d61686b20ef3ad4982753407cf0bd87335f2'/>
<id>57e4d61686b20ef3ad4982753407cf0bd87335f2</id>
<content type='text'>
* jc/diff-index-quick-exit-early:
  diff-index --quiet: learn the "stop feeding the backend early" logic

Conflicts:
	unpack-trees.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* jc/diff-index-quick-exit-early:
  diff-index --quiet: learn the "stop feeding the backend early" logic

Conflicts:
	unpack-trees.h
</pre>
</div>
</content>
</entry>
<entry>
<title>diff-index --quiet: learn the "stop feeding the backend early" logic</title>
<updated>2011-05-31T18:24:12+00:00</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-31T17:06:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=b4194828dc00e97dcd07ecb4bb4f87650a6fca1d'/>
<id>b4194828dc00e97dcd07ecb4bb4f87650a6fca1d</id>
<content type='text'>
A negative return from the unpack callback function usually means unpack
failed for the entry and signals the unpack_trees() machinery to fail the
entire merge operation, immediately and there is no other way for the
callback to tell the machinery to exit early without reporting an error.

This is what we usually want to make a merge all-or-nothing operation, but
the machinery is also used for diff-index codepath by using a custom
unpack callback function. And we do sometimes want to exit early without
failing, namely when we are under --quiet and can short-cut the diff upon
finding the first difference.

Add "exiting_early" field to unpack_trees_options structure, to signal the
unpack_trees() machinery that the negative return value is not signaling
an error but an early return from the unpack_trees() machinery. As this by
definition hasn't unpacked everything, discard the resulting index just
like the failure codepath.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A negative return from the unpack callback function usually means unpack
failed for the entry and signals the unpack_trees() machinery to fail the
entire merge operation, immediately and there is no other way for the
callback to tell the machinery to exit early without reporting an error.

This is what we usually want to make a merge all-or-nothing operation, but
the machinery is also used for diff-index codepath by using a custom
unpack callback function. And we do sometimes want to exit early without
failing, namely when we are under --quiet and can short-cut the diff upon
finding the first difference.

Add "exiting_early" field to unpack_trees_options structure, to signal the
unpack_trees() machinery that the negative return value is not signaling
an error but an early return from the unpack_trees() machinery. As this by
definition hasn't unpacked everything, discard the resulting index just
like the failure codepath.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unpack-trees: add the dry_run flag to unpack_trees_options</title>
<updated>2011-05-25T21:32:02+00:00</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2011-05-25T20:07:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=2c9078d05bf2200c9671e0b292638d42e7e4fd71'/>
<id>2c9078d05bf2200c9671e0b292638d42e7e4fd71</id>
<content type='text'>
Until now there was no way to test if unpack_trees() with update=1 would
succeed without really updating the work tree. The reason for that is that
setting update to 0 does skip the tests for new files and deactivates the
sparse handling, thereby making that unsuitable as a dry run.

Add the new dry_run flag to struct unpack_trees_options unpack_trees().
Setting that together with the update flag will check if the work tree
update would be successful without doing it for real.

The only class of problems that is not detected at the moment are file
system conditions like ENOSPC or missing permissions. Also the index
entries of updated files are not as they would be after a real checkout
because lstat() isn't run as the files aren't updated for real.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&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>
Until now there was no way to test if unpack_trees() with update=1 would
succeed without really updating the work tree. The reason for that is that
setting update to 0 does skip the tests for new files and deactivates the
sparse handling, thereby making that unsuitable as a dry run.

Add the new dry_run flag to struct unpack_trees_options unpack_trees().
Setting that together with the update flag will check if the work tree
update would be successful without doing it for real.

The only class of problems that is not detected at the moment are file
system conditions like ENOSPC or missing permissions. Also the index
entries of updated files are not as they would be after a real checkout
because lstat() isn't run as the files aren't updated for real.

Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>use persistent memory for rejected paths</title>
<updated>2010-11-15T23:05:34+00:00</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2010-11-15T19:52:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=7980872d4ef3ce24329cbdb6d61dc2ed48cbf1c5'/>
<id>7980872d4ef3ce24329cbdb6d61dc2ed48cbf1c5</id>
<content type='text'>
An aborted merge prints the list of rejected paths as part of the
error message. Since commit f66caaf9 (do not overwrite files in
leading path), some of those paths do not have static buffers, so
we have to keep a copy. Use string_list's to accomplish this.

This changes the order of the list to the order in which the paths
are processed. Previously, it was reversed.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&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>
An aborted merge prints the list of rejected paths as part of the
error message. Since commit f66caaf9 (do not overwrite files in
leading path), some of those paths do not have static buffers, so
we have to keep a copy. Use string_list's to accomplish this.

This changes the order of the list to the order in which the paths
are processed. Previously, it was reversed.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move "show_all_errors = 1" to setup_unpack_trees_porcelain()</title>
<updated>2010-09-03T16:31:51+00:00</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2010-09-02T16:08:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/git.git/commit/?id=5e65ee35ddd306d6e6c86efc1c95315942f87811'/>
<id>5e65ee35ddd306d6e6c86efc1c95315942f87811</id>
<content type='text'>
Not only this makes the code clearer since setting up the porcelain error
message is meant to work with show_all_errors, but this fixes a call to
setup_unpack_trees_porcelain() in git_merge_trees() which did not set
show_all_errors.

add_rejected_path() used to double-check whether it was running in
plumbing mode. This check was ineffective since it was setting
show_all_errors too late for traverse_trees() to see it, and is made
useless by this patch. Remove it.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&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>
Not only this makes the code clearer since setting up the porcelain error
message is meant to work with show_all_errors, but this fixes a call to
setup_unpack_trees_porcelain() in git_merge_trees() which did not set
show_all_errors.

add_rejected_path() used to double-check whether it was running in
plumbing mode. This check was ineffective since it was setting
show_all_errors too late for traverse_trees() to see it, and is made
useless by this patch. Remove it.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
