From 9ddb3052d873ce75e3948507799640ce2c7153ff Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 22 2014 10:52:11 +0000 Subject: Main repo should also get the content of the README file if there is one --- diff --git a/progit/app.py b/progit/app.py index e401ee8..7a48fdc 100644 --- a/progit/app.py +++ b/progit/app.py @@ -210,11 +210,19 @@ def view_repo(repo): break tree = sorted(last_commits[0].tree, key=lambda x: x.filemode) + readme = None + for i in tree: + name, ext = os.path.splitext(i.name) + if name == 'README': + content = repo_obj[i.oid].data + readme = progit.doc_utils.convert_readme(content, ext) + return flask.render_template( 'repo_info.html', select='overview', repo=repo, repo_obj=repo_obj, + readme=readme, branches=sorted(repo_obj.listall_branches()), branchname='master', last_commits=last_commits,