Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion josh-core/src/cache.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::*;
use std::collections::HashMap;

const CACHE_VERSION: u64 = 22;
const CACHE_VERSION: u64 = 23;

lazy_static! {
static ref DB: std::sync::Mutex<Option<sled::Db>> = std::sync::Mutex::new(None);
Expand Down
2 changes: 1 addition & 1 deletion josh-core/src/filter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ fn apply_to_commit2(
Op::Prune => {
let p: Vec<_> = commit.parent_ids().collect();

if p.len() > 0 {
if p.len() > 1 {
let parent = some_or!(transaction.get(filter, p[0]), {
return Ok(None);
});
Expand Down
15 changes: 12 additions & 3 deletions tests/filter/prune_trivial_merge.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,36 @@
$ git add .
$ git commit -m "mod file1" 1> /dev/null

$ git commit --allow-empty -m "empty commit" 1> /dev/null

$ git merge -q branch1 --no-ff
$ git log --graph --pretty=%s
* Merge branch 'branch1'
|\
| * add file2
* | empty commit
* | mod file1
|/
* add file1

$ josh-filter -s ::file1
[3] ::file1
[4] ::file1
$ git log --graph --pretty=%s FILTERED_HEAD
* Merge branch 'branch1'
|\
* | empty commit
* | mod file1
|/
* add file1
$ josh-filter -s ::file1:prune=trivial-merge
[2] :prune=trivial-merge
[3] ::file1
[3] :prune=trivial-merge
[4] ::file1

$ git log --graph --pretty=%s FILTERED_HEAD
* empty commit
* mod file1
* add file1




2 changes: 1 addition & 1 deletion tests/proxy/amend_patchset.t
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/authentication.t
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"real_repo.git" = ["::sub1/"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
4 changes: 2 additions & 2 deletions tests/proxy/caching.t
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down Expand Up @@ -162,7 +162,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_absent_head.t
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
$ bash ${TESTDIR}/destroy_test_env.sh
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_all.t
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"real_repo.git" = ["::sub1/"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_blocked.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$ bash ${TESTDIR}/destroy_test_env.sh
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_invalid_url.t
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$ bash ${TESTDIR}/destroy_test_env.sh
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_locked_refs.t
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_prefix.t
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_sha.t
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Check (2) and (3) but with a branch ref
"real_repo.git" = ["::sub1/"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_subsubtree.t
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_subtree.t
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_subtree_no_master.t
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"real_repo.git" = [":/sub1"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_subtree_tags.t
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/clone_with_meta.t
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/empty_commit.t
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ should still be included.
"real_repo.git" = ["::sub1/"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/get_version.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$ bash ${TESTDIR}/destroy_test_env.sh
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/import_export.t
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Flushed credential cache
"repo2.git" = [":prefix=repo2"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/join_subtree.t
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Make sure all temporary namespace got removed
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/join_with_merge.t
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"real_repo.git" = [":prefix=sub1"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/markers.t
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/no_proxy.t
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
$ bash ${TESTDIR}/destroy_test_env.sh
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/no_proxy_lfs.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
$ bash ${TESTDIR}/destroy_test_env.sh
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_graphql.t
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"real_repo.git" = ["::sub1/"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_new_branch.t
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Check the branch again
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_prefix.t
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_review.t
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Make sure all temporary namespace got removed
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_review_already_in.t
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test for that.
"real_repo.git" = []
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_review_nop_behind.t
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This is a regression test for that problem.
"real_repo.git" = []
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_review_old.t
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Flushed credential cache
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_review_topic.t
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Make sure all temporary namespace got removed
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_stacked.t
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Make sure all temporary namespace got removed
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_stacked_gerrit.t
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Make sure all temporary namespace got removed
"real_repo.git" = ["::sub1/"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_stacked_split.t
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Make sure all temporary namespace got removed
"real_repo.git" = ["::sub1/"]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_stacked_sub.t
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Make sure all temporary namespace got removed
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_subdir_prefix.t
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
2 changes: 1 addition & 1 deletion tests/proxy/push_subtree.t
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Make sure all temporary namespace got removed
]
.
|-- josh
| `-- 22
| `-- 23
| `-- sled
| |-- blobs
| |-- conf
Expand Down
Loading