Comment 2 by Stephen Leake, Aug 7, 2012
working in branch nvm.issue-148-80 A solution is implemented, but it's not clear it should be promoted to main. Summary: In mtn 1.0, add had two different defaults for --recursive; when --unknown is specified, --recursive defaults to true, when --unknown is not specified, --recursive defaults to false. The fix changes that. It adds the option --[no]-recursive to 'ls unknown' and 'ls ignored' (because that logic is used in 'add'). Now, for 'add', --unknown is orthogonal to --recursive, and the default for --recursive is false. This preserves the mtn 1.0 behavior for 'mtn add' (except that the warning about some files not added is gone), but for 'mtn add --unknown', we now need to explicitly add '--recursive'.
Status:
Started
Owner: stephe
Owner: stephe
Comment 3 by Stephen Leake, Aug 8, 2012
The situation in mtn 1.0 is more complicated; consider an example
workspace:
known_dir_1
unknown_file_1
known_dir_2
unknown_file_2
unknown_dir_3
unknown_file_3
unknown_dir_4
unknown_file_4
in mtn 1.0, 'ls unknown' lists:
known_dir_1/unknown_file_1
known_dir_1/known_dir_2/unknown_file_2
known_dir_1/known_dir_2/unknown_dir_3
in mtn 1.0, 'add --unknown' adds:
known_dir_1/unknown_file_1
known_dir_1/known_dir_2/unknown_file_2
known_dir_1/known_dir_2/unknown_dir_3
known_dir_1/known_dir_2/unknown_dir_3/unknown_file_3
known_dir_1/known_dir_2/unknown_dir_3/unknown_dir_
in nvm.issue-148-80, 'ls unknown' lists nothing, since there are no
unknown dirs in the workspace root.
in nvm.issue-148-80, 'add --unknown' adds nothing.
in both branches 'add --unknown --recursive' adds all the unknown
files.
In the typical case of a totally unknown workspace, mtn 1.0 'add
--unknown' adds the files in the root and first layer directories.
In nvm.issue-148-80, 'add -unknown' adds the files and dirs in the
root directory, but not the files in the first layer.
Comment 4 by Stephen Leake, Aug 22, 2012
nvm.issue-148-80 propagated to main; issue fixed in fff999548e6d92a4d16280c7bfc346dff5353274
Status:
Fixed
Sign in to reply to this comment.
Reported by joe 23, Feb 27, 2011