

# operations of the bare repo
# default ___X_CMD_GITB_CACHE="${___X_CMD_ROOT}/shared/app/git/barec/default"

# handle O for object name

# 250218-review: The impl might be wrong.
___x_cmd_gitb_pult(){
    if ___x_cmd_gitb___name_to_brpath_ "$(x git meta path)"; then
        local brpath="$___X_CMD_GITB___NAME_TO_BRPATH_"
        gitb:info "Updating the source: $brpath"
        git fetch "$brpath" || L=gitb M="Cannot update the latest" panic:return 1
    else
        # M="Cannot find the original path" x:panic
        local origin; origin=$(git config --get remote.origin.url) || L=gitb M="Cannot find the original path" panic:return 1
        x gitb add "$origin"
    fi

    N=gitb log:exec command git pull "$@"
}

# rm
# update


# git bare
# x gitb add github.com:x-bash/repo.git github.com:x-bash/tab.git
# x gitb add repo.git
# git clone "$(x gitb repo.git)"

# x gitb clone github.com:x-bash/repo.git ## push to github, but pull from repo cache then from git
# x gitb fetch
