Skip to content

Commit

Permalink
Adding fallback logic if git command fails'
Browse files Browse the repository at this point in the history
  • Loading branch information
gowthamkishore3799 committed Jan 14, 2025
1 parent 234e1ac commit 61da031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gitingest/query_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ async def _configure_branch_and_subpath(remaining_parts: list[str],url: str) ->
Returns
-------
str(branch name) or None
str (branch name) or None
"""
try:
# Fetch the list of branches from the remote repository
branches: list[str] = await fetch_remote_branch_list(url)
except Exception as e:
print(f"Warning: Failed to fetch branch list: {str(e)}")
return remaining_parts.pop(0)
return remaining_parts.pop(0) if remaining_parts else None

branch = []

Expand Down

0 comments on commit 61da031

Please sign in to comment.