fastgit 0.0.3__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastgit-0.0.3/fastgit.egg-info → fastgit-0.0.4}/PKG-INFO +19 -7
- {fastgit-0.0.3 → fastgit-0.0.4}/README.md +18 -6
- fastgit-0.0.4/fastgit/__init__.py +3 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/fastgit/core.py +2 -2
- {fastgit-0.0.3 → fastgit-0.0.4/fastgit.egg-info}/PKG-INFO +19 -7
- fastgit-0.0.3/fastgit/__init__.py +0 -3
- {fastgit-0.0.3 → fastgit-0.0.4}/LICENSE +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/MANIFEST.in +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/fastgit/_modidx.py +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/fastgit.egg-info/SOURCES.txt +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/fastgit.egg-info/dependency_links.txt +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/fastgit.egg-info/entry_points.txt +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/fastgit.egg-info/top_level.txt +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/pyproject.toml +0 -0
- {fastgit-0.0.3 → fastgit-0.0.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastgit
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: Use git from python, fast
|
|
5
5
|
Author-email: Jeremy Howard <github@jhoward.fastmail.fm>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -38,7 +38,7 @@ In this example we run `git init` on a directory, add a *.gitignore*,
|
|
|
38
38
|
and commit it.
|
|
39
39
|
|
|
40
40
|
``` python
|
|
41
|
-
import tempfile
|
|
41
|
+
import shutil, tempfile
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
``` python
|
|
@@ -53,11 +53,23 @@ def _git_init(g):
|
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
``` python
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
td = tempfile.mkdtemp()
|
|
57
|
+
g = Git(td)
|
|
58
|
+
_git_init(g)
|
|
59
|
+
assert 'add .gitignore' in g.last_commit
|
|
60
|
+
print(g.branch('--show-current'))
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
main
|
|
64
|
+
|
|
65
|
+
You can also pass path arguments after `--` using the `__` parameter:
|
|
66
|
+
|
|
67
|
+
``` python
|
|
68
|
+
g.log('--oneline', __=['.gitignore'])
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
'22a9a5d add .gitignore'
|
|
72
|
+
|
|
73
|
+
``` python
|
|
74
|
+
shutil.rmtree(td)
|
|
75
|
+
```
|
|
@@ -19,7 +19,7 @@ In this example we run `git init` on a directory, add a *.gitignore*,
|
|
|
19
19
|
and commit it.
|
|
20
20
|
|
|
21
21
|
``` python
|
|
22
|
-
import tempfile
|
|
22
|
+
import shutil, tempfile
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
``` python
|
|
@@ -34,11 +34,23 @@ def _git_init(g):
|
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
``` python
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
td = tempfile.mkdtemp()
|
|
38
|
+
g = Git(td)
|
|
39
|
+
_git_init(g)
|
|
40
|
+
assert 'add .gitignore' in g.last_commit
|
|
41
|
+
print(g.branch('--show-current'))
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
main
|
|
45
|
+
|
|
46
|
+
You can also pass path arguments after `--` using the `__` parameter:
|
|
47
|
+
|
|
48
|
+
``` python
|
|
49
|
+
g.log('--oneline', __=['.gitignore'])
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
'22a9a5d add .gitignore'
|
|
53
|
+
|
|
54
|
+
``` python
|
|
55
|
+
shutil.rmtree(td)
|
|
56
|
+
```
|
|
@@ -13,7 +13,7 @@ import shutil,stat
|
|
|
13
13
|
|
|
14
14
|
# %% ../nbs/00_core.ipynb #e4c0a290
|
|
15
15
|
def callgit(path, *args, split=None, uname=None):
|
|
16
|
-
fp = Path(path).resolve()
|
|
16
|
+
fp = Path(path).expanduser().resolve()
|
|
17
17
|
args = ['git', '-C', str(fp)] + list(args)
|
|
18
18
|
if uname: args = ['/usr/bin/sudo', '-u', uname] + args
|
|
19
19
|
res = subprocess.run(args, capture_output=True, text=True, check=True).stdout.strip()
|
|
@@ -27,7 +27,7 @@ def get_top(folder):
|
|
|
27
27
|
|
|
28
28
|
# %% ../nbs/00_core.ipynb #97f78839
|
|
29
29
|
class Git:
|
|
30
|
-
def __init__(self, d): self.d = Path(d)
|
|
30
|
+
def __init__(self, d): self.d = Path(d).expanduser()
|
|
31
31
|
|
|
32
32
|
def __call__(self, cmd, *args, split=None, mute_errors=False, **kwargs):
|
|
33
33
|
paths = [str(p) for p in listify(kwargs.pop('__', None) or [])]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastgit
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: Use git from python, fast
|
|
5
5
|
Author-email: Jeremy Howard <github@jhoward.fastmail.fm>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -38,7 +38,7 @@ In this example we run `git init` on a directory, add a *.gitignore*,
|
|
|
38
38
|
and commit it.
|
|
39
39
|
|
|
40
40
|
``` python
|
|
41
|
-
import tempfile
|
|
41
|
+
import shutil, tempfile
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
``` python
|
|
@@ -53,11 +53,23 @@ def _git_init(g):
|
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
``` python
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
td = tempfile.mkdtemp()
|
|
57
|
+
g = Git(td)
|
|
58
|
+
_git_init(g)
|
|
59
|
+
assert 'add .gitignore' in g.last_commit
|
|
60
|
+
print(g.branch('--show-current'))
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
main
|
|
64
|
+
|
|
65
|
+
You can also pass path arguments after `--` using the `__` parameter:
|
|
66
|
+
|
|
67
|
+
``` python
|
|
68
|
+
g.log('--oneline', __=['.gitignore'])
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
'22a9a5d add .gitignore'
|
|
72
|
+
|
|
73
|
+
``` python
|
|
74
|
+
shutil.rmtree(td)
|
|
75
|
+
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|