File tree 2 files changed +22
-0
lines changed
2 files changed +22
-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,24 @@ 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
+ f = open ('std.out' )
740
+ out = previous_out = ''
741
+ while (os .path .getsize ('std.out' ) == 0 or out != previous_out ):
742
+ time .sleep (0.1 )
743
+ previous_out = out
744
+ f .seek (0 )
745
+ out = f .read ()
746
+ f .close ()
747
+
748
+ self .assertIn (self ._dir_path (empty_dir ), out )
749
+ self .assertFalse (core .GL_KEEP_FILENAME in out ,
750
+ 'Output included gitless keep file name' )
751
+
733
752
def test_untracked_empty_dir_status (self ):
734
753
untracked_empty_dir = self ._mk_empty_dir ('untracked_empty_dir' )
735
754
gl .track (untracked_empty_dir )
You can’t perform that action at this time.
0 commit comments