Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cloning configuration using a commit hash #515

Merged

Conversation

jo-basevi
Copy link
Collaborator

Added --start-point/-s argument to payu clone to specify what commit/tag/branch name to start new branches from.

So there is still -B/--branch flag which initially checks out a branch during the git clone command. This was initially done (I think?) to avoid checking out a default branch first. For example, the access-om2-configs repository, the main branch is not a payu configuration.

The start point is used similarly to the payu checkout's positional argument, so

payu clone -b ${NEW_BRANCH_NAME} -s ${COMMIT_OR_TAG} ${REPOSITORY} ${DIR}

is equivalent to running

payu clone ${REPOSITORY} ${DIR}
payu checkout -b ${NEW_BRANCH_NAME} ${COMMIT_OR_TAG}

Closes #503

@jo-basevi jo-basevi marked this pull request as ready for review September 18, 2024 06:44
@coveralls
Copy link

coveralls commented Sep 18, 2024

Coverage Status

coverage: 57.824% (+1.9%) from 55.951%
when pulling 8c9dcaa on ACCESS-NRI:503-support-cloning-from-commit-hash
into 68d8482 on payu-org:master.

@jo-basevi jo-basevi self-assigned this Sep 18, 2024
Copy link
Collaborator

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

I have a question and suggestion.

payu/subcommands/args.py Show resolved Hide resolved
docs/source/usage.rst Outdated Show resolved Hide resolved
Copy link
Collaborator

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

LGTM

@jo-basevi
Copy link
Collaborator Author

Thanks for the review!

@jo-basevi jo-basevi merged commit 6ee85bb into payu-org:master Sep 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for cloning configurations from a git commit hash
3 participants