#359 open
Daniel Kühne

scm_git on Windows

Reported by Daniel Kühne | October 24th, 2010 @ 09:59 AM


all git commands that a called from scm_git through ruby-git on windows need special handling. For me adding git_cmd = git_cmd.gsub(/'/,"\"") as first line on method run_command in plugins/scm_git/vendor/ruby-git/lib/git/lib.rb solved the probleme and I could use this plugin with mysysgit on windows.

Comments and changes to this ticket

  • Daniel Lucraft

    Daniel Lucraft October 24th, 2010 @ 11:40 AM

    • State changed from “new” to “open”
    • Assigned user set to “mscharley”

    Thanks Dan, I'm passing this one on to Matt, the scm guy :)

  • tim.felgentreff (at student.hpi.uni-potsdam)

    tim.felgentreff (at student.hpi.uni-potsdam) February 19th, 2011 @ 01:06 PM

    For textmate commands, I'm passing the commandlines through to the runnables plugin, which has handling for stuff like this already. Maybe this should be done by the SCM plugins as well. Seems dirty to replicate such logic across town.

  • mscharley

    mscharley February 21st, 2011 @ 09:17 PM

    Can anyone verify this problem still exists? I remember doing something along these lines already.

    @Tim the issue with doing things that way is that the code he's talking about is inside ruby-git, an external library. We don't really want to make the two codebases codependant.

  • vinodkd

    vinodkd March 8th, 2011 @ 12:18 AM

    I can confirm that this still fails on Redcar 0.10 ( i386-mingw32 ) on windows, and adding Dan's changes resolves the issue. I can also confirm that given the implementation of ruby-git, Dan's fix is probably the smallest fix that can be made (aside from OS-sniffing to do it conditionally). The main problem is that tons of calls to command_lines() have single quoted strings. Fixing all of them with a gsub after they've been flattened is much simpler than fixing every single string.

    It also seems that ruby-git is no longer maintained (the author has moved to grit), so one of two things should be ok:
    1. Change ruby-git code - the code is not expected to change
    2. redcar moves to grit, where hopefully this problem doesn't exist.

  • mscharley

    mscharley March 8th, 2011 @ 07:53 AM

    1. We're already using a fork of ruby-git
    2. When I first evaluated different libraries for use with redcar, I did try out Grit and found it significantly more buggy than ruby-git. That said, it's probably improved in the last couple months and it's more or less a drop-in replacement if someone wants to try that

    In the meantime, I'll double-check what happened with my updates, because I'm sure I fixed this one already, I may not have bumped the version that redcar vendors in though properly.

  • mscharley

    mscharley March 8th, 2011 @ 08:42 AM

    At this point I need two things.

    1. Someone on Windows, can you test the latest master at https://github.com/mscharley/redcar/ please?
    2. Someone not on Windows, can you please test the same? Specifically, files with quotes, single and double, in the name. I seem to recall there being issues with using double quotes on non-Windows systems. Windows requires them though, so lets try...
  • vinodkd

    vinodkd March 9th, 2011 @ 09:10 PM

    I started trying #1 out, but am currently failing at the submodule update step with this error:

    fatal: reference is not a tree: 934217c3822d54e9a2c349af6ed045f2cea340b5
    Unable to checkout '934217c3822d54e9a2c349af6ed045f2cea340b5' in submodule path

    i'm not a git expert so i dont know if this is something I can fix by myself, but if not, could you take a look?

  • mscharley

    mscharley March 13th, 2011 @ 08:54 PM

    Sorry for not getting to this sooner, it totally slipped my mind.

    You should be able to do a git submodule update to fix this now.

  • vinod

    vinod March 16th, 2011 @ 09:25 PM

    ok got the submodule update to work and install redcar, but it still does not work. More specifically:

    1. rt clicking on the project directory shows the option to switch branches. a new branch gets created, but switching back to master fails with the following error in a dialog:
      git checkout ''"'"'test'"'"'' 2>&1:error: pathspec '''''test''''' did not match any file(s) known to git.
      this is followed by another dialog with the same text minus all the extra quotes, but same effect.

    2. The uncommitted changes tree still doesnt show the changes, and seems to show some mis-parsed messages from the internal git output.see attachment for a screenshot.

    I tried reapplying Daniel's "fix" and now that doesnt work either. not sure if i'm making the change in the right place. Am I right in assuming that the source install replaces the $ruby_home/gems/redcar-xx/plugins/scm_git/ version of lib.rb?

  • vinod

    vinod March 17th, 2011 @ 05:05 PM

    In hindsight, I'm guessing your fixes and Dan's are not complimentary. Last question withdrawn.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A programmer's text editor for Gnome.

People watching this ticket