Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-12 19:16:56 +0300
committerJunio C Hamano <gitster@pobox.com>2016-08-12 19:16:56 +0300
commitf4fd6276619dfe7cf9a024730ca65b1bd0b3492b (patch)
treeaa54c677b20d12cbca00ee7d606b0e0184206a24
parent8e4b75a97beaf88aa83ab2b18c07bd8ae4954f28 (diff)
parent4d9c7e6f45523ce1bf9615689e6c4e13fd82ed5d (diff)
Merge branch 'jk/reset-ident-time-per-commit' into maint
Not-so-recent rewrite of "git am" that started making internal calls into the commit machinery had an unintended regression, in that no matter how many seconds it took to apply many patches, the resulting committer timestamp for the resulting commits were all the same. * jk/reset-ident-time-per-commit: am: reset cached ident date for each patch
-rw-r--r--builtin/am.c2
-rw-r--r--cache.h1
-rw-r--r--ident.c5
3 files changed, 8 insertions, 0 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 0d97f2fabb..00e4a09814 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1839,6 +1839,8 @@ static void am_run(struct am_state *state, int resume)
const char *mail = am_path(state, msgnum(state));
int apply_status;
+ reset_ident_date();
+
if (!file_exists(mail))
goto next;
diff --git a/cache.h b/cache.h
index 7265439584..c141b3ca0d 100644
--- a/cache.h
+++ b/cache.h
@@ -1262,6 +1262,7 @@ extern const char *ident_default_email(void);
extern const char *git_editor(void);
extern const char *git_pager(int stdout_is_tty);
extern int git_ident_config(const char *, const char *, void *);
+extern void reset_ident_date(void);
struct ident_split {
const char *name_begin;
diff --git a/ident.c b/ident.c
index 139c5289d0..e20a772dde 100644
--- a/ident.c
+++ b/ident.c
@@ -184,6 +184,11 @@ static const char *ident_default_date(void)
return git_default_date.buf;
}
+void reset_ident_date(void)
+{
+ strbuf_reset(&git_default_date);
+}
+
static int crud(unsigned char c)
{
return c <= 32 ||