File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1414import sys
1515import shlex
1616
17+ from gitless import core
1718
1819from . import pprint
1920
@@ -56,6 +57,8 @@ def show(files, repo):
5657 pprint .msg (
5758 'These are the files whose changes will be committed:' , stream = cf .write )
5859 for f in files :
60+ if f .endswith (core .GL_KEEP_FILENAME ):
61+ f = f .replace (core .GL_KEEP_FILENAME , '' )
5962 pprint .item (f , stream = cf .write )
6063 pprint .sep (stream = cf .write )
6164 cf .close ()
Original file line number Diff line number Diff line change 2020 gl = Command ('gl' )
2121 git = Command ('git' )
2222
23+ from gitless import core
2324
2425from gitless .tests import utils
2526
@@ -730,6 +731,25 @@ def test_tracked_empty_dir_status(self):
730731
731732 self .assertIn (expected_out , out , 'Didn\' t report newly tracked dir' )
732733
734+ def test_commit_empty_dir (self ):
735+ empty_dir = self ._mk_empty_dir ('wanted_empty_dir' )
736+ gl .track (empty_dir )
737+ pipe = 'std.out'
738+ gl .commit (_out = pipe , _bg = True )
739+
740+ f = open (pipe )
741+ out = previous_out = ''
742+ while (os .path .getsize (pipe ) == 0 or out != previous_out ):
743+ time .sleep (0.1 )
744+ previous_out = out
745+ f .seek (0 )
746+ out = f .read ()
747+ f .close ()
748+
749+ self .assertIn (self ._dir_path (empty_dir ), out )
750+ self .assertFalse (core .GL_KEEP_FILENAME in out ,
751+ 'Output included gitless keep file name' )
752+
733753 def test_untracked_empty_dir_status (self ):
734754 untracked_empty_dir = self ._mk_empty_dir ('untracked_empty_dir' )
735755 gl .track (untracked_empty_dir )
You can’t perform that action at this time.
0 commit comments