<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/replace.c, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-27T22:14:18Z</updated>
<entry>
<title>Merge branch 'cc/replace-graft'</title>
<updated>2014-07-27T22:14:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-27T22:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16737445a94cb9b18378fff973129d974c7cdf8a'/>
<id>urn:sha1:16737445a94cb9b18378fff973129d974c7cdf8a</id>
<content type='text'>
"git replace" learned a "--graft" option to rewrite parents of a
commit.

* cc/replace-graft:
  replace: add test for --graft with a mergetag
  replace: check mergetags when using --graft
  replace: add test for --graft with signed commit
  replace: remove signature when using --graft
  contrib: add convert-grafts-to-replace-refs.sh
  Documentation: replace: add --graft option
  replace: add test for --graft
  replace: add --graft option
  replace: cleanup redirection style in tests
</content>
</entry>
<entry>
<title>replace: check mergetags when using --graft</title>
<updated>2014-07-21T19:06:49Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2014-07-19T15:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25a05a8cae263ca55e75d31336d09c8d9bc90be3'/>
<id>urn:sha1:25a05a8cae263ca55e75d31336d09c8d9bc90be3</id>
<content type='text'>
When using --graft, with a mergetag in the original
commit, we should check that the commit pointed to by
the mergetag is still a parent of then new commit we
create, otherwise the mergetag could be misleading.

If the commit pointed to by the mergetag is no more
a parent of the new commit, we could remove the
mergetag, but in this case there is a good chance
that the title or other elements of the commit might
also be misleading. So let's just error out and
suggest to use --edit instead on the commit.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace: remove signature when using --graft</title>
<updated>2014-07-21T19:05:58Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2014-07-19T15:01:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b05ab6f1bfa045f460ad5c40d87ef8c2965bf56'/>
<id>urn:sha1:0b05ab6f1bfa045f460ad5c40d87ef8c2965bf56</id>
<content type='text'>
It could be misleading to keep a signature in a
replacement commit, so let's remove it.

Note that there should probably be a way to sign
the replacement commit created when using --graft,
but this can be dealt with in another commit or
patch series.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace: add --graft option</title>
<updated>2014-07-21T19:04:23Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2014-07-19T15:01:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4228e8bc989c6cac1c47faece720faa06531281f'/>
<id>urn:sha1:4228e8bc989c6cac1c47faece720faa06531281f</id>
<content type='text'>
The usage string for this option is:

git replace [-f] --graft &lt;commit&gt; [&lt;parent&gt;...]

First we create a new commit that is the same as &lt;commit&gt;
except that its parents are [&lt;parents&gt;...]

Then we create a replace ref that replace &lt;commit&gt; with
the commit we just created.

With this new option, it should be straightforward to
convert grafts to replace refs.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace: add a --raw mode for --edit</title>
<updated>2014-06-25T22:28:28Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-24T09:46:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2deda629c2ab7228790fb7561e66515a9bdcf7b6'/>
<id>urn:sha1:2deda629c2ab7228790fb7561e66515a9bdcf7b6</id>
<content type='text'>
One of the purposes of "git replace --edit" is to help a
user repair objects which are malformed or corrupted.
Usually we pretty-print trees with "ls-tree", which is much
easier to work with than the raw binary data.  However, some
forms of corruption break the tree-walker, in which case our
pretty-printing fails, rendering "--edit" useless for the
user.

This patch introduces a "--raw" option, which lets you edit
the binary data in these instances.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace: use argv_array in export_object</title>
<updated>2014-06-25T22:28:01Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-24T09:46:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36857e0026f5a7855f941a955bf7014408a816dd'/>
<id>urn:sha1:36857e0026f5a7855f941a955bf7014408a816dd</id>
<content type='text'>
This is a little more verbose, but will make it easier to
make parts of our command-line conditional (without
resorting to magic numbers or lots of NULLs to get an
appropriately sized argv array).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>avoid double close of descriptors handed to run_command</title>
<updated>2014-06-25T22:27:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-24T09:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=28bf9429ef2e1534be8d3a59ad236834be542b86'/>
<id>urn:sha1:28bf9429ef2e1534be8d3a59ad236834be542b86</id>
<content type='text'>
When a file descriptor is given to run_command via the
"in", "out", or "err" parameters, run_command takes
ownership. The descriptor will be closed in the parent
process whether the process is spawned successfully or not,
and closing it again is wrong.

In practice this has not caused problems, because we usually
close() right after start_command returns, meaning no other
code has opened a descriptor in the meantime. So we just get
EBADF and ignore it (rather than accidentally closing
somebody else's descriptor!).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace: replace spaces with tabs in indentation</title>
<updated>2014-06-25T22:26:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-24T09:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3cc9d87710b20c86252809e068fe309f6bb7ecc2'/>
<id>urn:sha1:3cc9d87710b20c86252809e068fe309f6bb7ecc2</id>
<content type='text'>
This matches our usual style and the surrounding code.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace: add --edit to usage string</title>
<updated>2014-05-19T20:39:54Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2014-05-17T12:16:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab77c309b633ab3afc16e91cbff307c39599d048'/>
<id>urn:sha1:ab77c309b633ab3afc16e91cbff307c39599d048</id>
<content type='text'>
Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>replace: die early if replace ref already exists</title>
<updated>2014-05-19T20:39:53Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2014-05-17T12:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24790835738dc098fa6becedc44aac0341b7d5af'/>
<id>urn:sha1:24790835738dc098fa6becedc44aac0341b7d5af</id>
<content type='text'>
If a replace ref already exists for an object, it is
much better for the user if we error out before we
let the user edit the object, rather than after.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
