# -*- coding: utf-8 -*-

"""
legit.core
~~~~~~~~~~

Not much.
"""

from clint import resources
resources.init('kennethreitz', 'legit')
resources.user.write('config.ini', "we'll get there.")


__version__ = '0.0.1'


def path_to_repo():
    """Returns the path the current repo, if there is one."""

    return None


def get_available_branches():
    """Returns a list of available branches in the repo."""

    return ('master', 'develop')


def get_current_branch():
    """Returns the active available branches in the repo."""

    return 'develop'


def sync_repo():
    """Git fetch. Auto branch of remotes? pull --rebase, push."""
    pass
@@ -58,16 +58,26 @@
 uch.%0A%22%22%22
+%0Aimport os
 %0A%0Afrom c
@@ -102,126 +102,388 @@
 ces%0A
-resources.init('kennethreitz', 'legit')%0Aresources.user.write('config.ini', %22we'll get there.%22)%0A%0A%0A__version__ = '0.0.1'
+%0A%0A__version__ = '0.0.1'%0A%0Adef find_above(*names):%0A    %22%22%22Attempt to locate given file by searching parent dirs.%22%22%22%0A%0A    path = '.'%0A%0A    while os.path.split(os.path.abspath(path))%5B1%5D:%0A        for name in names:%0A            joined = os.path.join(path, name)%0A            if os.path.exists(joined):%0A                return os.path.abspath(joined)%0A        path = os.path.join('..', path)
 %0A%0A%0Ad
@@ -579,12 +579,26 @@
 urn 
-None
+find_above('.git')
 %0A%0A%0Ad
@@ -924,8 +924,144 @@
     pass
+%0A%0A%0Aprint path_to_repo()%0A# Init Resources%0A%0Aresources.init('kennethreitz', 'legit')%0Aresources.user.write('config.ini', %22we'll get there.%22)

reverse find git repo