dreamyguy / gitlogg

💾 🧮 🤯 Parse the 'git log' of multiple repos to 'JSON'
MIT License
130 stars 27 forks source link

The JSON parser is outputting the git log of the repo it's running on, under each repo #20

Open dreamyguy opened 6 years ago

dreamyguy commented 6 years ago

Even though the cli script manages to loop through the folders passed as an -d argument, the output being streamed into each repo belongs to the gitlogg repository.

In other words, when I add for instance the repository https://github.com/torvalds/linux as one of those under the directory I pass as -d argument, I get the following output:

{
  "repository": "linux",
  "commit_nr": 1,
  "commit_hash": "c7a397928f814f29028bccb281de60066395eaa1",
  "commit_hash_abbreviated": "c7a3979",
  "tree_hash": "e38dac0e625f63e877baa329204511ae490cd944",
  "tree_hash_abbreviated": "e38dac0",
  "parent_hashes": [],
  "parent_hashes_abbreviated": [],
  "author_name": "Wallace Sidhrée",
  "author_name_mailmap": "Wallace Sidhrée",
  "author_email": "i@dreamyguy.com",
  "author_email_mailmap": "i@dreamyguy.com",
  ...
}

The script catches the linux repository name (which is the name of the directory the repo is under), but the content of the output belongs to the gitlogg repo - in this case the first commit.