threads / discuss / 39063

git commit --date format

Subject: git commit --date format

## tl;dr

2 messages between Apr 13, 2015 and Apr 14, 2015.

replies: 1people: 2as markdown or json

乙酸鋰· Apr 13, 2015, 15:42 UTC · lore
Hi,

In git < 2.0, git commit --amend --date="" can amend commit with current time as author time. But since git 2.0, this does not work, dying with "invalid date format". I have to instead type git commit --amend --date="now". Is empty string date format no longer supported? Or will be fixed?

Junio C Hamano· Apr 14, 2015, 17:10 UTC · re: 乙酸鋰 · lore

Re: git commit --date format

乙酸鋰 <ch3cooli@gmail.com> writes:
Show 7 quoted lines
> Hi,
>
> In git < 2.0, git commit --amend --date="" can amend commit with
> current time as author time.
> But since git 2.0, this does not work, dying with "invalid date format".
> I have to instead type git commit --amend --date="now".
> Is empty string date format no longer supported? Or will be fixed?

I think this was a fix to the overly loose parser which took any typo (including an empty string, e.g. --date="$prevuois" that misspels the name of a shell variable that has the timestamp) as "now".

← back to recent threads