Implementation for interacting with git repositories.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=*), | public, | parameter | :: | compressed_package_name | = | 'compressed_package' | Name of the compressed package that is generated temporarily. | 
| type(enum_descriptor), | public, | parameter | :: | git_descriptor | = | enum_descriptor() | Actual enumerator for descriptors | 
| character(len=*), | public, | parameter | :: | out_fmt | = | '("#", *(1x, g0))' | Common output format for writing to the command line | 
Possible git target
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | branch | = | 201 | Branch in git repository | |
| integer, | public | :: | default | = | 200 | Default target | |
| integer, | public | :: | error | = | -999 | Invalid descriptor | |
| integer, | public | :: | revision | = | 203 | Commit hash | |
| integer, | public | :: | tag | = | 202 | Tag in git repository | 
Description of an git target
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | descriptor | = | git_descriptor%default | Kind of the git target | |
| character(len=:), | public, | allocatable | :: | object | Additional descriptor of the git object | ||
| character(len=:), | public, | allocatable | :: | url | Target URL of the git repository | 
| procedure, public :: checkout | Fetch and checkout in local directory | 
| generic, public :: dump => dump_to_toml, dump_to_file, dump_to_unit | |
| procedure, public :: dump_to_toml | |
| procedure, public :: info | Show information on instance | 
| generic, public :: load => load_from_toml, load_from_file, load_from_unit | |
| procedure, public :: load_from_toml | |
| generic, public :: operator(==) => serializable_is_same | |
| procedure, public :: serializable_is_same => git_is_same | Serialization interface | 
| procedure, public, non_overridable :: test_serialization | Test load/write roundtrip | 
Code git descriptor to a string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | descriptor | 
Check that two git targets are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(git_target_t), | intent(in) | :: | this | |||
| class(serializable_t), | intent(in) | :: | that | 
Check that a cached dependency matches a manifest request
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(git_target_t), | intent(in) | :: | cached | Two input git targets | ||
| type(git_target_t), | intent(in) | :: | manifest | Two input git targets | ||
| integer, | intent(in) | :: | verbosity | |||
| integer, | intent(in) | :: | iunit | 
Target a branch in the git repository
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | url | Target URL of the git repository | ||
| character(len=*), | intent(in) | :: | branch | Name of the branch of interest | 
New git target
Default target
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | url | Target URL of the git repository | 
New git target
Target a specific git revision
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | url | Target URL of the git repository | ||
| character(len=*), | intent(in) | :: | sha1 | Commit hash of interest | 
New git target
Target a git tag
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | url | Target URL of the git repository | ||
| character(len=*), | intent(in) | :: | tag | Tag name of interest | 
New git target
Parse git descriptor identifier from a string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name | 
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(git_target_t), | intent(in) | :: | self | Instance of the git target | ||
| character(len=*), | intent(in) | :: | local_path | Local path to checkout in | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error | 
Dump dependency to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(git_target_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| type(toml_table), | intent(inout) | :: | table | Data structure | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
Archive a folder using git archive.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | source | Directory to archive. | ||
| character(len=*), | intent(in) | :: | destination | Destination of the archive. | ||
| character(len=*), | intent(in) | :: | ref | (Symbolic) Reference to be archived. | ||
| character(len=*), | intent(in), | optional | :: | additional_files(:) | (Optional) list of additional untracked files to be added to the archive. | |
| logical, | intent(in) | :: | verbose | Print additional information if true. | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling. | 
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | local_path | Local path to checkout in | ||
| character(len=:), | intent(out), | allocatable | :: | object | Git object reference | |
| type(error_t), | intent(out), | allocatable | :: | error | Error | 
Show information on git target
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(git_target_t), | intent(in) | :: | self | Instance of the git target | ||
| integer, | intent(in) | :: | unit | Unit for IO | ||
| integer, | intent(in), | optional | :: | verbosity | Verbosity of the printout | 
Read dependency from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(git_target_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| type(toml_table), | intent(inout) | :: | table | Data structure | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling |