File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 14
14
import sys
15
15
import shlex
16
16
17
+ from gitless import core
17
18
18
19
from . import pprint
19
20
@@ -56,6 +57,8 @@ def show(files, repo):
56
57
pprint .msg (
57
58
'These are the files whose changes will be committed:' , stream = cf .write )
58
59
for f in files :
60
+ if f .endswith (core .GL_KEEP_FILENAME ):
61
+ f = f .replace (core .GL_KEEP_FILENAME , '' )
59
62
pprint .item (f , stream = cf .write )
60
63
pprint .sep (stream = cf .write )
61
64
cf .close ()
Original file line number Diff line number Diff line change 20
20
gl = Command ('gl' )
21
21
git = Command ('git' )
22
22
23
+ from gitless import core
23
24
24
25
from gitless .tests import utils
25
26
@@ -730,6 +731,19 @@ def test_tracked_empty_dir_status(self):
730
731
731
732
self .assertIn (expected_out , out , 'Didn\' t report newly tracked dir' )
732
733
734
+ def test_commit_empty_dir (self ):
735
+ empty_dir = self ._mk_empty_dir ('wanted_empty_dir' )
736
+ gl .track (empty_dir )
737
+ gl .commit (_out = 'std.out' , _bg = True )
738
+
739
+ out = ''
740
+ while (os .path .getsize ('std.out' ) == 0 or out != open ('std.out' , 'r' ).read ()):
741
+ out = open ('std.out' , 'r' ).read ()
742
+
743
+ self .assertIn (self ._dir_path (empty_dir ), out )
744
+ self .assertFalse (core .GL_KEEP_FILENAME in out ,
745
+ 'Output included gitless keep file name' )
746
+
733
747
def test_untracked_empty_dir_status (self ):
734
748
untracked_empty_dir = self ._mk_empty_dir ('untracked_empty_dir' )
735
749
gl .track (untracked_empty_dir )
You can’t perform that action at this time.
0 commit comments