gornostal / Modific

Highlight lines changed since the last commit (supports Git, SVN, Bazaar, Mercurial and TFS) / ST2(3) plugin
614 stars 44 forks source link

Support command-line params configurations for VCSes #43

Closed timothybasanov closed 11 years ago

timothybasanov commented 11 years ago

I'm using Git with Modific to check on changes within my files. Due to special process we are using I use different command-line parameters than ones provided by default.

I found out that the only way to modify them is to modify Modific.py itself. Another workaround is to write special script file to parse params you passed and call git with the params I need. Both seem pretty uncool.

Could you add an ability to configure VCS more precisely?

   "vcs": {
      'git': [
        'git', 'diff', '--no-color', '--no-ext-diff', '--'
      ]
    }

I know that this would cause problems with SVN as it dynamically adds ['--revision', 'HEAD'] and I do not have a ready available solution for this.

gornostal commented 11 years ago

What command-line parameters do you use? Maybe it's easier to add options to the config file.

gornostal commented 11 years ago

I mean I can add extra config options for Modific.

timothybasanov commented 11 years ago

I use wrapper around git which does accept different options than a normal one. I do not see any simple way to move such things into configuration.

An example on why this could be necessary: when you use branches for code reviews you make a lot of commits to the same review branch in response to reviewers' comments, but you usually interested only in difference to some other branch.

Another example: using --patience, --no-renames, --find-copies (and related) or --ignore-submodules could be useful.

As an easy workaround: allow shell=True when calling git executable, then I'll be able to add as many options as I need right into 'git' dictionary value as a string: 'git': '~/bin/git --foo'

gornostal commented 11 years ago

OK. I got your point. I will try to implement this feature when I find time for that.

gornostal commented 11 years ago

Please checkout the dev branch. If it's what you need and it works for you, I'll merge it to the master.

timothybasanov commented 11 years ago

Yep, that's it!

Timothy Basanov

On Sat, May 18, 2013 at 1:38 PM, Aleksandr Gornostal < notifications@github.com> wrote:

Please checkout the dev https://github.com/gornostal/Modific/tree/devbranch. If it's what you need and it works for you, I'll merge it to the master.

— Reply to this email directly or view it on GitHubhttps://github.com/gornostal/Modific/issues/43#issuecomment-18107627 .

gornostal commented 11 years ago

@timofeybasanov merged into the master. Sorry, it took so long.