git-publish --setup terminates with an exception unles run from git repository
nyoxi opened this issue · 1 comments
nyoxi commented
When git-publish --setup
is executed from an arbitrary directory that is not a Git repository it reports an exception and quits:
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Traceback (most recent call last):
File "/home/nyoxi/root/bin/git-publish", line 674, in <module>
sys.exit(main())
File "/home/nyoxi/root/bin/git-publish", line 494, in main
if not check_profile_exists(options.profile_name):
File "/home/nyoxi/root/bin/git-publish", line 230, in check_profile_exists
lines = git_config_with_profile('--get-regexp', '^gitpublishprofile\\.%s\\.' % profile_name)
File "/home/nyoxi/root/bin/git-publish", line 224, in git_config_with_profile
''' % dict(gitpublish=os.path.join(git_get_toplevel_dir(), '.gitpublish'),
File "/home/nyoxi/root/bin/git-publish", line 108, in git_get_toplevel_dir
return _git('rev-parse', '--show-toplevel')[0]
IndexError: list index out of range
stefanha commented
Thanks for reporting this bug!