<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4014-format-patch.sh, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-06-10T22:26:05Z</updated>
<entry>
<title>Merge branch 'jk/shell-portability'</title>
<updated>2016-06-10T22:26:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-06-10T22:26:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=45c0c21eb96ce45f05ffbe8600adf6ac65086415'/>
<id>urn:sha1:45c0c21eb96ce45f05ffbe8600adf6ac65086415</id>
<content type='text'>
test fixes.

* jk/shell-portability:
  t5500 &amp; t7403: lose bash-ism "local"
  test-lib: add in-shell "env" replacement
</content>
</entry>
<entry>
<title>test-lib: add in-shell "env" replacement</title>
<updated>2016-06-01T15:04:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-06-01T07:04:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d2554c7207896136ad2033776efd29578592a3fb'/>
<id>urn:sha1:d2554c7207896136ad2033776efd29578592a3fb</id>
<content type='text'>
The one-shot environment variable syntax:

  FOO=BAR some-program

is unportable when some-program is actually a shell
function, like test_must_fail (on some shells FOO remains
set after the function returns, and on others it does not).

We sometimes get around this by using env, like:

  test_must_fail env FOO=BAR some-program

But that only works because test_must_fail's arguments are
themselves a command which can be run. You can't run:

  env FOO=BAR test_must_fail some-program

because env does not know about our shell functions. So
there is no equivalent for test_commit, for example, and one
must resort to:

  (
    FOO=BAR
    export FOO
    test_commit
  )

which is a bit verbose.  Let's add a version of "env" that
works _inside_ the shell, by creating a subshell, exporting
variables from its argument list, and running the command.

Its use is demonstrated on a currently-unportable case in
t4014.

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>Merge branch 'xy/format-patch-base'</title>
<updated>2016-05-23T21:54:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-23T21:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72ce3ff7b51c1e0703f433fb000519521441abf8'/>
<id>urn:sha1:72ce3ff7b51c1e0703f433fb000519521441abf8</id>
<content type='text'>
"git format-patch" learned a new "--base" option to record what
(public, well-known) commit the original series was built on in
its output.

* xy/format-patch-base:
  format-patch: introduce format.useAutoBase configuration
  format-patch: introduce --base=auto option
  format-patch: add '--base' option to record base tree info
  patch-ids: make commit_patch_id() a public helper function
</content>
</entry>
<entry>
<title>format-patch: introduce format.useAutoBase configuration</title>
<updated>2016-04-26T17:52:57Z</updated>
<author>
<name>Xiaolong Ye</name>
<email>xiaolong.ye@intel.com</email>
</author>
<published>2016-04-26T07:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb52995f3ec7fac2b282a91af4230e4f387af234'/>
<id>urn:sha1:bb52995f3ec7fac2b282a91af4230e4f387af234</id>
<content type='text'>
This allows to record the base commit automatically, it is equivalent
to set --base=auto in cmdline.

The format.useAutoBase has lower priority than command line option,
so if user set format.useAutoBase and pass the command line option in
the meantime, base_commit will be the one passed to command line
option.

Signed-off-by: Xiaolong Ye &lt;xiaolong.ye@intel.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: introduce --base=auto option</title>
<updated>2016-04-26T17:51:50Z</updated>
<author>
<name>Xiaolong Ye</name>
<email>xiaolong.ye@intel.com</email>
</author>
<published>2016-04-26T07:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3de665175f3433ccd1dadd4d5d09fa9553948e55'/>
<id>urn:sha1:3de665175f3433ccd1dadd4d5d09fa9553948e55</id>
<content type='text'>
Introduce --base=auto to record the base commit info automatically, the
base_commit will be the merge base of tip commit of the upstream branch
and revision-range specified in cmdline.

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Helped-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Xiaolong Ye &lt;xiaolong.ye@intel.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: add '--base' option to record base tree info</title>
<updated>2016-04-26T17:50:13Z</updated>
<author>
<name>Xiaolong Ye</name>
<email>xiaolong.ye@intel.com</email>
</author>
<published>2016-04-26T07:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa2ab86d18f16ab5e6d2f2cd6e8cc00460bada17'/>
<id>urn:sha1:fa2ab86d18f16ab5e6d2f2cd6e8cc00460bada17</id>
<content type='text'>
Maintainers or third party testers may want to know the exact base tree
the patch series applies to. Teach git format-patch a '--base' option
to record the base tree info and append it at the end of the first
message (either the cover letter or the first patch in the series).

