FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lua.nvim/lua/utils/git.lua at master · ywwa/lua.nvim · GitHub
ywwa
/
lua.nvim
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
16
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lua.nvim
/
lua
/
utils
/
git.lua
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (23 loc) · 594 Bytes
Breadcrumbs
lua.nvim
/
lua
/
utils
/
git.lua
Copy path
File metadata and controls
27 lines (23 loc) · 594 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
local
M
=
{}
function
M
.
error
(
cmd
,
msg
,
lev
)
lev
=
lev
or
vim
.
log
.
levels
.
WARN
vim
.
notify
(
'
[Git] Failed to exec command: "
'
..
table.concat
(
cmd
,
"
"
)
..
"
\n
"
..
msg
..
'
"
'
,
lev
)
end
function
M
.
dir_exec
(
path
,
cmd
,
error_lev
)
local
shell_args
=
{
"
git
"
,
"
-C
"
,
path
,
unpack
(
cmd
) }
local
shell_outp
=
vim
.
fn
.
system
(
shell_args
)
if
vim
.
v
.
shell_error
~=
0
then
if
error_lev
then
M
.
error
(
shell_args
,
shell_outp
,
error_lev
)
end
return
{
success
=
false
,
output
=
shell_outp
,
}
end
return
{
success
=
true
,
output
=
shell_outp
,
}
end
return
M
Back
|
FazBrowse Home
|
New Git URL