Skip to content

devel: enable verbose for git clone#6225

Merged
waruqi merged 1 commit intoxmake-io:devfrom
Sunrisepeak:sunrisepeak-patch-1
Mar 18, 2025
Merged

devel: enable verbose for git clone#6225
waruqi merged 1 commit intoxmake-io:devfrom
Sunrisepeak:sunrisepeak-patch-1

Conversation

@Sunrisepeak
Copy link
Contributor

Test

function main(url, opt)

    url = "https://github.com/d2learn/xlings.git"
    opt = { verbose = true }

    -- find git
    local git = assert(find_tool("git"), "git not found!")

    -- ...

    -- clone it
    if opt.verbose then
        os.execv(git.program, argv, {envs = envs})
    else
        os.vrunv(git.program, argv, {envs = envs})
    end
end
speak@speak-pc:~/workspace/scode/xmake/xmake/modules/devel/git$ xmake l clone.lua 
Cloning into 'xlings'...
remote: Enumerating objects: 1633, done.
remote: Counting objects: 100% (218/218), done.
remote: Compressing objects: 100% (79/79), done.
remote: Total 1633 (delta 165), reused 150 (delta 139), pack-reused 1415 (from 2)
Receiving objects: 100% (1633/1633), 319.07 KiB | 2.25 MiB/s, done.
Resolving deltas: 100% (953/953), done.

xmake-sourcecode

git.clone(remoteurl, {verbose = option.get("verbose"), branch = locked_repo.branch, outputdir = repodir_local, autocrlf = false})

Signed-off-by: sunrisepeak <speakshen@163.com>
@waruqi waruqi added this to the v2.9.9 milestone Mar 17, 2025
@waruqi waruqi merged commit c7395c4 into xmake-io:dev Mar 18, 2025
22 of 26 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.

2 participants