The base tree info consists of the "base commit", which is a well-known
commit that is part of the stable part of the project history everybody
else works off of, and zero or more "prerequisite patches", which are
well-known patches in flight that is not yet part of the "base commit"
that need to be applied on top of "base commit" in topological order
before the patches can be applied.

The "base commit" is shown as "base-commit: " followed by the 40-hex of
the commit object name.  A "prerequisite patch" is shown as
"prerequisite-patch-id: " followed by the 40-hex "patch id", which can
be obtained by passing the patch through the "git patch-id --stable"
command.

Imagine that on top of the public commit P, you applied well-known
patches X, Y and Z from somebody else, and then built your three-patch
series A, B, C, the history would be like:

---P---X---Y---Z---A---B---C

With "git format-patch --base=P -3 C" (or variants thereof, e.g. with
"--cover-letter" of using "Z..C" instead of "-3 C" to specify the
range), the base tree information block is shown at the end of the
first message the command outputs (either the first patch, or the
cover letter), like this:

base-commit: P
prerequisite-patch-id: X
prerequisite-patch-id: Y
prerequisite-patch-id: Z

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Helped-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Xiaolong Ye &lt;xiaolong.ye@intel.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: activate diff.renames by default</title>
<updated>2016-02-25T19:31:02Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2016-02-25T08:59:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5404c116aa921d7e2f9408e103c80b7801735d08'/>
<id>urn:sha1:5404c116aa921d7e2f9408e103c80b7801735d08</id>
<content type='text'>
Rename detection is a very convenient feature, and new users shouldn't
have to dig in the documentation to benefit from it.

Potential objections to activating rename detection are that it
sometimes fail, and it is sometimes slow. But rename detection is
already activated by default in several cases like "git status" and "git
merge", so activating diff.renames does not fundamentally change the
situation. When the rename detection fails, it now fails consistently
between "git diff" and "git status".

This setting does not affect plumbing commands, hence well-written
scripts will not be affected.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: introduce format.outputDirectory configuration</title>
<updated>2016-01-13T18:55:01Z</updated>
<author>
<name>Alexander Kuleshov</name>
<email>kuleshovmail@gmail.com</email>
</author>
<published>2016-01-13T13:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc6bf2d7641d6c2450b347d5a0b2f954728bf4d9'/>
<id>urn:sha1:bc6bf2d7641d6c2450b347d5a0b2f954728bf4d9</id>
<content type='text'>
We can pass -o/--output-directory to the format-patch command to store
patches in some place other than the working directory. This patch
introduces format.outputDirectory configuration option for same
purpose.

The case of usage of this configuration option can be convenience
to not pass every time -o/--output-directory if an user has pattern
to store all patches in the /patches directory for example.

The format.outputDirectory has lower priority than command line
option, so if user will set format.outputDirectory and pass the
command line option, a result will be stored in a directory that
passed to command line option.

Signed-off-by: Alexander Kuleshov &lt;kuleshovmail@gmail.com&gt;
Signed-off-by: Stephen P. Smith &lt;ischis2@cox.net&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: check that header line has expected format</title>
<updated>2015-12-15T18:03:56Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-12-15T01:52:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06dfc9ebaa154d5074b7afadc2f792a80fba7d0c'/>
<id>urn:sha1:06dfc9ebaa154d5074b7afadc2f792a80fba7d0c</id>
<content type='text'>
The format of the "From " header line is very specific to allow
utilities to detect Git-style patches.  Add a test that the patches
created are in the expected format.

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>format-patch: add an option to suppress commit hash</title>
<updated>2015-12-15T18:03:40Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-12-15T01:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a30aa17879b08f96262abb9a22c7bbe8f56e4c9'/>
<id>urn:sha1:3a30aa17879b08f96262abb9a22c7bbe8f56e4c9</id>
<content type='text'>
Oftentimes, patches created by git format-patch will be stored in
version control or compared with diff.  In these cases, two otherwise
identical patches can have different commit hashes, leading to diff
noise.  Teach git format-patch a --zero-commit option that instead
produces an all-zero hash to avoid this diff noise.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
