Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add reruning script, moved dir creation to separated func, sumodule support#66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Zkh-dot wants to merge3 commits intoShpota:main
base:main
Choose a base branch
Loading
fromZkh-dot:main

Conversation

Zkh-dot
Copy link

@Zkh-dotZkh-dot commentedDec 26, 2024
edited
Loading

I think it is better to have an option to re-run script multiple times without creating new repo each time. added function chdir_to_repo to automatically clone existing repo and prevent trying to overwrite it's history

also it is possible, that someone could run script after cloning this repo from it's folder, so added functionality to clone repo as submodule, so it will not cause any issues

fixing#67

Copy link

@chaitu20000chaitu20000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Added create_directory function

def create_directory(directory: str) -> None:
os.mkdir(directory)
os.chdir(directory)

Modified chdir_to_repo to include submodule support

def chdir_to_repo(repository, directory) -> None:
git_command = ['git', repository, directory]
if ".git" in os.listdir():
git_command.insert(1, 'submodule')
git_command.insert(2, 'add')
else:
git_command.insert(1, 'clone')

@Zkh-dot
Copy link
Author

Added create_directory function

def create_directory(directory: str) -> None: os.mkdir(directory) os.chdir(directory)

Modified chdir_to_repo to include submodule support

def chdir_to_repo(repository, directory) -> None: git_command = ['git', repository, directory] if ".git" in os.listdir(): git_command.insert(1, 'submodule') git_command.insert(2, 'add') else: git_command.insert(1, 'clone')

yeah, thats good, will add shortly

@Zkh-dot
Copy link
Author

Added create_directory function

def create_directory(directory: str) -> None: os.mkdir(directory) os.chdir(directory)

Modified chdir_to_repo to include submodule support

def chdir_to_repo(repository, directory) -> None: git_command = ['git', repository, directory] if ".git" in os.listdir(): git_command.insert(1, 'submodule') git_command.insert(2, 'add') else: git_command.insert(1, 'clone')

Done

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@chaitu20000chaitu20000chaitu20000 requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Zkh-dot@chaitu20000

[8]ページ先頭

©2009-2025 Movatter.jp