PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: rsteube/carapace (go)

Issue:
zsh: zstyle list-colors
- `compadd`: ansi escape sequences are stripped
- `compadd -l`: ansi escape sequences work 
- `export ZSH_COLOR=${style}`: does not work
- `export ZSH_COLOUR=${style}`: does work, but only if no default `list-colors` is set with `zstyle`
- `zstyle ':completion:*' list-style '${style}`: works, but values are only highlighted after second `<tab>` and changes the default
- `zstyle ":completion:*:*:example:*" list-colors "${style}"`: does not work
- `zstyle ":completion:${curcontext}:*" list-colors "${style}"`: does not work

Pull request:
zsh: fix zstyle curcontext
fix #482

Patch:
diff --git a/internal/shell/zsh/snippet.go b/internal/shell/zsh/snippet.go
index 3cf7a0c..1ef4e45 100644
--- a/internal/shell/zsh/snippet.go
+++ b/internal/shell/zsh/snippet.go
@@ -26,7 +26,8 @@ function _%v_completion {
     local lines=($(echo ${words} | sed 's/$/"/' | CARAPACE_ZSH_HASH_DIRS="$(hash -d)" xargs %v _carapace zsh))
   fi
 
-  export ZLS_COLOURS="${lines[1]}"
+  zstyle ":completion:${curcontext}:*" list-colors "${lines[1]}":
+
   local line_break=$'\n'
   [[ ! "${lines[2]}" == "NONE" ]] && _message -r "${lines[2]//$'\t'/${line_break}}"
   


Test patch:
diff --git a/example/cmd/_test/zsh.sh b/example/cmd/_test/zsh.sh
index c94c1cd..8188e35 100644
--- a/example/cmd/_test/zsh.sh
+++ b/example/cmd/_test/zsh.sh
@@ -14,7 +14,8 @@ function _example_completion {
     local lines=($(echo ${words} | sed 's/$/"/' | CARAPACE_ZSH_HASH_DIRS="$(hash -d)" xargs example _carapace zsh))
   fi
 
-  export ZLS_COLOURS="${lines[1]}"
+  zstyle ":completion:${curcontext}:*" list-colors "${lines[1]}":
+
   local line_break=$'\n'
   [[ ! "${lines[2]}" == "NONE" ]] && _message -r "${lines[2]//$'\t'/${line_break}}"
Repository: toml-rs/toml (rust)

Issue:
Incorrect roundtripping when table sources are mixed
```toml
[package]
metadata.msrv = "1.65.0"

[[package.metadata.release.pre-release-replacements]]
```

When loading and then writing the above, the array of tables if lost

From crate-ci/cargo-release#653

Pull request:
fix(edit): Ensure std tables under dotted tables are printed
Fixes #527

Patch:
diff --git a/crates/toml_edit/src/encode.rs b/crates/toml_edit/src/encode.rs
index 4747bd52..ea24c2db 100644
--- a/crates/toml_edit/src/encode.rs
+++ b/crates/toml_edit/src/encode.rs
@@ -237,11 +237,13 @@ fn visit_nested_tables<'t, F>(
 where
     F: FnMut(&'t Table, &Vec<&'t Key>, bool) -> Result,
 {
-    callback(table, path, is_array_of_tables)?;
+    if !table.is_dotted() {
+        callback(table, path, is_array_of_tables)?;
+    }
 
     for kv in table.items.values() {
         match kv.value {
-            Item::Table(ref t) if !t.is_dotted() => {
+            Item::Table(ref t) => {
                 path.push(&kv.key);
                 visit_nested_tables(t, path, false, callback)?;
                 path.pop();


Test patch:
diff --git a/crates/toml_edit/tests/testsuite/parse.rs b/crates/toml_edit/tests/testsuite/parse.rs
index ed3ca303..4155e97e 100644
--- a/crates/toml_edit/tests/testsuite/parse.rs
+++ b/crates/toml_edit/tests/testsuite/parse.rs
@@ -231,6 +231,19 @@ fn empty_table() {
     table["foo"].as_table().unwrap();
 }
 
+#[test]
+fn mixed_table_issue_527() {
+    let input = r#"
+[package]
+metadata.msrv = "1.65.0"
+
+[package.metadata.release.pre-release-replacements]
+"#;
+    let document = input.parse::<Document>().unwrap();
+    let actual = document.to_string();
+    assert_eq(input, actual);
+}
+
 #[test]
 fn fruit() {
     let table = r#"
Repository: GoogleChrome/sw-precache (js)

Issue:
url hashes count as cache misses
Like the title says.  `example.com` works, but `example.com#chapter2` counts as a cache miss and the page fails to load.

Is this a bug, or the intended behavior.  If it's intended, can we add a configuration option to strip hashes?  It could be done inside the `stripIgnoredUrlParameters` function.

Pull request:
Remove the hash fragment the URL when determining if there's a match.
R: @addyosmani @gauntface 

Fixes #290 

Patch:
diff --git a/lib/functions.js b/lib/functions.js
index c485761..36d7ddf 100644
--- a/lib/functions.js
+++ b/lib/functions.js
@@ -23,6 +23,8 @@ module.exports = {
   stripIgnoredUrlParameters: function(originalUrl,
     ignoreUrlParametersMatching) {
     var url = new URL(originalUrl);
+    // Remove the hash; see https://github.com/GoogleChrome/sw-precache/issues/290
+    url.hash = '';
 
     url.search = url.search.slice(1) // Exclude initial '?'
       .split('&') // Split into an array of 'key=value' strings
diff --git a/service-worker.tmpl b/service-worker.tmpl
index 5d9b88e..69d1792 100644
--- a/service-worker.tmpl
+++ b/service-worker.tmpl
@@ -133,8 +133,8 @@ self.addEventListener('fetch', function(event) {
     // handlers a chance to handle the request if need be.
     var shouldRespond;
 
-    // First, remove all the ignored parameter and see if we have that URL
-    // in our cache. If so, great! shouldRespond will be true.
+    // First, remove all the ignored parameters and hash fragment, and see if we
+    // have that URL in our cache. If so, great! shouldRespond will be true.
     var url = stripIgnoredUrlParameters(event.request.url, ignoreUrlParametersMatching);
     shouldRespond = urlsToCacheKeys.has(url);
 


Test patch:
diff --git a/test/test.js b/test/test.js
index f766133..e033baf 100644
--- a/test/test.js
+++ b/test/test.js
@@ -332,9 +332,9 @@ describe('stripIgnoredUrlParameters', function() {
     done();
   });
 
-  it('should work when there\'s a hash fragment', function(done) {
+  it('should remove the hash fragment', function(done) {
     var strippedUrl = externalFunctions.stripIgnoredUrlParameters(testUrl + '#hash', [/^t/, /^f/]);
-    assert.strictEqual(strippedUrl, 'http://example.com/index.html?one=1#hash');
+    assert.strictEqual(strippedUrl, 'http://example.com/index.html?one=1');
     done();
   });
 });