mricon/grokmirror

Inconsistent use of slashes results in multiple manifest entries

Opened this issue · 0 comments

Grok mirror does not normalize repo paths and the manifest file can end up with multiple entries for the same repo.

mkdir ~/test
cd ~/test
git init repo1
cd repo1
touch a
git add a
git commit -m "Commit #1"
cd ..
mkdir git
cd git
git init --bare ../repo1 bare1
grok-manifest.py -m ~/test/manifest.js.gz -y -t ~/test/git/
grok-manifest.py -m ~/test/manifest.js.gz -y -t ~/test/git
grok-manifest.py -m ~/test/manifest.js.gz -y -t ~/test/git ~/test/git/bare1/
cat ~/test/manifest.js.gz
{
    "/bare1": {
    "description": "Unnamed repository; edit this file 'description' to name the repository.", 
    "modified": 1378225388, 
    "owner": null, 
    "reference": null
    }, 
    "/bare1/": {
    "description": "Unnamed repository; edit this file 'description' to name the repository.", 
    "modified": 1378225388, 
    "owner": null, 
    "reference": null
    }, 
    "bare1": {
    "description": "Unnamed repository; edit this file 'description' to name the repository.", 
    "modified": 1378225388, 
    "owner": null, 
    "reference": null
    }
}