Open s7jones opened 11 months ago
I tried this and it kinda works. The fetch actually fails but pwd is executed correctly
"ffwd": {
"cmd": "git fetch ; pwd",
"allow_all": true,
"help": "fast forward the git repos using custom script"
}
sorry it doesn't work, the repo path is printed out by default
Maybe there is no workaround; we will need to copy the async logic to gita shell
Hello,
I'm using gita since a while now and I find it very helpful in mutli repo projects.
to rejoin s7jones issue, I also tried the custom command fetchcrt
in the readme.md but it didn't work also. However some simple command like "git status" works fine.
Is there any workaround please, I'm interested in running shell commands.
Also it will be intersecting if external commands can take arguments e.g. gita custom_cmd agr1 agr2
Regards,
@Ismailou just curious, what kind of shell command do you want to run in each repo?
what
I tried the command of fetchcrt
example in the readme
"fetchcrt":
{
"cmd": "git rev-parse --abbrev-ref HEAD | xargs git fetch --prune upstream",
"allow_all": true,
"shell": true,
"help": "fetch current branch only"
}
I tried it on Windows 10 machine in bash, powershell and git Bash the same result.
Regards,
I find Gita very useful and I use it to run a script to update various git repos using:
gita shell "powershell "C:\dev\git-ffwd\git-ffwd.ps1""
But that gita shell mode runs the script against each repo synchronously, and I want it to run async.
I looked into the custom commands and tried to add the following:
But it didn't work.
It was failing on
args.cmd[1] in args.async_blacklist:
in main.py, it looks like that code assumes that the first command must be a git command.I tried to add a simple git command to the front of the custom command, e.g.:
But that still didn't work.
If you could offer a way to make shell commands run asynchronously, either by the custom command format or via the git shell format that would be a great improvement for my workflow.
PS. Thank you for the tool, it saves time during my dev workflows.