File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-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,19 @@ 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+ 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+
733747 def test_untracked_empty_dir_status (self ):
734748 untracked_empty_dir = self ._mk_empty_dir ('untracked_empty_dir' )
735749 gl .track (untracked_empty_dir )
You can’t perform that action at this time.
0 commit comments