Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
3b5c0712
Commit
3b5c0712
authored
Jan 12, 2019
by
Łukasz Magiera
Committed by
Steven Allen
Jan 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ls: dummy value in place of size for dirs
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
39c2e012
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
core/commands/ls.go
core/commands/ls.go
+1
-1
test/sharness/t0045-ls.sh
test/sharness/t0045-ls.sh
+8
-8
test/sharness/t0051-object.sh
test/sharness/t0051-object.sh
+1
-1
No files found.
core/commands/ls.go
View file @
3b5c0712
...
...
@@ -307,7 +307,7 @@ func tabularOutput(req *cmds.Request, w io.Writer, out *LsOutput, lastObjectHash
switch
{
case
link
.
Type
==
unixfs
.
TDirectory
&&
size
:
s
=
"%[1]s
\t\t
%[3]s/
\n
"
s
=
"%[1]s
\t
-
\t
%[3]s/
\n
"
case
link
.
Type
==
unixfs
.
TDirectory
&&
!
size
:
s
=
"%[1]s
\t
%[3]s/
\n
"
case
size
:
...
...
test/sharness/t0045-ls.sh
View file @
3b5c0712
...
...
@@ -45,8 +45,8 @@ EOF
test_expect_success
"'ipfs ls <three dir hashes>' output looks good"
'
cat <<-\EOF >expected_ls &&
QmfNy183bXiRVyrhyWtq3TwHn79yHEkiAGFr18P7YNzESj:
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
d2/
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
-
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
-
d2/
QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH 5 f1
QmNtocSs7MoDkJMc1RkyisCSKvLadujPsfJfSdJ3e1eA1M 5 f2
...
...
@@ -92,8 +92,8 @@ EOF
cat <<-\EOF >expected_ls_headers &&
QmfNy183bXiRVyrhyWtq3TwHn79yHEkiAGFr18P7YNzESj:
Hash Size Name
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
d2/
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
-
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
-
d2/
QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH 5 f1
QmNtocSs7MoDkJMc1RkyisCSKvLadujPsfJfSdJ3e1eA1M 5 f2
...
...
@@ -147,8 +147,8 @@ EOF
test_expect_success
"'ipfs ls --stream <three dir hashes>' output looks good"
'
cat <<-\EOF >expected_ls_stream &&
QmfNy183bXiRVyrhyWtq3TwHn79yHEkiAGFr18P7YNzESj:
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
d2/
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
-
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
-
d2/
QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH 5 f1
QmNtocSs7MoDkJMc1RkyisCSKvLadujPsfJfSdJ3e1eA1M 5 f2
...
...
@@ -194,8 +194,8 @@ EOF
cat <<-\EOF >expected_ls_stream_headers &&
QmfNy183bXiRVyrhyWtq3TwHn79yHEkiAGFr18P7YNzESj:
Hash Size Name
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
d2/
QmSix55yz8CzWXf5ZVM9vgEvijnEeeXiTSarVtsqiiCJss
-
d1/
QmR3jhV4XpxxPjPT3Y8vNnWvWNvakdcT3H6vqpRBsX1MLy
-
d2/
QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH 5 f1
QmNtocSs7MoDkJMc1RkyisCSKvLadujPsfJfSdJ3e1eA1M 5 f2
...
...
test/sharness/t0051-object.sh
View file @
3b5c0712
...
...
@@ -292,7 +292,7 @@ test_object_cmd() {
'
test_expect_success
"output looks good"
'
echo "QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn foo/" > patched_exp &&
echo "QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
-
foo/" > patched_exp &&
test_cmp patched_exp patched_output
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment