Skip to content

Issues sharing between local repos #156

@dimo414

Description

@dimo414

I'm experimenting with git-metrics locally and am running into a few issues with pulling/pushing between repos on the same machine. Here's what I tried:

$ git init metrics
Initialized empty Git repository in /tmp/metrics/.git/

$ cd metrics

$ git commit --allow-empty -m foo
[main (root-commit) 75070be] foo

$ git metrics add binary-size --tag "platform.os: linux" --tag "platform.arch: amd64" 1024.0

$ git metrics log
* 75070be foo
    binary-size{platform.os="linux", platform.arch="amd64"} 1024.00

$ git clone metrics metrics2
Cloning into 'metrics2'...
done.

$ cd metrics2

$ git metrics log # [1]
* 75070be foo

$ git metrics pull

$ git metrics log # [2]
* 75070be foo

$ git metrics pull ../metrics2 # [3]
unable to find remote


        '../metrics2' is not a valid remote name.; class=Config (7); code=InvalidSpec (-12)

$ cd ../metrics

$ git metrics push ../metrics # [4]
unable to persist metrics


        the given reference name 'refs/notes/metrics-remote-../metrics' is not valid; class=Reference (4); code=InvalidSpec (-12)

Namely, I wanted to share metrics between two clones, but I can't seem to do so.

  1. Upon cloning a repo the existing metrics are missing (this might be expected given the existence of git metrics pull, but it's unclear what the expected workflow is)
  2. So I tried git metrics pull, which succeeded but doesn't seem to have actually done anything
  3. Try again, explicitly specifying the local path, which fails (git pull ../metrics works)
  4. Try again on the push side, same issue

Root issue seems to be lack of support for local repos, but more generally I'd love to better understand how metrics are intended to transit between repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions