| File data/plugins/git/README.md added (mode: 100644) (index 000000000..d126291f7) |
|
1 |
|
## Git |
|
2 |
|
|
|
3 |
|
This plugin provides utilities related to Git. |
|
4 |
|
|
|
5 |
|
### `:Gclone` command |
|
6 |
|
|
|
7 |
|
Clones repository, optionally deriving target directory name from the URL. On |
|
8 |
|
success, enters the newly cloned worktree. On failure, shows the error in a |
|
9 |
|
dialog. |
|
10 |
|
|
|
11 |
|
**Examples:** |
|
12 |
|
|
|
13 |
|
* Clone into directory called `vifm`: |
|
14 |
|
``` |
|
15 |
|
:Gclone https://github.com/vifm/vifm.git |
|
16 |
|
``` |
|
17 |
|
|
|
18 |
|
* Clone into directory called `vifm-dev`: |
|
19 |
|
``` |
|
20 |
|
:Gclone https://github.com/vifm/vifm.git vifm-dev |
|
21 |
|
``` |
|
22 |
|
|
|
23 |
|
**Parameters:** |
|
24 |
|
|
|
25 |
|
1. URL to clone from (required). |
|
26 |
|
2. Destination (optional). Derived from the last component of the URL removing |
|
27 |
|
`.git` suffix. |
| File data/plugins/git/init.lua changed (mode: 100644) (index fe5bfa862..116d8bb33) |
| 1 |
|
--[[ |
|
| 2 |
|
|
|
| 3 |
|
Provides :Gclone command that clones repository by its URL determining directory |
|
| 4 |
|
name from URL and enters cloned directory on success. |
|
| 5 |
|
|
|
| 6 |
|
Usage example: |
|
| 7 |
|
|
|
| 8 |
|
Clone into directory called "vifm". |
|
| 9 |
|
:Gclone https://github.com/vifm/vifm.git |
|
| 10 |
|
|
|
| 11 |
|
Clone into directory called "vifm-dev". |
|
| 12 |
|
:Gclone https://github.com/vifm/vifm.git vifm-dev |
|
| 13 |
|
|
|
| 14 |
|
--]] |
|
| 15 |
|
|
|
| 16 |
1 |
local M = {} |
local M = {} |
| 17 |
2 |
|
|
| 18 |
3 |
local function clone(info) |
local function clone(info) |