View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Alessandro Ghedini > Git-Raw > Git::Raw::Index



Annotate this POD


View/Report Bugs
Module Version: 0.33   Source   Latest Release: Git-Raw-0.79


Git::Raw::Index - Git index class


version 0.33


A Git::Raw::Index represents an index in a Git repository.

WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).


add( $entry )

Add $entry to the index. $entry should either be the path of a file or alternatively a Git::Raw::Index::Entry.

remove( $path )

Remove $path from the index.

clear( )

Clear the index.

read( )

Update the index reading it from disk.

write( )

Write the index to disk.

read_tree( $tree )

Replace the index contente with $tree.

write_tree( [$repo] )

Create a new tree from the index and write it to disk. $repo optionally indicates which Git::Raw::Repository the tree should be written to.

checkout( [\%checkout_opts] )

Update files in the working tree to match the contents of the index. See Git::Raw::Repository->checkout() for valid %checkout_opts values.

entries( )

Retrieve index entries. Returns a list of Git::Raw::Index::Entry objects.

add_conflict( $ancestor, $ours, $theirs )

Add or update index entries to represent a conflict. $ancestor, $ours and $theirs should be Git::Raw::Index::Entry objects, or be undef.

remove_conflict( $file )

Remove $file from the index.

has_conflicts( )

Determine if the index contains entries representing file conflicts.

conflict_cleanup( )

Remove all conflicts in the index (entries with a stage greater than 0).

conflicts( )

Retrieve index entries that represent a conflict. Returns a list of Git::Raw::Index::Entry objects.


Alessandro Ghedini <>


Copyright 2012 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.

syntax highlighting: