brackets-userland / brackets-git

brackets-git — git extension for adobe/brackets
Other
656 stars 193 forks source link

Git executabe over LAN #1313

Open knoppys opened 7 years ago

knoppys commented 7 years ago

All of my development sites are located on our in house development server over LAN. How do I configure the extension to work with remote working directories and not on the local machine.

zaggino commented 7 years ago

I have no idea, never worked in such environment. Are your network locations mapped as local drives?

knoppys commented 7 years ago

All our machines are Linux (Ubuntu) machines and we simply connect to the server using the file browsers using the server user login then, open the folder in Brackets. So yes this maps as local network drives. Brackets opens, edits and saves fine.

zaggino commented 7 years ago

Well this extension simply executes git commands in current project directory, so it should work. When you turn on debug mode in git settings, what do you see in error console?

knoppys commented 7 years ago

![Uploading Untitled.png…]() Commit: Type in a message, hit Ok and get an error saying Git Commit Failed : Aborting due to empty commit mesage. But i did type a message in. Forgive me Im new to Brackets, Ive activated debug mode but where would i find the error console.

zaggino commented 7 years ago

Have a look in Debug > Show developer tools > Console

knoppys commented 7 years ago

The below is the error, so its looking in the right place but should the commit message not be in between quotes > "message"

brackets-git] cmd-spawn: /run/user/1000/gvfs/ftp:host=192.168.0.40,user=knoppysdev/var/www/servicedcitypads/wp-content/themes/servicedcitypads/ -> git commit -m First commit Utils.js:354 [brackets-git] cmd-spawn-fail (391ms;ID=94): "Aborting commit due to empty commit message." Utils.js:354 [brackets-git] call: git commit -m First commit Error: Aborting commit due to empty commit message. at Object.exports.toError (file:///home/alex/.config/Brackets/extensions/user/zaggino.brackets-git/src/ErrorHandler.js:157:19) at NodeConnection. (file:///home/alex/.config/Brackets/extensions/user/zaggino.brackets-git/src/Cli.js:185:44) at j (file:///opt/brackets/www/thirdparty/thirdparty.min.js:19:26911) at Object.k.fireWith (file:///opt/brackets/www/thirdparty/thirdparty.min.js:19:27724) at NodeConnection._receive (/utils/NodeConnection.js:498:34)

knoppys commented 7 years ago

This keeps popping up every time I try to load a file in the sidebar. It loads but I get this popup. untitled

zaggino commented 7 years ago
Brackets Git updated to version 0.16.6.

can you update and try again? still the same?

knoppys commented 7 years ago

Soz but no, got the same error. untitled

knoppys commented 7 years ago

And this error when adding a commit messgae untitled

zaggino commented 7 years ago

Well, the actual string escaping is done by NodeJs internally, it works on all platforms (I can commit stuff with spaces) but it seems there's something weird about your setup (network drive). This is the code in question https://github.com/zaggino/brackets-git/blob/master/src/domains/cli.js#L57-L59

You can go to extensions folder and try to modify it, maybe you'll come up with a PR to solve your issue.

zaggino commented 7 years ago

Something like:

function spawn(directory, command, args, opts, callback) {
        args = args.map(function (arg) {
            if (/\s+/g.test(arg)) {
                return '"' + arg + '"';  
            }
            return arg;
        });

        // https://github.com/creationix/node-git
        var child = crossSpawn(command, args, {
            cwd: directory
        });

could maybe help?