Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
kind: pipeline
type: docker
name: default

steps:
# note zest does everything, including tagging!
- name: version-tag-changelog
image: python:3-bookworm
commands:
- pip install --no-cache-dir zest.releaser
- fullrelease --no-input
when:
branch:
- master

- name: git-push
image: appleboy/drone-git-push
settings:
ssh_key:
from_secret: github_ssh_key
remote: ssh://git@github.com/${DRONE_REPO}.git
force: false
followtags: true
when:
branch:
- master

- name: build
image: python:3-alpine
commands:
#- python -m pip install --upgrade build
- pip --no-cache-dir install build
- python -m build
# alternatively, using pipx instead of pip:
#- pipx install build
#- pyproject-build
when:
event: tag

- name: github-release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- dist/*
title: "${DRONE_TAG}"
#note: CHANGELOG.md
checksum:
- sha256
when:
event: tag

- name: pypi-publish
image: plugins/pypi
settings:
username:
from_secret: public_pypi_username
password:
from_secret: public_pypi_password
skip_build: true
distributions:
- sdist
- bdist_wheel
when:
event: tag

trigger:
ref:
- refs/heads/master
#- refs/heads/develop
- refs/heads/feature/*
- refs/tags/*

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.0.1 (unreleased)


- first release of our fork
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
**Git playback** is a `git` command to play back or step through, commit by commit, the history of any git-controlled file. Its name was inspired by [mmozuras/git-playback](https://github.com/mmozuras/git-playback).
**Git playback** is a `git` command to play back or step through, commit by commit,
the history of any git-controlled file.

Note this is a fork of [jianli/git-playback](https://github.com/jianli/git-playback)
that hasn't been updated since 2016.


## Installation
```sh
pip install git-playback
pipx install git-playback-ng
```

## Usage
Expand All @@ -12,7 +17,7 @@ cd ~/repo/
git playback path/to/file.py
```

![git playback README.md](https://raw.github.com/jianli/git-playback/master/animation.gif "git playback README.md")
![git playback README.md](https://raw.github.com/laur89/git-playback-ng/master/animation.gif "git playback README.md")

and then press the following keys to navigate:
* `r`ewind
Expand Down
4 changes: 2 additions & 2 deletions playback/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def function(window):
curses.init_pair(1, curses.COLOR_RED, -1)
curses.init_pair(2, curses.COLOR_GREEN, -1)

repo = git.Repo(os.getcwd())
repo = git.Repo(os.getcwd(), search_parent_directories=True)
top_level = repo.git.rev_parse(show_toplevel=True)
file_path = os.path.relpath(
os.path.join(os.getcwd(), sys.argv[1]), top_level)
Expand All @@ -71,7 +71,7 @@ def function(window):
rewinding = False
diff = []

while 1:
while True:
# get keyboard input
window.nodelay(1) # don't wait for input
key = window.getch()
Expand Down
8 changes: 8 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[zest.releaser]
extra-message = [CI SKIP]
# do not push to git remote:
push-changes = false
# do not release to pypi:
release = false
history_format = md

11 changes: 5 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from setuptools import find_packages
from setuptools import setup
from setuptools import setup, find_packages


setup(
name='git-playback',
version='0.1.1',
url='https://github.com/jianli/git-playback',
name='git-playback-ng',
version='0.0.1.dev0',
url='https://github.com/laur89/git-playback-ng',
description='A git command to play back file history.',
packages=find_packages('.'),
entry_points={
Expand All @@ -14,6 +13,6 @@
),
},
install_requires=[
'gitpython>=0.3.2.RC1',
'GitPython',
],
)