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#[derive(Debug, PartialEq, Clone, lux_macros::DisplayAsLuaKV)]
17#[display_lua(key = "source")]
18pub struct GitSource {
19    pub url: RemoteGitUrl,
20    #[display_lua(rename = "tag")]
21    pub checkout_ref: Option<String>,
22}