```diff
--- test_files/308-original.txt	2025-03-07 19:06:45
+++ test_files/308-modified.txt	2025-03-07 19:06:45
@@ -1,16 +1,13 @@
-import logging
 import os
-from typing import Optional
 
-from rich.logging import RichHandler
 
-
 SCRIPT_CURSOR_DEFAULT = "/root/commands/defaults.sh"
 SCRIPT_EDIT_LINTING = "/root/commands/edit_linting.sh"
 SCRIPT_SEARCH = "/root/commands/search.sh"
 
 
 def git_reset_cmd(commit_id) -> str:
+    """Commands to reset git repository state."""
     reset_commands = [
         "git remote get-url origin",
         "git fetch --all",
@@ -21,35 +18,28 @@
 
 
 def git_clone_cmd(request_data):
-    git_token = os.environ.get("GITHUB_ACCESS_TOKEN")
-    if not git_token or not git_token.strip():
-        raise ValueError("github_token can not be null")
-    repo_dir = request_data.repo_name.split("/")[-1].strip()
-    command_list = [
-        f"git clone https://{git_token}@github.com/{request_data.repo_name}.git",
-        f"cd {repo_dir}",
-    ]
+    """Commands to clone github repository."""
+    *_, reponame = request_data.repo_name.lstrip().rstrip().split("/")
+    github_access_token = os.environ.get("GITHUB_ACCESS_TOKEN")
+    if not github_access_token or not github_access_token.strip():
+        if os.environ.get("ALLOW_CLONE_WITHOUT_REPO") != "true":
+            raise RuntimeError(
+                "Cannot clone github repository without github access token"
+            )
+        commands = [
+            f"git clone --progress https://github.com/{request_data.repo_name}.git",
+            f"cd {reponame}",
+        ]
+    else:
+        commands = [
+            f"git clone --progress https://{github_access_token}@github.com/{request_data.repo_name}.git",
+            f"cd {reponame}",
+        ]
     if request_data.commit_id:
-        command_list.append(f"git reset --hard {request_data.commit_id}")
-    return " && ".join(command_list)
+        commands.append(f"git reset --hard {request_data.commit_id}")
+    return " && ".join(commands)
 
 
-def git_tree_cmd():
+def git_tree_cmd() -> str:
+    """Command for creating git tree."""
     return "git ls-tree -r HEAD --name-only > ./git_repo_tree.txt"
-
-
-def process_output(output: str, return_code: Optional[int]):
-    if return_code is None:
-        return_code = 1
-        output = "Exception: " + output
-    return output, return_code
-
-
-def get_logger(logger_name):
-    handler = RichHandler(show_time=False, show_path=False)
-    handler.setLevel(logging.DEBUG)
-    logger = logging.getLogger(logger_name)
-    logger.setLevel(logging.DEBUG)
-    logger.addHandler(handler)
-    logger.propagate = False
-    return logger
```
