Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown date format error #860

Closed
ihmcjacky opened this issue Sep 23, 2019 · 6 comments
Closed

Unknown date format error #860

ihmcjacky opened this issue Sep 23, 2019 · 6 comments

Comments

@ihmcjacky
Copy link

ihmcjacky commented Sep 23, 2019

The following error occurs when compare branches and viewing individual commits after upgrading to gitlens v10

Issue Type: Bug (Maybe)
Extension Name: gitlens
Extension Version: 10.0.0
OS Version: Ubuntu 16.04 LTS
VSCode version: 1.38.1
Git Version: v2.7.4

Command failed: /usr/bin/git -c core.quotepath=false -c color.ui=false for-each-ref --format=%3ch%3e%(HEAD)%3cn%3e%(refname)%3cu%3e%(upstream:short)%3ct%3e%(upstream:track)%3cr%3e%(objectname)%3cd%3e%(committerdate:unix) refs/heads refs/remotes fatal: unknown date format unix

@eamodio
Copy link
Member

eamodio commented Sep 23, 2019

@ihmcjacky what version of Git do you have installed?

@ihmcjacky
Copy link
Author

@ihmcjacky what version of Git do you have installed?

Sorry for missing the info, further update the thread

@eamodio
Copy link
Member

eamodio commented Sep 23, 2019

@ihmcjacky It looks like the unix date format was added in Git 2.13.7 -- can you upgrade Git?

@ihmcjacky
Copy link
Author

@ihmcjacky It looks like the unix date format was added in Git 2.13.7 -- can you upgrade Git?

@eamodio After upgrading to git v2.23.0, problem gone, thanks so much!

eamodio added a commit that referenced this issue Sep 24, 2019
Older version of Git don't support unix timestamp dates
jdblischak added a commit to workflowr/workflowr that referenced this issue Dec 17, 2019
The data format "unix" was added in Git 2.13.7. My Ubuntu has
2.17.1. However, rocker/r-ver:3.2.5 has 2.1.4, causing an error.

gitkraken/vscode-gitlens#860 (comment)

Thus I instead use the raw date format and then parse it to only
obtain the first part containing the unix time.

$ git log -n 1 --date=unix --format=%ad
1576601494
$ git log -n 1 --date=raw --format=%ad
1576601494 -0500
@jdblischak
Copy link

The discussion in this Issue was helpful for me as I was debugging a Git-related issue with my own software. Thanks!

It looks like the unix date format was added in Git 2.13.7 -- can you upgrade Git?

In case anyone else finds this issue, the option --date=unix was added in version 2.9.4 (link to release notes):

$ git clone git@github.com:git/git.git
$ cd git
$ grep 'date=unix' Documentation/RelNotes/*
Documentation/RelNotes/2.10.0.txt:   --date=unix to report the seconds-since-epoch (without timezone)
Documentation/RelNotes/2.9.4.txt:   --date=unix to report the seconds-since-epoch (without timezone)

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants