{"action":"opened","issue":{"url":"https://api.github.com/repos/git-for-windows/git/issues/542","labels_url":"https://api.github.com/repos/git-for-windows/git/issues/542/labels{/name}","comments_url":"https://api.github.com/repos/git-for-windows/git/issues/542/comments","events_url":"https://api.github.com/repos/git-for-windows/git/issues/542/events","html_url":"https://github.com/git-for-windows/git/issues/542","id":118259007,"number":542,"title":"--exec doesn't work","user":{"login":"ploeh","id":242165,"avatar_url":"https://avatars.githubusercontent.com/u/242165?v=3","gravatar_id":"","url":"https://api.github.com/users/ploeh","html_url":"https://github.com/ploeh","followers_url":"https://api.github.com/users/ploeh/followers","following_url":"https://api.github.com/users/ploeh/following{/other_user}","gists_url":"https://api.github.com/users/ploeh/gists{/gist_id}","starred_url":"https://api.github.com/users/ploeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ploeh/subscriptions","organizations_url":"https://api.github.com/users/ploeh/orgs","repos_url":"https://api.github.com/users/ploeh/repos","events_url":"https://api.github.com/users/ploeh/events{/privacy}","received_events_url":"https://api.github.com/users/ploeh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-22T11:44:41Z","updated_at":"2015-11-22T11:44:41Z","closed_at":null,"body":"While doing an interactive rebase, `--exec` can be quite handy. Unfortunately, in the *git-for-windows* fork, this feature seems to no longer work.\r\n\r\n# Steps to reproduce\r\n\r\nIn summary:\r\n\r\n1. Create a new repro\r\n2. Add some commits\r\n3. Add a script file\r\n4. Interactively rebase, using `--exec` to run the script file between each commit.\r\n\r\nHere are the detailed steps I used to reproduce the issue from Git Bash:\r\n\r\n```\r\nmark@Canopus MINGW64 ~/Desktop\r\n$ mkdir exec-repro\r\n\r\nmark@Canopus MINGW64 ~/Desktop\r\n$ cd exec-repro/\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro\r\n$ git init\r\nInitialized empty Git repository in C:/Users/mark/Desktop/exec-repro/.git/\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ vim .gitignore\r\n```\r\n\r\nIn `.gitignore`, I simply added one line:\r\n\r\n```\r\n*.sh\r\n```\r\n\r\nThe I continued:\r\n\r\n```\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git add .gitignore\r\nwarning: LF will be replaced by CRLF in .gitignore.\r\nThe file will have its original line endings in your working directory.\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git commit\r\n[master (root-commit) 96bf28b] Added .gitignore\r\nwarning: LF will be replaced by CRLF in .gitignore.\r\nThe file will have its original line endings in your working directory.\r\n 1 file changed, 1 insertion(+)\r\n create mode 100644 .gitignore\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ vim thefile.txt\r\n```\r\n\r\nIn `thefile.txt`, I added first `foo` on one line, then, in two separate commits `bar` and `baz`:\r\n\r\n```\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git add .\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git commit\r\n[master 8a59b46] Added the file.\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n 1 file changed, 1 insertion(+)\r\n create mode 100644 thefile.txt\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ vim thefile.txt\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git add .\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git commit\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n[master warning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\nc45a948] Added a line to the file.\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n 1 file changed, 1 insertion(+)\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ vim thefile.txt\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git add .\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git commit\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n[master warning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n6112987] Added a line to the file.\r\nwarning: LF will be replaced by CRLF in thefile.txt.\r\nThe file will have its original line endings in your working directory.\r\n 1 file changed, 1 insertion(+)\r\n```\r\n\r\nHere's the log so far:\r\n\r\n```\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ git log\r\ncommit 6112987c936ca3bff5b707d3e4655c8f1b60123d\r\nAuthor: Mark Seemann <mark@ploeh.dk>\r\nDate:   Sun Nov 22 12:11:16 2015 +0100\r\n\r\n    Added a line to the file.\r\n\r\ncommit c45a948d2ebc268f24414bb5277d50bd85134b4d\r\nAuthor: Mark Seemann <mark@ploeh.dk>\r\nDate:   Sun Nov 22 12:10:34 2015 +0100\r\n\r\n    Added a line to the file.\r\n\r\ncommit 8a59b460760551886c573c4059d83a560fd62155\r\nAuthor: Mark Seemann <mark@ploeh.dk>\r\nDate:   Sun Nov 22 12:10:10 2015 +0100\r\n\r\n    Added the file.\r\n\r\ncommit 96bf28bc45c5a7e5d4b9f1fda02a62b127b4f499\r\nAuthor: Mark Seemann <mark@ploeh.dk>\r\nDate:   Sun Nov 22 12:09:25 2015 +0100\r\n\r\n    Added .gitignore\r\n```\r\n\r\nThen I added a script file:\r\n\r\n```\r\nmark@Canopus MINGW64 ~/Desktop/exec-repro (master)\r\n$ vim thescript.sh\r\n```\r\n\r\nThe content of `thescript.sh` is simple:\r\n\r\n```\r\n#!/bin/bash\r\nprintf \"Running the script.\"\r\n```\r\n\r\nFinally, I started an interactive rebase:\r\n\r\n```\r\n$ git rebase -i 8a59b460760551886c573c4059d83a560fd62155 --exec \"./thescript.sh\"\r\n```\r\n\r\nAfter having added some changes to `thefile.txt`, I issued `git rebase --continue`.\r\n\r\n# Expected result\r\n\r\nI would expect the rebase to continue, executing `thescript.sh` between applying each commit.\r\n\r\n# Actual result\r\n\r\n```\r\n$ git rebase --continue\r\nExecuting: thescript.sh\r\n/mingw64/libexec/git-core/git-rebase--interactive: line 613: C:/Program: No such file or directory\r\nExecution failed: thescript.sh\r\nYou can fix the problem, and then run\r\n\r\n        git rebase --continue\r\n```\r\n\r\nIt's possible to execute `thescript.sh` manually from the command line:\r\n\r\n```\r\n$ ./thescript.sh\r\nRunning the script.\r\n```\r\n\r\nAfter each `git rebase --continue`, though, the above error happens.\r\n\r\n# Environment information\r\n\r\nThis is my environment:\r\n\r\n```\r\n$ git --version\r\ngit version 2.6.3.windows.1\r\n```\r\n\r\nI'm on *Windows 10 Pro x64*."}}