Skip to content

git show with --date=format:%F dies with out-of-memory error #863

@snaewe

Description

@snaewe
  • I was not able to find an open
    or closed issue
    matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? 32-bit or 64-bit? Include the
    output of git version as well.

git 2.9.3(2) 64bit

$ git --version
git version 2.9.3.windows.2
  • Which version of Windows are you running? 32-bit or 64-bit?

Win7 64bit

  • What options did you set as part of the installation? Or did you choose the
    defaults?
$ cat /etc/install-options.txt
Path Option: Cmd
SSH Option: OpenSSH
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

No.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

bash

git init -q demo ; cd demo ; git commit -q --allow-empty -m "empty" ; git show -s --date=format:%F --pretty='format:%h (%ad)'
  • What did you expect to occur after running these commands?

I expected to see something like:

086cb71 (2016-08-29)

like I did on another Linux system.

  • What actually happened instead?

After a couple of minutes (while my system was swapping itself to death....) the output inside of bash was:

fatal: Out of memory, realloc failed

Seems to be a problem with strftime() returning 0 for invalid/unknown format specifiers (%F that is).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions