legit命令

legit是一个对于git的python封装,提供简单而“供人类使用的”git接口


  • branches
    Get a nice pretty list of available branches.

  • sync []
    Synchronizes the given branch. Defaults to current branch. Stash, Fetch, Auto-Merge/Rebase, Push, and Unstash. You can only sync published branches. (alias: sy)

  • resync
    Stashes unstaged changes, Fetches, Auto-Merge/Rebase upstream data from specified upstream branch, Performs smart pull+merge for current branch, Pushes local commits up, and Unstashes changes. Default upstream branch is ‘master’. (alias: rs)

  • switch
    Switches to specified branch. Defaults to current branch. Automatically stashes and unstashes any changes. (alias: sw)

  • sprout []
    Creates a new branch off of the specified branch. Swiches to it immediately. (alias: sp)

  • harvest []
    Auto-Merge/Rebase of specified branch changes into the second branch. (alias: ha, hv, har)

  • graft
    Auto-Merge/Rebase of specified branch into the second branch. Immediately removes specified branch. You can only graft unpublished branches. (alias: gr)

  • publish []
    Publishes specified branch to the remote. (alias: pub)

  • unpublish
    Removes specified branch from the remote. (alias: unp)

  • install
    Installs legit git aliases.

  • help
    Displays help for legit command. (alias: h)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这段代码是 Linux 内核 DRM 子系统中的函数 `drm_of_find_panel_or_bridge` 的实现代码,该函数用于查找设备树节点下的面板或桥接器。 该函数的参数 `np` 是一个指向设备树节点的指针,`port` 和 `endpoint` 是设备树节点的端口和端点号,`panel` 和 `bridge` 分别是指向 drm_panel 和 drm_bridge 结构体指针的指针。函数返回一个整数值,表示查找结果。 在函数实现中,首先判断传入的参数 `panel` 和 `bridge` 是否都为空指针,如果是则返回 -EINVAL。接着,使用 `of_graph_is_present` 函数判断设备树节点中是否存在 graph 节点,如果不存在则返回 -ENODEV。然后,调用 `of_graph_get_remote_node` 函数获取指定端口和端点号的远程节点,如果获取失败则返回 -ENODEV。 接着,如果 `panel` 不为空,则调用 `of_drm_find_panel` 函数查找面板节点并将结果存入 `panel` 指针中,如果查找成功则将返回值 `ret` 设为 0,否则将 `panel` 指针设为 NULL。如果 `panel` 为空,则不查找面板节点。 如果没有找到面板节点,则继续查找桥接器节点。如果 `bridge` 不为空,则先判断 `ret` 的值,如果不为 0,则调用 `of_drm_find_bridge` 函数查找桥接器节点并将结果存入 `bridge` 指针中,如果查找成功则将返回值 `ret` 设为 0,否则将 `bridge` 指针设为 NULL。如果 `bridge` 为空,则不查找桥接器节点。 最后,使用 `of_node_put` 函数释放获取到的远程节点,最终返回查找结果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值