• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

pinterest/git-stacktrace: Easily figure out which git commit caused a given stac ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

pinterest/git-stacktrace

开源软件地址:

https://github.com/pinterest/git-stacktrace

开源编程语言:

Python 88.9%

开源软件介绍:

git-stacktrace

git-stacktrace is a tool to help you associate git commits with stacktraces.

It helps you identify related commits by looking at:

  • commits in given range that touched files present in the stacktrace
  • commits in given range that added/removed code present in the stacktrace

Supported Languages

Development

Run tests with: tox

Installation

$ pip install git_stacktrace

Usage

Run git stacktrace within a git initialized directory.

usage: git stacktrace [<options>] [<RANGE>] < stacktrace from stdin

Lookup commits related to a given stacktrace.

positional arguments:
  range                 git commit range to use

optional arguments:
  -h, --help            show this help message and exit
  --since <date1>       show commits more recent than a specific date (from
                        git-log)
  --server              start a webserver to visually interact with git-
                        stacktrace
  --port PORT           Server port
  -f, --fast            Speed things up by not running pickaxe if the file for
                        a line of code cannot be found
  -b [BRANCH], --branch [BRANCH]
                        Git branch. If using --since, use this to specify
                        which branch to run since on. Runs on current branch
                        by default
  --version             show program's version number and exit
  -d, --debug           Enable debug logging

For the Python API see: git_stacktrace/api.py

To run as a web server: git stacktrace --server --port=8080 or GIT_STACKTRACE_PORT=8080 git stacktrace --server

Use the web server as an API:

$ curl \
  -d '{"option-type":"by-date", "since":"1.day", "trace":"..."}' \
  -H "Content-Type: application/json" \
  -X POST http://localhost:8080/

Examples

Example output:

$ git stacktrace --since=1.day < trace
Traceback (most recent call last):
 File "webapp/framework/resource.py", line 72, in _call
   result = getattr(self, method_name)()
 File "webapp/resources/interests_resource.py", line 232, in get
   if self.options['from_navigate'] == "true":
KeyError


commit da39a3ee5e6b4b0d3255bfef95601890afd80709
Commit Date: Tue, 19 Jul 2016 14:18:08 -0700
Author:      John Doe <[email protected]>
Subject:     break interest resource
Link:        https://example.com/D1000
Files Modified:
   - webapp/resources/interests_resource.py:232
Lines Added:
   - "if self.options['from_navigate'] == "true":"



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap