| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 14d7034 commit 38c624f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -68,7 +68,12 @@ def test_diff_with_staged_file(self, rw_dir): | |||
| 68 | 68 | ||
| 69 | 69 | with open(fp, 'w') as fs: | |
| 70 | 70 | fs.write("Hola Mundo") | |
| 71 | - r.git.commit(all=True, message="change on master") | ||
| 71 | + r.git.add(Git.polish_url(fp)) | ||
| 72 | + self.assertEqual(len(r.index.diff("HEAD", create_patch=True)), 1, | ||
| 73 | + "create_patch should generate patch of diff to HEAD") | ||
| 74 | + r.git.commit(message="change on master") | ||
| 75 | + self.assertEqual(len(r.index.diff("HEAD", create_patch=True)), 0, | ||
| 76 | + "create_patch should generate no patch, already on HEAD") | ||
| 72 | 77 | ||
| 73 | 78 | r.git.checkout('HEAD~1', b='topic') | |
| 74 | 79 | with open(fp, 'w') as fs: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments