Skip to content

[BUG] problem with doublequotes in the keys. #96

Open

Description

@DerZyklop

What / Why

my ini file content

[gitflow "branch.feature/PLANO-34129"]
	base = master

gets parsed to

{
  'gitflow "branch': {
    'feature/PLANO-34129"': {
      'base': 'master'
    }
  }
}

Note the missing " in the keys.

How

Steps to Reproduce

.gitconfig

[gitflow "branch.feature/PLANO-34129"]
	base = master

reproduce.js

const ini = require('ini')
const fs = require('fs')

var config = ini.parse(fs.readFileSync('.gitconfig', 'utf-8'))

console.log(JSON.stringify(team_config));

Expected Behavior

Something like this:

{
  'gitflow': {
    'branch': {
      'feature/PLANO-34129': {
        'base': 'master'
      }
    }
  }
}

Activity

  1. changed the title [-][BUG] doublequotes are missing in the keys.[/-] [+][BUG] non-closing doublequotes in the keys.[/+] on Jul 7, 2020
  2. changed the title [-][BUG] non-closing doublequotes in the keys.[/-] [+][BUG] problem with doublequotes in the keys.[/+] on Jul 7, 2020
  3. aleclarson commented on May 11, 2021

    @aleclarson

    Actually, it's a problem with dots, not double quotes.

    Duplicate of #22

  4. s-light commented on Apr 23, 2025

    @s-light

    same for .gitmodules files.
    i think this one can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions