[partial] Make partial clones work without cache.
Change-Id: I0f11785363f2288de914d8b5cfab3b4ff46ac35f
Reviewed-on: https://fuchsia-review.googlesource.com/c/jiri/+/426935
Reviewed-by: Haowei Wu <haowei@google.com>
Commit-Queue: Nathan Mulcahey <nmulcahey@google.com>
diff --git a/project/operations.go b/project/operations.go
index d6e4c41..22ece21 100644
--- a/project/operations.go
+++ b/project/operations.go
@@ -145,7 +145,7 @@
opts = append(opts, gitutil.ReferenceOpt(cache))
}
// Passing --filter=blob:none for a local clone is a no-op.
- if cache == r && jirix.Partial {
+ if (cache == r || cache == "") && jirix.Partial {
opts = append(opts, gitutil.OmitBlobsOpt(true))
}
if err = clone(jirix, r, op.destination, opts...); err != nil {