Skip to main content

lux_lib/git/
mod.rs

1use crate::{
2    git::url::RemoteGitUrl,
3    lua_rockspec::{DisplayAsLuaValue, DisplayLuaValue},
4};
5
6pub mod shorthand;
7pub mod url;
8pub mod utils;
9
10impl DisplayAsLuaValue for RemoteGitUrl {
11    fn display_lua_value(&self) -> DisplayLuaValue {
12        DisplayLuaValue::String(self.to_string())
13    }
14}
15
16/// Specifies a source to be fetched from a git forge
17#[derive(Debug, PartialEq, Eq, Hash, Clone, lux_macros::DisplayAsLuaKV)]
18#[display_lua(key = "source")]
19pub struct GitSource {
20    pub url: RemoteGitUrl,
21    #[display_lua(rename = "tag")]
22    pub checkout_ref: Option<String>,
23}