Commit cbbb6b3
committed
git.py: make git_dir an optional parameter
git_dir is now optional in the constructor for git.Git.
Git now falls back to os.getcwd() when git_dir is not specified.
Furthermore, extra checks were added so that the git_dir
variable always points to the root of the worktree for
non-bare repositories.
Signed-off-by: David Aguilar <davvid@gmail.com>1 parent ebee400 commit cbbb6b3
1 file changed
+32
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
18 | 48 | | |
19 | 49 | | |
20 | 50 | | |
| |||
0 commit comments