Our index implementation allows to stream date into the index, which is useful for bare repositories that do not have a working tree. It is used to prepare new commits, and can be used to keep results of merge operations. The index is also called stage in git-speak. exists () # push and pull behave very similarly set_reference ( bare_master ) assert not bare_repo. We specify the name statically, but you have all # information to do it programatically as well. commit )) # create a local branch at the latest fetched master. fetch ( progress = MyProgressPrinter ()): print ( "Updated %s to %s " % ( fetch_info. create_remote ( 'origin', url = cloned_repo. ![]() ![]() remotes ), 0 ) # this one was just initialized origin = bare_repo. remotes ), 1 ) # we have been cloned, so should be one remote self. From git import RemoteProgress class MyProgressPrinter ( RemoteProgress ): def update ( self, op_code, cur_count, max_count = None, message = '' ): print ( op_code, cur_count, max_count, cur_count / ( max_count or 100.0 ), message or "NO MESSAGE" ) # end self.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |