Bug: format-patch MIME boundary not added to cover letter when attach enabled

2018-04-29 Thread Patrick Hemmer
When you use `git format-patch --cover-letter --attach`, the cover
letter does not have the trailing MIME boundary. RFC2046 states that the
last part must be followed by a closing boundary. This causes some email
clients (Thunderbird in my case) to discard the message body.
This is experienced with git 2.16.3.

For example:

$ git format-patch --cover-letter --attach --root -o /tmp/out
/tmp/out/-cover-letter.patch
/tmp/out/0001-hello-world.patch

$ cat /tmp/out/-cover-letter.patch
>From a25ac88e6216131e8b000335d32bb99d4e5185ac Mon Sep 17 00:00:00 2001
From: Patrick Hemmer <g...@stormcloud9.net>
Date: Sun, 29 Apr 2018 21:26:45 -0400
Subject: [PATCH 0/1] *** SUBJECT HERE ***
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="2.16.3"

This is a multi-part message in MIME format.
--2.16.3
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


*** BLURB HERE ***

Patrick Hemmer (1):
  hello world

-- 
2.16.3


Set file modification time on checkout

2014-11-12 Thread Patrick Hemmer
The request is to allow git to set the file modification time on
checkout to the commit-author-date of the commit which last modified the
file.
Yes I know this is in the FAQ, but the FAQ entry is missing an
increasingly common use case: docker.
When docker builds an image, it generates layers of images based on each
build step. Adding a file would be a build step, and for this action it
generates a hash based on the file modification time  content. Next
time the image is built, if these haven't changed, the previously built
layer is reused. And like git commit history, if a layer changes, the
hash of all subsequent layers change and have to be rebuilt. So reusing
layers can save a ton of time.

Now I'm not proposing that this be made the default action. The `make`
use case is legitimate. But it would be nice to have an option for
`checkout` and `reset` which toggles the behavior.

-Patrick
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html