lib/gollum/committer.rb
# Update the given file in the repository's working directory if there
# is a working directory present.
#
# dir    - The String directory in which the file lives.
# name   - The String name of the page (may be in human format).
# format - The Symbol format of the page.
#
# Returns nothing.
Update the given file in the repository's working directory if there
is a working directory present.

dir    - The String directory in which the file lives.
name   - The String name of the page (may be in human format).
format - The Symbol format of the page.

Returns nothing.
Update the given file in the repository ' s working directory if there is a working directory present . dir - The String directory in which the file lives . name - The String name of the page ( may be in human format ) . format - The Symbol format of the page . Returns nothing .
def update_working_dir(dir, name, format)
      unless @wiki.repo.bare
        if @wiki.page_file_dir
          dir = dir.size.zero? ? @wiki.page_file_dir : File.join(dir, @wiki.page_file_dir)
        end
        path =
          if dir == ''
            @wiki.page_file_name(name, format)
          else
            ::File.join(dir, @wiki.page_file_name(name, format))
          end
        Dir.chdir(::File.join(@wiki.repo.path, '..')) do
          if file_path_scheduled_for_deletion?(index.tree, path)
            @wiki.repo.git.rm({'f' => true}, '--', path)
          else
            @wiki.repo.git.checkout({}, 'HEAD', '--', path)
          end
        end
      end
    end
def update_working_dir ( dir , name , format ) unless @wiki . repo . bare if @wiki . page_file_dir dir = dir . size . zero? ? @wiki . page_file_dir : File . join ( dir , @wiki . page_file_dir ) end path = if dir == '' @wiki . page_file_name ( name , format ) else :: File . join ( dir , @wiki . page_file_name ( name , format ) ) end Dir . chdir ( :: File . join ( @wiki . repo . path , '..' ) ) do if file_path_scheduled_for_deletion? ( index . tree , path ) @wiki . repo . git . rm ( { 'f' => true } , '--' , path ) else @wiki . repo . git . checkout ( { } , 'HEAD' , '--' , path ) end end end end
Update the given file in the repository's working directory if there
is a working directory present.
Update the given file in the repository ' s working directory if there is a working directory present .
dir
name
format