Before

…lines 1–274 unchanged (274 lines)
275
276 let dir = getcwd()
277 try
278 call magit#utils#chdir(magit#git#top_dir())
279 call magit#utils#refresh_submodule_list()
280 for [mode, diff_dict_mode] in items(self.dict)
281 let status_list = magit#git#get_status()
282 for file_status in status_list
283 let status=file_status[mode]
284
285 " untracked code apperas in staged column, we skip it
286 if ( status == ' ' || ( ( mode == 'staged' ) && status == '?' ) )
287 continue
…lines 288–386 unchanged (99 lines)

After

…lines 1–273 unchanged (273 lines)
274 endfor
275
276 let dir = getcwd()
277 try
278 call magit#utils#chdir(magit#git#top_dir())
279 call magit#utils#refresh_submodule_list()
280 let status_list = magit#git#get_status()
281 for [mode, diff_dict_mode] in items(self.dict)
282 for file_status in status_list
283 let status=file_status[mode]
284
285 " untracked code apperas in staged column, we skip it
286 if ( status == ' ' || ( ( mode == 'staged' ) && status == '?' ) )
…lines 287–386 unchanged (100 lines)

Before

script_file
comment "\" magit#state#is_file_visible: file getter function"
comment "\" return if file is visible"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "magit#state#is_file_visible"
parameters
( "("
) ")"
dict "dict"
body
return_statement
return "return"
field_expression
identifier "self"
. "."
identifier "visible"
endfunction "endfunction"
comment "\" magit#state#set_file_visible: file setter function"
comment "\" param[in] val: visible state to set to file"
function_definition (+23 nodes collapsed)
comment "\" magit#state#toggle_file_visible: file setter function, tog"...
comment "\" state"
function_definition (+33 nodes collapsed)
comment "\" magit#state#init_file_visible: init file visible status, a"...
function_definition (+78 nodes collapsed)
comment "\" magit#state#is_file_dir: file getter function"
comment "\" return 1 if current file is a directory, 0 otherwise"
function_definition (+21 nodes collapsed)
comment "\" magit#state#must_be_added: file helper function"
comment "\" there are some conditions where files must be widely added"...
comment "\" 'diff applied' (git apply)"
comment "\" return 1 if file must "
function_definition (+59 nodes collapsed)
comment "\" magit#state#file_get_hunks: function accessor for hunks ob"...
comment "\" return: List of List of hunks lines"
function_definition (+21 nodes collapsed)
comment "\" magit#state#file_get_flat_hunks: function accessor for hun"...
comment "\" return: all hunks lines of a file, including hunk headers"
function_definition (+64 nodes collapsed)
comment "\" s:hunk_template: template for hunk object (nested in s:dif"...
comment "\" WARNING: this variable must be deepcopy()'ied"
let_statement (+33 nodes collapsed)
comment "\" s:diff_template: template for diff object (nested in s:fil"...
comment "\" WARNING: this variable must be deepcopy()'ied"
let_statement (+31 nodes collapsed)
comment "\" s:file_template: template for file object"
comment "\" WARNING: this variable must be deepcopy()'ied"
let_statement (+161 nodes collapsed)
comment "\" magit#state#get_file: function accessor for file"
comment "\" param[in] mode: can be staged or unstaged"
comment "\" param[in] filename: filename to access"
comment "\" param[in] create: boolean. If 1, non existing file in Dict"...
comment "\" if 0, 'file_doesnt_exists' exception will be thrown"
comment "\" return: Dict of file"
function_definition (+161 nodes collapsed)
comment "\" magit#state#file_get_header: function accessor for diff he"...
comment "\" param[in] mode: can be staged or unstaged"
comment "\" param[in] filename: header of filename to access"
comment "\" return: List of diff header lines"
function_definition (+21 nodes collapsed)
function_definition (+75 nodes collapsed)
function_definition (+132 nodes collapsed)
comment "\" magit#state#add_file: method to add a file with all its"
comment "\" properties (filename, exists, status, header and hunks)"
comment "\" param[in] mode: can be staged or unstaged"
comment "\" param[in] status: one character status code of the file (A"...
comment "\" param[in] filename: filename"
function_definition (+769 nodes collapsed)
comment "\" magit#state#update: update self.dict"
comment "\" if a file does not exists anymore (because all its changes"...
comment "\" committed, deleted, discarded), it is removed from g:mg_di"...
comment "\" else, its diff is discarded and regenrated"
comment "\" what is resilient is its 'visible' parameter"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "magit#state#update"
parameters
( "("
) ")"
dict "dict"
body
let_statement
let "let"
field_expression
identifier "self"
. "."
identifier "nb_diff_lines"
= "="
integer_literal "0"
for_loop (+56 nodes collapsed)
let_statement
let "let"
identifier "dir"
= "="
call_expression
identifier "getcwd"
( "("
) ")"
try_statement
try "try"
body
call_statement
call "call"
call_expression
identifier "magit#utils#chdir"
( "("
call_expression
identifier "magit#git#top_dir"
( "("
) ")"
) ")"
call_statement
call "call"
call_expression
identifier "magit#utils#refresh_submodule_list"
( "("
) ")"
for_loop
for "for"
list_assignment
[ "["
identifier "mode"
, ","
identifier "diff_dict_mode"
] "]"
in "in"
call_expression
identifier "items"
( "("
field_expression
identifier "self"
. "."
identifier "dict"
) ")"
body
let_statement
let "let"
identifier "status_list"
= "="
call_expression
identifier "magit#git#get_status"
( "("
) ")"
for_loop (+64 nodes collapsed)
endfor "endfor"
finally_statement
finally "finally"
body
call_statement
call "call"
call_expression
identifier "magit#utils#chdir"
( "("
identifier "dir"
) ")"
endtry "endtry"
comment "\" remove files that have changed their mode or been committe"...
for_loop (+50 nodes collapsed)
endfunction "endfunction"
comment "\" magit#state#set_files_visible: global dict setter function"
comment "\" update all files visible state"
comment "\" param[in] is_visible: boolean value to set to files"
function_definition (+50 nodes collapsed)
comment "\" magit#state#get_files: global dict file objects getter fun"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return list of file objects belonging to mode"
function_definition (+25 nodes collapsed)
comment "\" magit#state#get_files_nb: returns the number of files in a"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return number of files of this section"
function_definition (+29 nodes collapsed)
comment "\" magit#state#get_files: global dict file objects (copy) get"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return ordered list of file objects belonging to mode"
function_definition (+107 nodes collapsed)
comment "\" magit#state#get_filenames: global dict filenames getter fu"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return ordered list of filename strings belonging to mode,"...
comment "\" first"
function_definition (+40 nodes collapsed)
comment "\" dict: structure containing all diffs"
comment "\" It is formatted as follow"
comment "\" {"
comment "\" 'staged': {"
comment "\" 'filename': s:file_template,"
comment "\" 'filename': s:file_template,"
comment "\" ..."
comment "\" },"
comment "\" 'unstaged': {"
comment "\" 'filename': s:file_template,"
comment "\" 'filename': s:file_template,"
comment "\" ..."
comment "\" },"
comment "\" }"
let_statement (+113 nodes collapsed)

After

script_file
comment "\" magit#state#is_file_visible: file getter function"
comment "\" return if file is visible"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "magit#state#is_file_visible"
parameters
( "("
) ")"
dict "dict"
body
return_statement
return "return"
field_expression
identifier "self"
. "."
identifier "visible"
endfunction "endfunction"
comment "\" magit#state#set_file_visible: file setter function"
comment "\" param[in] val: visible state to set to file"
function_definition (+23 nodes collapsed)
comment "\" magit#state#toggle_file_visible: file setter function, tog"...
comment "\" state"
function_definition (+33 nodes collapsed)
comment "\" magit#state#init_file_visible: init file visible status, a"...
function_definition (+78 nodes collapsed)
comment "\" magit#state#is_file_dir: file getter function"
comment "\" return 1 if current file is a directory, 0 otherwise"
function_definition (+21 nodes collapsed)
comment "\" magit#state#must_be_added: file helper function"
comment "\" there are some conditions where files must be widely added"...
comment "\" 'diff applied' (git apply)"
comment "\" return 1 if file must "
function_definition (+59 nodes collapsed)
comment "\" magit#state#file_get_hunks: function accessor for hunks ob"...
comment "\" return: List of List of hunks lines"
function_definition (+21 nodes collapsed)
comment "\" magit#state#file_get_flat_hunks: function accessor for hun"...
comment "\" return: all hunks lines of a file, including hunk headers"
function_definition (+64 nodes collapsed)
comment "\" s:hunk_template: template for hunk object (nested in s:dif"...
comment "\" WARNING: this variable must be deepcopy()'ied"
let_statement (+33 nodes collapsed)
comment "\" s:diff_template: template for diff object (nested in s:fil"...
comment "\" WARNING: this variable must be deepcopy()'ied"
let_statement (+31 nodes collapsed)
comment "\" s:file_template: template for file object"
comment "\" WARNING: this variable must be deepcopy()'ied"
let_statement (+161 nodes collapsed)
comment "\" magit#state#get_file: function accessor for file"
comment "\" param[in] mode: can be staged or unstaged"
comment "\" param[in] filename: filename to access"
comment "\" param[in] create: boolean. If 1, non existing file in Dict"...
comment "\" if 0, 'file_doesnt_exists' exception will be thrown"
comment "\" return: Dict of file"
function_definition (+161 nodes collapsed)
comment "\" magit#state#file_get_header: function accessor for diff he"...
comment "\" param[in] mode: can be staged or unstaged"
comment "\" param[in] filename: header of filename to access"
comment "\" return: List of diff header lines"
function_definition (+21 nodes collapsed)
function_definition (+75 nodes collapsed)
function_definition (+132 nodes collapsed)
comment "\" magit#state#add_file: method to add a file with all its"
comment "\" properties (filename, exists, status, header and hunks)"
comment "\" param[in] mode: can be staged or unstaged"
comment "\" param[in] status: one character status code of the file (A"...
comment "\" param[in] filename: filename"
function_definition (+769 nodes collapsed)
comment "\" magit#state#update: update self.dict"
comment "\" if a file does not exists anymore (because all its changes"...
comment "\" committed, deleted, discarded), it is removed from g:mg_di"...
comment "\" else, its diff is discarded and regenrated"
comment "\" what is resilient is its 'visible' parameter"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "magit#state#update"
parameters
( "("
) ")"
dict "dict"
body
let_statement
let "let"
field_expression
identifier "self"
. "."
identifier "nb_diff_lines"
= "="
integer_literal "0"
for_loop (+56 nodes collapsed)
let_statement
let "let"
identifier "dir"
= "="
call_expression
identifier "getcwd"
( "("
) ")"
try_statement
try "try"
body
call_statement
call "call"
call_expression
identifier "magit#utils#chdir"
( "("
call_expression
identifier "magit#git#top_dir"
( "("
) ")"
) ")"
call_statement
call "call"
call_expression
identifier "magit#utils#refresh_submodule_list"
( "("
) ")"
let_statement
let "let"
identifier "status_list"
= "="
call_expression
identifier "magit#git#get_status"
( "("
) ")"
for_loop
for "for"
list_assignment
[ "["
identifier "mode"
, ","
identifier "diff_dict_mode"
] "]"
in "in"
call_expression
identifier "items"
( "("
field_expression
identifier "self"
. "."
identifier "dict"
) ")"
body
for_loop (+64 nodes collapsed)
endfor "endfor"
finally_statement
finally "finally"
body
call_statement
call "call"
call_expression
identifier "magit#utils#chdir"
( "("
identifier "dir"
) ")"
endtry "endtry"
comment "\" remove files that have changed their mode or been committe"...
for_loop (+50 nodes collapsed)
endfunction "endfunction"
comment "\" magit#state#set_files_visible: global dict setter function"
comment "\" update all files visible state"
comment "\" param[in] is_visible: boolean value to set to files"
function_definition (+50 nodes collapsed)
comment "\" magit#state#get_files: global dict file objects getter fun"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return list of file objects belonging to mode"
function_definition (+25 nodes collapsed)
comment "\" magit#state#get_files_nb: returns the number of files in a"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return number of files of this section"
function_definition (+29 nodes collapsed)
comment "\" magit#state#get_files: global dict file objects (copy) get"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return ordered list of file objects belonging to mode"
function_definition (+107 nodes collapsed)
comment "\" magit#state#get_filenames: global dict filenames getter fu"...
comment "\" param[in] mode: mode to select, can be 'staged' or 'unstag"...
comment "\" return ordered list of filename strings belonging to mode,"...
comment "\" first"
function_definition (+40 nodes collapsed)
comment "\" dict: structure containing all diffs"
comment "\" It is formatted as follow"
comment "\" {"
comment "\" 'staged': {"
comment "\" 'filename': s:file_template,"
comment "\" 'filename': s:file_template,"
comment "\" ..."
comment "\" },"
comment "\" 'unstaged': {"
comment "\" 'filename': s:file_template,"
comment "\" 'filename': s:file_template,"
comment "\" ..."
comment "\" },"
comment "\" }"
let_statement (+113 nodes collapsed)