Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vimagit
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
jreybert
vimagit
Commits
b7cc91f3
Commit
b7cc91f3
authored
Oct 22, 2015
by
Jerome Reybert
Browse files
Options
Downloads
Patches
Plain Diff
autoload/magit/state.vim: rename function variable
parent
bd487698
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
autoload/magit/state.vim
+17
-17
17 additions, 17 deletions
autoload/magit/state.vim
with
17 additions
and
17 deletions
autoload/magit/state.vim
+
17
−
17
View file @
b7cc91f3
...
@@ -119,44 +119,44 @@ function! magit#state#add_file(mode, status, filename, depth) dict
...
@@ -119,44 +119,44 @@ function! magit#state#add_file(mode, status, filename, depth) dict
if
(
empty
(
diff_list
)
)
if
(
empty
(
diff_list
)
)
echoerr
"diff command \""
.
diff_cmd
.
"\" returned nothing"
echoerr
"diff command \""
.
diff_cmd
.
"\" returned nothing"
endif
endif
let
diff_dict_
file
=
self
.
get_file
(
a:mode
,
a:filename
,
1
)
let
file
=
self
.
get_file
(
a:mode
,
a:filename
,
1
)
let
diff_dict_
file
.
exists
=
1
let
file
.
exists
=
1
let
diff_dict_
file
.
status
=
a:status
let
file
.
status
=
a:status
let
diff_dict_
file
.
depth
=
a:depth
let
file
.
depth
=
a:depth
if
(
a:status
==
'?'
&&
getftype
(
a:filename
)
==
'link'
)
if
(
a:status
==
'?'
&&
getftype
(
a:filename
)
==
'link'
)
let
diff_dict_
file
.
symlink
=
resolve
(
a:filename
)
let
file
.
symlink
=
resolve
(
a:filename
)
call
add
(
diff_dict_
file
.
diff
.
header
,
'no header'
)
call
add
(
file
.
diff
.
header
,
'no header'
)
let
diff_dict_
file
.
diff
.
hunks
[
0
].
header
=
'New symbolic link file'
let
file
.
diff
.
hunks
[
0
].
header
=
'New symbolic link file'
elseif
(
a:status
==
'?'
&&
isdirectory
(
a:filename
)
==
1
)
elseif
(
a:status
==
'?'
&&
isdirectory
(
a:filename
)
==
1
)
let
diff_dict_
file
.
dir
=
1
let
file
.
dir
=
1
for
subfile
in
split
(
globpath
(
a:filename
,
'\(.[^.]*\|*\)'
),
'\n'
)
for
subfile
in
split
(
globpath
(
a:filename
,
'\(.[^.]*\|*\)'
),
'\n'
)
call
self
.
add_file
(
a:mode
,
a:status
,
subfile
,
a:depth
+
1
)
call
self
.
add_file
(
a:mode
,
a:status
,
subfile
,
a:depth
+
1
)
endfor
endfor
elseif
(
a:status
==
'?'
&&
getfsize
(
a:filename
)
==
0
)
elseif
(
a:status
==
'?'
&&
getfsize
(
a:filename
)
==
0
)
let
diff_dict_
file
.
empty
=
1
let
file
.
empty
=
1
call
add
(
diff_dict_
file
.
diff
.
header
,
'no header'
)
call
add
(
file
.
diff
.
header
,
'no header'
)
let
diff_dict_
file
.
diff
.
hunks
[
0
].
header
=
'New empty file'
let
file
.
diff
.
hunks
[
0
].
header
=
'New empty file'
elseif
(
match
(
system
(
"file --mime "
.
elseif
(
match
(
system
(
"file --mime "
.
\
magit#utils#add_quotes
(
a:filename
)),
\
magit#utils#add_quotes
(
a:filename
)),
\
a:filename
.
".*charset=binary"
)
!=
-1
)
\
a:filename
.
".*charset=binary"
)
!=
-1
)
let
diff_dict_
file
.
binary
=
1
let
file
.
binary
=
1
call
add
(
diff_dict_
file
.
diff
.
header
,
'no header'
)
call
add
(
file
.
diff
.
header
,
'no header'
)
let
diff_dict_
file
.
diff
.
hunks
[
0
].
header
=
'Binary file'
let
file
.
diff
.
hunks
[
0
].
header
=
'Binary file'
else
else
let
line
=
0
let
line
=
0
" match(
" match(
while
(
line
<
len
(
diff_list
)
&& diff_list
[
line
]
!~
"^@.*"
)
while
(
line
<
len
(
diff_list
)
&& diff_list
[
line
]
!~
"^@.*"
)
call
add
(
diff_dict_
file
.
diff
.
header
,
diff_list
[
line
])
call
add
(
file
.
diff
.
header
,
diff_list
[
line
])
let
line
+=
1
let
line
+=
1
endwhile
endwhile
let
hunk
=
diff_dict_
file
.
diff
.
hunks
[
0
]
let
hunk
=
file
.
diff
.
hunks
[
0
]
let
hunk
.
header
=
diff_list
[
line
]
let
hunk
.
header
=
diff_list
[
line
]
for
diff_line
in
diff_list
[
line
+
1
:
-1
]
for
diff_line
in
diff_list
[
line
+
1
:
-1
]
if
(
diff_line
=~
"^@.*"
)
if
(
diff_line
=~
"^@.*"
)
let
hunk
=
deepcopy
(
s:hunk_template
)
let
hunk
=
deepcopy
(
s:hunk_template
)
call
add
(
diff_dict_
file
.
diff
.
hunks
,
hunk
)
call
add
(
file
.
diff
.
hunks
,
hunk
)
let
hunk
.
header
=
diff_line
let
hunk
.
header
=
diff_line
continue
continue
endif
endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment