Unverified 提交 8543e27e 作者: Steven Allen 提交者: GitHub

Merge pull request #5699 from ipfs/fix/pin-ls-output

Fix pin ls output when hash is specified
...@@ -547,7 +547,7 @@ func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsN ...@@ -547,7 +547,7 @@ func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsN
default: default:
pinType = "indirect through " + pinType pinType = "indirect through " + pinType
} }
keys[c.String()] = RefKeyObject{ keys[c.Cid().String()] = RefKeyObject{
Type: pinType, Type: pinType,
} }
} }
......
...@@ -45,6 +45,13 @@ test_pins() { ...@@ -45,6 +45,13 @@ test_pins() {
test $(cat verify_out | wc -l) > 8 test $(cat verify_out | wc -l) > 8
' '
test_expect_success "test pin ls hash" '
echo $HASH_B | test_must_fail grep /ipfs && # just to be sure
ipfs pin ls $HASH_B > ls_hash_out &&
echo "$HASH_B recursive" > ls_hash_exp &&
test_cmp ls_hash_exp ls_hash_out
'
test_expect_success "unpin those hashes" ' test_expect_success "unpin those hashes" '
cat hashes | ipfs pin rm cat hashes | ipfs pin rm
' '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论