GithubHelp home page GithubHelp logo

git-migrate's Issues

Allow relative paths for options

If a relative path is provided for any path option, resolve the path with respect to the --dir option or dir config file option.

For example:

vendor/bin/git-migrate --dir /full/path/to/repos --authors ../authors.txt

The --authors path would results to /full/path/to/authors.txt because /full/path/to/repos/../authors.txt resolves to /full/path/to/authors.txt.

This applies for the following options:

  • --authors
  • --items
  • --javalib

Add support for pushing to remote origin with --config

Adding support for pushing to the remote origin would require defining the remote origin.

The current --items layout is:

return [
    'my-external-dir' => [
        'another-dir' => [
            'repo1',
            'repo2'
        ]
    ]
]

So this would necessitate a change to this structure. To maintain backwards compatibility, I suggest adding a --config flag for the new structure. --items could continue to be used, and would simply overwrite the repositories section of the --config file if provided. In fact, all parameters specified via a flag would overwrite that defined in the --config file.

The new config would have the following structure:

{
  "repositories": [
    {
      "path": "my-external-dir/another-dir/repo1",
      "origin": "https://domain.com/repo1.git"
    },
    {
      "path": "my-external-dir/another-dir/repo2"
    }
  ]
}

With the origin known, if provided with the flag --push, then add the origin, and push:

git remote remove origin
git remote add origin https://domain.com/repo1.git
git push -u origin --all
git push -u origin --tags

In addition to repositories we'd add the following to mirror their parameters:

  • authors
  • dir
  • javalib
  • url

So the --config stucture would be:

{
  "repositories": [
    ...
  ],
  "authors": "/path/to/authors.txt",
  "dir": "/path/to/",
  "javalib": "/path/to/svn-migration-scripts.jar"
  "url": "svn://svn.yourdomain.com/",
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.