git-history icon indicating copy to clipboard operation
git-history copied to clipboard

Support `--convert .` for reading code from standard input

Open cpwnd opened this issue 4 years ago • 2 comments

I have an extensive xml file. It contains an xsd definition from which I generated an xml parser and class definitions via generateDS. Now I want to use it in the git-history import. I can also install the module manually via a setup.py, but I wanted to ask if you think adding a way to import local python modules is a good idea.

Nevertheless great tool! I have already some repos up and running :)

cpwnd avatar Dec 13 '21 10:12 cpwnd

This came up in another of my projects just a few weeks ago:

  • https://github.com/simonw/sqlite-utils/issues/353

https://github.com/simonw/sqlite-utils/issues/353#issuecomment-991376639 has a workaround that should work with git-history too:

PYTHONPATH=. git-history ... --import transform

So if your module is called transform.py in the current directory the above should cause it to be imported.

simonw avatar Dec 20 '21 01:12 simonw

Implementing the same solution as https://github.com/simonw/sqlite-utils/issues/353 feels like a good idea to me.

simonw avatar Dec 20 '21 01:12 simonw