gix-merge-0.2.0/.cargo_vcs_info.json0000644000000001470000000000100127210ustar { "git": { "sha1": "beb0ea8c4ff94c64b7773772a9d388ccb403f3c1" }, "path_in_vcs": "gix-merge" }gix-merge-0.2.0/CHANGELOG.md000064400000000000000000000513441046102023000133270ustar 00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.2.0 (2024-12-22) ### Bug Fixes - don't incorrectly mark as auto-resolved conflict if there was none. Previously it was possible to mark perfectly working content merges as conflicting if we would choose 'our' or 'their' resolution. - when binary merges are performed, adjust the returned resolution to indicate auto-resolution. Previously it wasn't possible to detect auto-resolution, even though it can be assumed if a resolution mode was provided. ### New Features (BREAKING) - replace `tree::Options::allow_lossy_resolution` with `*::tree_conflicts`. That way it's possible to steer how to resolve tree-related conflicts while making it possible to detect that a conflict happened. ### Bug Fixes (BREAKING) - assure that `tree::apply_index_entries()` cannot unknowingly leave unconflicted *and* conflicted entries. This is a massive footgun currently where incorrect usage is very likely while causing all kinds of mistakes. ### Commit Statistics - 12 commits contributed to the release over the course of 28 calendar days. - 28 days passed between releases. - 4 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-date v0.9.3, gix-object v0.46.1, gix-command v0.4.0, gix-filter v0.16.0, gix-fs v0.12.1, gix-traverse v0.43.1, gix-worktree-stream v0.18.0, gix-archive v0.18.0, gix-ref v0.49.1, gix-prompt v0.9.0, gix-url v0.28.2, gix-credentials v0.26.0, gix-diff v0.49.0, gix-dir v0.11.0, gix-revision v0.31.1, gix-merge v0.2.0, gix-pack v0.56.0, gix-odb v0.66.0, gix-shallow v0.1.0, gix-packetline v0.18.2, gix-transport v0.44.0, gix-protocol v0.47.0, gix-status v0.16.0, gix-worktree-state v0.16.0, gix v0.69.0, gitoxide-core v0.44.0, gitoxide v0.40.0, safety bump 16 crates ([`c1ba571`](https://github.com/GitoxideLabs/gitoxide/commit/c1ba5719132227410abefeb54e3032b015233e94)) - Update changelogs prior to release ([`7ea8582`](https://github.com/GitoxideLabs/gitoxide/commit/7ea85821c6999e3e6cf50a2a009904e9c38642a4)) - Merge pull request #1705 from GitoxideLabs/merge ([`520c832`](https://github.com/GitoxideLabs/gitoxide/commit/520c832cfcfb34eb7617be55ebe2719ab35595fd)) - Adapt to changes in `gix-diff` related to not tracking empty blobs anymore. ([`f53cec5`](https://github.com/GitoxideLabs/gitoxide/commit/f53cec5b2ce8aa6eeb4a3016511bbb1ac25fa2f7)) - Don't incorrectly mark as auto-resolved conflict if there was none. ([`da585db`](https://github.com/GitoxideLabs/gitoxide/commit/da585db16bae9f44e6300f31b0f784c356d5bd3f)) - Assure that `tree::apply_index_entries()` cannot unknowingly leave unconflicted *and* conflicted entries. ([`3e94b58`](https://github.com/GitoxideLabs/gitoxide/commit/3e94b58f00334392da89fb2772034efe06d3a741)) - Implement support for resolving irreconcilable tree conflicts with 'ours' or 'ancestor' ([`e487cca`](https://github.com/GitoxideLabs/gitoxide/commit/e487cca78d8e6c5b51d2614daf05c98e1469ee69)) - Merge pull request #1708 from EliahKagan/run-ci/mode ([`34efe03`](https://github.com/GitoxideLabs/gitoxide/commit/34efe03fdab97bbf5603a7ea605f37096ff1736a)) - Add missing executable bits on fixture scripts ([`ed757ea`](https://github.com/GitoxideLabs/gitoxide/commit/ed757ea0f4f80968d80c5d9d75ba49f031ee77fc)) - Replace `tree::Options::allow_lossy_resolution` with `*::tree_conflicts`. ([`1c3ba81`](https://github.com/GitoxideLabs/gitoxide/commit/1c3ba812bd3df5991a457b68a962aa1fd87fa915)) - When binary merges are performed, adjust the returned resolution to indicate auto-resolution. ([`a57192c`](https://github.com/GitoxideLabs/gitoxide/commit/a57192c0418aab2e3cd2ddb7b7a951cd3aaeb58f)) - Merge pull request #1701 from GitoxideLabs/release ([`e8b3b41`](https://github.com/GitoxideLabs/gitoxide/commit/e8b3b41dd79b8f4567670b1f89dd8867b6134e9e))
## 0.1.0 (2024-11-24) ### New Features - provide a way to record and apply index changes. These changes will then be applicable to an index that is created from the written tree editor. - when blob-merging, clarify if something would have conflicted. - add `Conflict::is_unresolved()` as utility to see if multiple of them are considered unresolved. - respect the `conflict-marker-size` attribute as well. - add `tree()` and `commit()` merge support, en par with `merge-ORT` as far as tests go. Note that this judgement of quality is based on a limited amount of partially complex test, but it's likely that in practice there will be deviations of sorts. Also, given the complexity of the implementation it is definitely under-tested, but with that it's mostly en par with Git, unfortunatly. On the bright side, some of the tests are very taxing and I'd hope this means something for real-world quality. - add `blob::PlatformRef::id_by_pick()` to more efficiently pick merge results. This works by either selecting a possibly unchanged and not even loaded resource, instead of always loading it to provide a buffer, in case the user doesn't actually want a buffer. Note that this also alters `buffer_by_pick()` to enforce handling of the 'buffer-too-large' option. ### Other - Fix code fences in gix-merge `ConflictStyle` and `Driver` They are not Rust code (they are text with conflict markers and a shell command, respectively) and they are not intended as doctests, but the absence of anything on the opening line caused them to be taken as doctests, so `cargo test --workspace --doc` would fail with parsing errors. (Doctests for all crates have not always been run automatically on CI, so this was not caught when these documentation comments were introduced in #1585.) ### New Features (BREAKING) - Add more modes for checking for unresolved conflicts. They aim at making it possible to know if a conflict happened that was automatically resolved. - add `commit::virtual_merge_base()` to produce the single merge-base to use. This allows more flexibility in conjunction with tree-merging, as commits as input aren't required. This is breaking as it changes the return value of `commit()`. - `Repository::merge_trees()` now has a fully-wrapped outcome. That way, more attached types are used for greater convenience. - Don't fail on big files during blob-merge, but turn them into binary merges. Binary merges are mere choices of which side to pick, which works well for big files as well. Git doesn't define this well during its own merges, so there is some room here. ### Bug Fixes (BREAKING) - Adjust blob-merge baseline to also test the reverse of each operation This also fixes an issue with blob merge computations. It's breaking because the marker-size was reduced to `u8`. - prefer to receive borrowed `gix_command::Context` when it's just passed on. That way, the clone occours only when needed, without forcing the caller to pre-emptively clone each time it's called. ### Commit Statistics - 29 commits contributed to the release. - 13 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-glob v0.17.1, gix-command v0.3.11, gix-filter v0.15.0, gix-chunk v0.4.10, gix-commitgraph v0.25.1, gix-revwalk v0.17.0, gix-traverse v0.43.0, gix-worktree-stream v0.17.0, gix-archive v0.17.0, gix-config-value v0.14.10, gix-lock v15.0.1, gix-ref v0.49.0, gix-sec v0.10.10, gix-config v0.42.0, gix-prompt v0.8.9, gix-url v0.28.1, gix-credentials v0.25.1, gix-ignore v0.12.1, gix-bitmap v0.2.13, gix-index v0.37.0, gix-worktree v0.38.0, gix-diff v0.48.0, gix-discover v0.37.0, gix-pathspec v0.8.1, gix-dir v0.10.0, gix-mailmap v0.25.1, gix-revision v0.31.0, gix-merge v0.1.0, gix-negotiate v0.17.0, gix-pack v0.55.0, gix-odb v0.65.0, gix-packetline v0.18.1, gix-transport v0.43.1, gix-protocol v0.46.1, gix-refspec v0.27.0, gix-status v0.15.0, gix-submodule v0.16.0, gix-worktree-state v0.15.0, gix v0.68.0, gix-fsck v0.8.0, gitoxide-core v0.43.0, gitoxide v0.39.0 ([`4000197`](https://github.com/GitoxideLabs/gitoxide/commit/4000197ecc8cf1a5d79361620e4c114f86476703)) - Release gix-date v0.9.2, gix-actor v0.33.1, gix-hash v0.15.1, gix-features v0.39.1, gix-validate v0.9.2, gix-object v0.46.0, gix-path v0.10.13, gix-quote v0.4.14, gix-attributes v0.23.1, gix-packetline-blocking v0.18.1, gix-filter v0.15.0, gix-chunk v0.4.10, gix-commitgraph v0.25.1, gix-revwalk v0.17.0, gix-traverse v0.43.0, gix-worktree-stream v0.17.0, gix-archive v0.17.0, gix-config-value v0.14.10, gix-lock v15.0.1, gix-ref v0.49.0, gix-config v0.42.0, gix-prompt v0.8.9, gix-url v0.28.1, gix-credentials v0.25.1, gix-bitmap v0.2.13, gix-index v0.37.0, gix-worktree v0.38.0, gix-diff v0.48.0, gix-discover v0.37.0, gix-pathspec v0.8.1, gix-dir v0.10.0, gix-mailmap v0.25.1, gix-revision v0.31.0, gix-merge v0.1.0, gix-negotiate v0.17.0, gix-pack v0.55.0, gix-odb v0.65.0, gix-packetline v0.18.1, gix-transport v0.43.1, gix-protocol v0.46.1, gix-refspec v0.27.0, gix-status v0.15.0, gix-submodule v0.16.0, gix-worktree-state v0.15.0, gix v0.68.0, gix-fsck v0.8.0, gitoxide-core v0.43.0, gitoxide v0.39.0, safety bump 25 crates ([`8ce4912`](https://github.com/GitoxideLabs/gitoxide/commit/8ce49129a75e21346ceedf7d5f87fa3a34b024e1)) - Prepare changelogs prior to release ([`bc9d994`](https://github.com/GitoxideLabs/gitoxide/commit/bc9d9943e8499a76fc47a05b63ac5c684187d1ae)) - Merge pull request #1661 from GitoxideLabs/merge ([`0b7abfb`](https://github.com/GitoxideLabs/gitoxide/commit/0b7abfbdebe8c5ab30b89499a70dd7727de41184)) - Provide a way to record and apply index changes. ([`3ee8b62`](https://github.com/GitoxideLabs/gitoxide/commit/3ee8b62dd025d6fdb0d9929dec7a561fa576f545)) - Add more modes for checking for unresolved conflicts. ([`aff76f2`](https://github.com/GitoxideLabs/gitoxide/commit/aff76f291a52fc6806944d72d249a8bd1b804c39)) - When blob-merging, clarify if something would have conflicted. ([`09213bc`](https://github.com/GitoxideLabs/gitoxide/commit/09213bc1b2aa725af1571dff040415772e844c3a)) - Merge pull request #1662 from paolobarbolini/thiserror-v2 ([`7a40648`](https://github.com/GitoxideLabs/gitoxide/commit/7a406481b072728cec089d7c05364f9dbba335a2)) - Upgrade thiserror to v2.0.0 ([`0f0e4fe`](https://github.com/GitoxideLabs/gitoxide/commit/0f0e4fe121932a8a6302cf950b3caa4c8608fb61)) - Merge pull request #1658 from GitoxideLabs/merge ([`905e5b4`](https://github.com/GitoxideLabs/gitoxide/commit/905e5b42a6163f92edef8fab82d97aeb6f17cf06)) - Add `commit::virtual_merge_base()` to produce the single merge-base to use. ([`9d43b75`](https://github.com/GitoxideLabs/gitoxide/commit/9d43b753a225482645b22e4151bf7dc192c8c082)) - Merge pull request #1654 from EliahKagan/doctest-workspace ([`1411289`](https://github.com/GitoxideLabs/gitoxide/commit/141128942c26bd63fc6855e5137b98f8da814446)) - Fix code fences in gix-merge `ConflictStyle` and `Driver` ([`2fdbcfe`](https://github.com/GitoxideLabs/gitoxide/commit/2fdbcfe17cdcc480e320582d7c6b48f8b615bf3b)) - Merge pull request #1651 from GitoxideLabs/merge ([`a876533`](https://github.com/GitoxideLabs/gitoxide/commit/a8765330fc16997dee275866b18a128dec1c5d55)) - `Repository::merge_trees()` now has a fully-wrapped outcome. ([`1d2262f`](https://github.com/GitoxideLabs/gitoxide/commit/1d2262f2ca416e3c22f9601e7eab11f3372b2128)) - Add `Conflict::is_unresolved()` as utility to see if multiple of them are considered unresolved. ([`9e106c4`](https://github.com/GitoxideLabs/gitoxide/commit/9e106c4ab7ceea091cd8baef99a480739bd53c9d)) - Remove a TODO that turned out to be unnecessary. ([`5b428a9`](https://github.com/GitoxideLabs/gitoxide/commit/5b428a9e931b19622ae76c25bfb1fe882744cd1f)) - Merge pull request #1652 from EliahKagan/run-ci/chmod ([`8e99eba`](https://github.com/GitoxideLabs/gitoxide/commit/8e99eba2a284b35b5e9bcb97e47bfbbafc3df5d1)) - Update tree-baseline archive ([`ab45415`](https://github.com/GitoxideLabs/gitoxide/commit/ab45415a0119cbdcbd2fcbe8c7b6e2580432f705)) - Set +x in index in added-file-changed-content-and-mode ([`6faf11a`](https://github.com/GitoxideLabs/gitoxide/commit/6faf11a0e0916fdf03e4532d28e40674c369bf9b)) - Set +x in index in same-rename-different-mode baseline ([`041bdde`](https://github.com/GitoxideLabs/gitoxide/commit/041bddecacb23b4925bcd9bcdc4a86aec2ea719d)) - Merge pull request #1618 from GitoxideLabs/merge ([`3fb989b`](https://github.com/GitoxideLabs/gitoxide/commit/3fb989be21c739bbfeac93953c1685e7c6cd2106)) - Respect the `conflict-marker-size` attribute as well. ([`bd91d6a`](https://github.com/GitoxideLabs/gitoxide/commit/bd91d6ae97d1981a2366136040407590f64fdad4)) - Add `tree()` and `commit()` merge support, en par with `merge-ORT` as far as tests go. ([`4b1764c`](https://github.com/GitoxideLabs/gitoxide/commit/4b1764ca9148e08ae9f11bca68e0689b12bc8c80)) - Adjust blob-merge baseline to also test the reverse of each operation ([`de1cfb6`](https://github.com/GitoxideLabs/gitoxide/commit/de1cfb6a9caf5ac086c6411824835c75e888e2d7)) - Add `blob::PlatformRef::id_by_pick()` to more efficiently pick merge results. ([`dd99991`](https://github.com/GitoxideLabs/gitoxide/commit/dd99991ec2bfb07ef571769abc32f1b35122d5ca)) - Don't fail on big files during blob-merge, but turn them into binary merges. ([`c1cf08c`](https://github.com/GitoxideLabs/gitoxide/commit/c1cf08cc47f98abda017544b1791ab3b4463cc77)) - Prefer to receive borrowed `gix_command::Context` when it's just passed on. ([`78a5355`](https://github.com/GitoxideLabs/gitoxide/commit/78a535572643a0657348aea3c2fed0123505f7fe)) - Merge pull request #1642 from GitoxideLabs/new-release ([`db5c9cf`](https://github.com/GitoxideLabs/gitoxide/commit/db5c9cfce93713b4b3e249cff1f8cc1ef146f470))
## v0.0.0 (2024-10-22) ### Other - Update gitoxide repository URLs This updates `Byron/gitoxide` URLs to `GitoxideLabs/gitoxide` in: - Markdown documentation, except changelogs and other such files where such changes should not be made. - Documentation comments (in .rs files). - Manifest (.toml) files, for the value of the `repository` key. - The comments appearing at the top of a sample hook that contains a repository URL as an example. When making these changes, I also allowed my editor to remove trailing whitespace in any lines in files already being edited (since, in this case, there was no disadvantage to allowing this). The gitoxide repository URL changed when the repository was moved into the recently created GitHub organization `GitoxideLabs`, as detailed in #1406. Please note that, although I believe updating the URLs to their new canonical values is useful, this is not needed to fix any broken links, since `Byron/gitoxide` URLs redirect (and hopefully will always redirect) to the coresponding `GitoxideLabs/gitoxide` URLs. While this change should not break any URLs, some affected URLs were already broken. This updates them, but they are still broken. They will be fixed in a subsequent commit. This also does not update `Byron/gitoxide` URLs in test fixtures or test cases, nor in the `Makefile`. (It may make sense to change some of those too, but it is not really a documentation change.) ### Commit Statistics - 15 commits contributed to the release over the course of 26 calendar days. - 1 commit was understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages ### Commit Details
view details * **Uncategorized** - Release gix-merge v0.0.0, gix-negotiate v0.16.0, gix-pack v0.54.0, gix-odb v0.64.0, gix-packetline v0.18.0, gix-transport v0.43.0, gix-protocol v0.46.0, gix-revision v0.30.0, gix-refspec v0.26.0, gix-status v0.14.0, gix-submodule v0.15.0, gix-worktree-state v0.14.0, gix v0.67.0, gix-fsck v0.7.0, gitoxide-core v0.42.0, gitoxide v0.38.0 ([`f1364dc`](https://github.com/GitoxideLabs/gitoxide/commit/f1364dcb8aa66e3d8730e38445b045c5b63c56e6)) - Add new changelog for gix-merge ([`fa3e260`](https://github.com/GitoxideLabs/gitoxide/commit/fa3e2600d7e39011f1d7f410249ebd0426a348a8)) - Release gix-date v0.9.1, gix-utils v0.1.13, gix-actor v0.33.0, gix-hash v0.15.0, gix-trace v0.1.11, gix-features v0.39.0, gix-hashtable v0.6.0, gix-validate v0.9.1, gix-object v0.45.0, gix-path v0.10.12, gix-glob v0.17.0, gix-quote v0.4.13, gix-attributes v0.23.0, gix-command v0.3.10, gix-packetline-blocking v0.18.0, gix-filter v0.14.0, gix-fs v0.12.0, gix-chunk v0.4.9, gix-commitgraph v0.25.0, gix-revwalk v0.16.0, gix-traverse v0.42.0, gix-worktree-stream v0.16.0, gix-archive v0.16.0, gix-config-value v0.14.9, gix-tempfile v15.0.0, gix-lock v15.0.0, gix-ref v0.48.0, gix-sec v0.10.9, gix-config v0.41.0, gix-prompt v0.8.8, gix-url v0.28.0, gix-credentials v0.25.0, gix-ignore v0.12.0, gix-bitmap v0.2.12, gix-index v0.36.0, gix-worktree v0.37.0, gix-diff v0.47.0, gix-discover v0.36.0, gix-pathspec v0.8.0, gix-dir v0.9.0, gix-mailmap v0.25.0, gix-merge v0.0.0, gix-negotiate v0.16.0, gix-pack v0.54.0, gix-odb v0.64.0, gix-packetline v0.18.0, gix-transport v0.43.0, gix-protocol v0.46.0, gix-revision v0.30.0, gix-refspec v0.26.0, gix-status v0.14.0, gix-submodule v0.15.0, gix-worktree-state v0.14.0, gix v0.67.0, gix-fsck v0.7.0, gitoxide-core v0.42.0, gitoxide v0.38.0, safety bump 41 crates ([`3f7e8ee`](https://github.com/GitoxideLabs/gitoxide/commit/3f7e8ee2c5107aec009eada1a05af7941da9cb4d)) - Merge pull request #1624 from EliahKagan/update-repo-url ([`795962b`](https://github.com/GitoxideLabs/gitoxide/commit/795962b107d86f58b1f7c75006da256d19cc80ad)) - Update gitoxide repository URLs ([`64ff0a7`](https://github.com/GitoxideLabs/gitoxide/commit/64ff0a77062d35add1a2dd422bb61075647d1a36)) - Merge pull request #1612 from Byron/merge ([`37c1e4c`](https://github.com/GitoxideLabs/gitoxide/commit/37c1e4c919382c9d213bd5ca299ed659d63ab45d)) - Add some performance traces for blob-merges ([`b25fe4d`](https://github.com/GitoxideLabs/gitoxide/commit/b25fe4d052250ddace9a118b2247537b2a7fa09e)) - Merge pull request #1611 from Byron/merge ([`5ffccd2`](https://github.com/GitoxideLabs/gitoxide/commit/5ffccd2f08d70576347e3ae17a66ca5a60f1d81c)) - Make `blob::Platform::filter_mode` public. ([`b26eb26`](https://github.com/GitoxideLabs/gitoxide/commit/b26eb2618c1764f699530e251ddef4e6cf456ddd)) - Merge pull request #1585 from Byron/merge ([`2261de4`](https://github.com/GitoxideLabs/gitoxide/commit/2261de470aeb77be080f9e423e1513bde85d9cc0)) - Add platform tests and implementation ([`eb37dc3`](https://github.com/GitoxideLabs/gitoxide/commit/eb37dc36d8c42f5a7714c641244ce4a13111b0a1)) - Add all relevant tests for the merge processing pipeline ([`a6f3e30`](https://github.com/GitoxideLabs/gitoxide/commit/a6f3e30017343c01ba61c49fe74ffc69e443a33c)) - Implement `text` and `binary` merge algorithms, also with baseline tests for correctness. ([`0762846`](https://github.com/GitoxideLabs/gitoxide/commit/07628465a0a3f047ec809d287c9a4567b4acd607)) - Sketch the entire API surface to capture all parts of blob-merges ([`9efa09f`](https://github.com/GitoxideLabs/gitoxide/commit/9efa09f10d042dc4d5db4edf4589594450a30b31)) - Add the `gix-merge` crate for capturing merge algorithms ([`65efcb7`](https://github.com/GitoxideLabs/gitoxide/commit/65efcb7624031ae478056fbb49a07ef176f0c96b))
gix-merge-0.2.0/Cargo.toml0000644000000106620000000000100107220ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" rust-version = "1.65" name = "gix-merge" version = "0.2.0" authors = ["Sebastian Thiel "] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "A crate of the gitoxide project implementing merge algorithms" readme = false license = "MIT OR Apache-2.0" repository = "https://github.com/GitoxideLabs/gitoxide" [package.metadata.docs.rs] all-features = true features = ["document-features"] [lib] name = "gix_merge" path = "src/lib.rs" doctest = false [[test]] name = "merge" path = "tests/merge/main.rs" [dependencies.bstr] version = "1.5.0" default-features = false [dependencies.document-features] version = "0.2.0" optional = true [dependencies.gix-command] version = "^0.4.0" [dependencies.gix-diff] version = "^0.49.0" features = ["blob"] default-features = false [dependencies.gix-filter] version = "^0.16.0" [dependencies.gix-fs] version = "^0.12.1" [dependencies.gix-hash] version = "^0.15.1" [dependencies.gix-index] version = "^0.37.0" [dependencies.gix-object] version = "^0.46.1" [dependencies.gix-path] version = "^0.10.13" [dependencies.gix-quote] version = "^0.4.14" [dependencies.gix-revision] version = "^0.31.1" features = ["merge_base"] default-features = false [dependencies.gix-revwalk] version = "^0.17.0" [dependencies.gix-tempfile] version = "^15.0.0" [dependencies.gix-trace] version = "^0.1.11" [dependencies.gix-worktree] version = "^0.38.0" features = ["attributes"] default-features = false [dependencies.imara-diff] version = "0.1.7" [dependencies.serde] version = "1.0.114" features = ["derive"] optional = true default-features = false [dependencies.thiserror] version = "2.0.0" [dev-dependencies.gix-utils] version = "^0.1.12" [dev-dependencies.pretty_assertions] version = "1.4.0" [dev-dependencies.termtree] version = "0.5.1" [features] serde = [ "dep:serde", "gix-hash/serde", "gix-object/serde", ] [lints.clippy] bool_to_int_with_if = "allow" borrow_as_ptr = "allow" cast_lossless = "allow" cast_possible_truncation = "allow" cast_possible_wrap = "allow" cast_precision_loss = "allow" cast_sign_loss = "allow" checked_conversions = "allow" copy_iterator = "allow" default_trait_access = "allow" doc_markdown = "allow" empty_docs = "allow" enum_glob_use = "allow" explicit_deref_methods = "allow" explicit_into_iter_loop = "allow" explicit_iter_loop = "allow" filter_map_next = "allow" fn_params_excessive_bools = "allow" from_iter_instead_of_collect = "allow" if_not_else = "allow" ignored_unit_patterns = "allow" implicit_clone = "allow" inconsistent_struct_constructor = "allow" inefficient_to_string = "allow" inline_always = "allow" items_after_statements = "allow" iter_not_returning_iterator = "allow" iter_without_into_iter = "allow" manual_assert = "allow" manual_is_variant_and = "allow" manual_let_else = "allow" manual_string_new = "allow" many_single_char_names = "allow" match_bool = "allow" match_same_arms = "allow" match_wild_err_arm = "allow" match_wildcard_for_single_variants = "allow" missing_errors_doc = "allow" missing_panics_doc = "allow" module_name_repetitions = "allow" must_use_candidate = "allow" mut_mut = "allow" naive_bytecount = "allow" needless_for_each = "allow" needless_pass_by_value = "allow" needless_raw_string_hashes = "allow" no_effect_underscore_binding = "allow" option_option = "allow" range_plus_one = "allow" redundant_else = "allow" return_self_not_must_use = "allow" should_panic_without_expect = "allow" similar_names = "allow" single_match_else = "allow" stable_sort_primitive = "allow" struct_excessive_bools = "allow" struct_field_names = "allow" too_long_first_doc_paragraph = "allow" too_many_lines = "allow" transmute_ptr_to_ptr = "allow" trivially_copy_pass_by_ref = "allow" unnecessary_join = "allow" unnecessary_wraps = "allow" unreadable_literal = "allow" unused_self = "allow" used_underscore_binding = "allow" wildcard_imports = "allow" [lints.clippy.pedantic] level = "warn" priority = -1 [lints.rust] gix-merge-0.2.0/Cargo.toml.orig000064400000000000000000000040271046102023000144010ustar 00000000000000[package] name = "gix-merge" version = "0.2.0" repository = "https://github.com/GitoxideLabs/gitoxide" license = "MIT OR Apache-2.0" description = "A crate of the gitoxide project implementing merge algorithms" authors = ["Sebastian Thiel "] edition = "2021" rust-version = "1.65" [lints] workspace = true [lib] doctest = false [features] ## Data structures implement `serde::Serialize` and `serde::Deserialize`. serde = ["dep:serde", "gix-hash/serde", "gix-object/serde"] [dependencies] gix-hash = { version = "^0.15.1", path = "../gix-hash" } gix-object = { version = "^0.46.1", path = "../gix-object" } gix-filter = { version = "^0.16.0", path = "../gix-filter" } gix-worktree = { version = "^0.38.0", path = "../gix-worktree", default-features = false, features = ["attributes"] } gix-command = { version = "^0.4.0", path = "../gix-command" } gix-path = { version = "^0.10.13", path = "../gix-path" } gix-fs = { version = "^0.12.1", path = "../gix-fs" } gix-tempfile = { version = "^15.0.0", path = "../gix-tempfile" } gix-trace = { version = "^0.1.11", path = "../gix-trace" } gix-quote = { version = "^0.4.14", path = "../gix-quote" } gix-revision = { version = "^0.31.1", path = "../gix-revision", default-features = false, features = ["merge_base"] } gix-revwalk = { version = "^0.17.0", path = "../gix-revwalk" } gix-diff = { version = "^0.49.0", path = "../gix-diff", default-features = false, features = ["blob"] } gix-index = { version = "^0.37.0", path = "../gix-index" } thiserror = "2.0.0" imara-diff = { version = "0.1.7" } bstr = { version = "1.5.0", default-features = false } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } document-features = { version = "0.2.0", optional = true } [dev-dependencies] gix-testtools = { path = "../tests/tools" } gix-odb = { path = "../gix-odb" } gix-utils = { version = "^0.1.12", path = "../gix-utils" } termtree = "0.5.1" pretty_assertions = "1.4.0" [package.metadata.docs.rs] all-features = true features = ["document-features"] gix-merge-0.2.0/LICENSE-APACHE000064400000000000000000000247461046102023000134500ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. gix-merge-0.2.0/LICENSE-MIT000064400000000000000000000017771046102023000131570ustar 00000000000000Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. gix-merge-0.2.0/src/blob/builtin_driver/binary.rs000064400000000000000000000031711046102023000200710ustar 00000000000000/// What to do when having to pick a side to resolve a conflict. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum ResolveWith { /// Chose the ancestor to resolve a conflict. Ancestor, /// Chose our side to resolve a conflict. Ours, /// Chose their side to resolve a conflict. Theirs, } /// Tell the caller of [`merge()`](function::merge) which side was picked. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum Pick { /// Chose the ancestor. Ancestor, /// Chose our side. Ours, /// Chose their side. Theirs, } pub(super) mod function { use crate::blob::builtin_driver::binary::{Pick, ResolveWith}; use crate::blob::Resolution; /// As this algorithm doesn't look at the actual data, it returns a choice solely based on logic. /// This also means that the caller has to assure this only gets called if the input *doesn't* match. /// /// It always results in a conflict with `current` being picked unless `on_conflict` is not `None`, /// which is when we always return [`Resolution::CompleteWithAutoResolvedConflict`]. pub fn merge(on_conflict: Option) -> (Pick, Resolution) { match on_conflict { None => (Pick::Ours, Resolution::Conflict), Some(resolve) => ( match resolve { ResolveWith::Ours => Pick::Ours, ResolveWith::Theirs => Pick::Theirs, ResolveWith::Ancestor => Pick::Ancestor, }, Resolution::CompleteWithAutoResolvedConflict, ), } } } gix-merge-0.2.0/src/blob/builtin_driver/mod.rs000064400000000000000000000014621046102023000173650ustar 00000000000000use crate::blob::BuiltinDriver; impl BuiltinDriver { /// Return the name of this instance. pub fn as_str(&self) -> &str { match self { BuiltinDriver::Text => "text", BuiltinDriver::Binary => "binary", BuiltinDriver::Union => "union", } } /// Get all available built-in drivers. pub fn all() -> &'static [Self] { &[BuiltinDriver::Text, BuiltinDriver::Binary, BuiltinDriver::Union] } /// Try to match one of our variants to `name`, case-sensitive, and return its instance. pub fn by_name(name: &str) -> Option { Self::all().iter().find(|variant| variant.as_str() == name).copied() } } /// pub mod binary; pub use binary::function::merge as binary; /// pub mod text; pub use text::function::merge as text; gix-merge-0.2.0/src/blob/builtin_driver/text/function.rs000064400000000000000000000310431046102023000214150ustar 00000000000000use crate::blob::builtin_driver::text::utils::{ assure_ends_with_nl, contains_lines, detect_line_ending, detect_line_ending_or_nl, fill_ancestor, hunks_differ_in_diff3, take_intersecting, tokens, write_ancestor, write_conflict_marker, write_hunks, zealously_contract_hunks, CollectHunks, Hunk, Side, }; use crate::blob::builtin_driver::text::{Conflict, ConflictStyle, Labels, Options}; use crate::blob::Resolution; use std::ops::Range; /// Merge `current` and `other` with `ancestor` as base according to `opts`. /// /// Use `labels` to annotate conflict sections. /// /// `input` is for reusing memory for lists of tokens, but note that it grows indefinitely /// while tokens for `current`, `ancestor` and `other` are added. /// Place the merged result in `out` (cleared before use) and return the resolution. /// /// # Important /// /// *The caller* is responsible for clearing `input`, otherwise tokens will accumulate. /// This idea is to save time if the input is known to be very similar. #[allow(clippy::too_many_arguments)] pub fn merge<'a>( out: &mut Vec, input: &mut imara_diff::intern::InternedInput<&'a [u8]>, Labels { ancestor: ancestor_label, current: current_label, other: other_label, }: Labels<'_>, current: &'a [u8], ancestor: &'a [u8], other: &'a [u8], Options { diff_algorithm, conflict, }: Options, ) -> Resolution { out.clear(); input.update_before(tokens(ancestor)); input.update_after(tokens(current)); let hunks = imara_diff::diff( diff_algorithm, input, CollectHunks { side: Side::Current, hunks: Default::default(), }, ); let current_tokens = std::mem::take(&mut input.after); input.update_after(tokens(other)); let mut hunks = imara_diff::diff( diff_algorithm, input, CollectHunks { side: Side::Other, hunks, }, ); if hunks.is_empty() { write_ancestor(input, 0, input.before.len(), out); return Resolution::Complete; } hunks.sort_by(|a, b| a.before.start.cmp(&b.before.start)); let mut hunks = hunks.into_iter().peekable(); let mut intersecting = Vec::new(); let mut ancestor_integrated_until = 0; let mut resolution = Resolution::Complete; let mut current_hunks = Vec::with_capacity(2); while take_intersecting(&mut hunks, &mut current_hunks, &mut intersecting).is_some() { if intersecting.is_empty() { let hunk = current_hunks.pop().expect("always pushed during intersection check"); write_ancestor(input, ancestor_integrated_until, hunk.before.start as usize, out); ancestor_integrated_until = hunk.before.end; write_hunks(std::slice::from_ref(&hunk), input, ¤t_tokens, out); continue; } let filled_hunks_side = current_hunks.first().expect("at least one hunk").side; { let filled_hunks_range = before_range_from_hunks(¤t_hunks); let intersecting_range = before_range_from_hunks(&intersecting); let extended_range = filled_hunks_range.start..intersecting_range.end.max(filled_hunks_range.end); fill_ancestor(&extended_range, &mut current_hunks); fill_ancestor(&extended_range, &mut intersecting); } match conflict { Conflict::Keep { style, marker_size } => { let marker_size = marker_size.get(); let (hunks_front_and_back, num_hunks_front) = match style { ConflictStyle::Merge | ConflictStyle::ZealousDiff3 => { zealously_contract_hunks(&mut current_hunks, &mut intersecting, input, ¤t_tokens) } ConflictStyle::Diff3 => (Vec::new(), 0), }; let (our_hunks, their_hunks) = match filled_hunks_side { Side::Current => (¤t_hunks, &intersecting), Side::Other => (&intersecting, ¤t_hunks), Side::Ancestor => { unreachable!("initial hunks are never ancestors") } }; let (front_hunks, back_hunks) = hunks_front_and_back.split_at(num_hunks_front); let first_hunk = first_hunk(front_hunks, our_hunks, their_hunks, back_hunks); let last_hunk = last_hunk(front_hunks, our_hunks, their_hunks, back_hunks); write_ancestor(input, ancestor_integrated_until, first_hunk.before.start as usize, out); write_hunks(front_hunks, input, ¤t_tokens, out); if their_hunks.is_empty() { write_hunks(our_hunks, input, ¤t_tokens, out); } else if our_hunks.is_empty() { write_hunks(their_hunks, input, ¤t_tokens, out); } else { // DEVIATION: this makes tests (mostly) pass, but probably is very different from what Git does. let hunk_storage; let nl = detect_line_ending( if front_hunks.is_empty() { hunk_storage = Hunk { before: ancestor_integrated_until..first_hunk.before.start, after: Default::default(), side: Side::Ancestor, }; std::slice::from_ref(&hunk_storage) } else { front_hunks }, input, ¤t_tokens, ) .or_else(|| detect_line_ending(our_hunks, input, ¤t_tokens)) .unwrap_or(b"\n".into()); match style { ConflictStyle::Merge => { if contains_lines(our_hunks) || contains_lines(their_hunks) { resolution = Resolution::Conflict; write_conflict_marker(out, b'<', current_label, marker_size, nl); write_hunks(our_hunks, input, ¤t_tokens, out); write_conflict_marker(out, b'=', None, marker_size, nl); write_hunks(their_hunks, input, ¤t_tokens, out); write_conflict_marker(out, b'>', other_label, marker_size, nl); } } ConflictStyle::Diff3 | ConflictStyle::ZealousDiff3 => { if contains_lines(our_hunks) || contains_lines(their_hunks) { if hunks_differ_in_diff3(style, our_hunks, their_hunks, input, ¤t_tokens) { resolution = Resolution::Conflict; write_conflict_marker(out, b'<', current_label, marker_size, nl); write_hunks(our_hunks, input, ¤t_tokens, out); let ancestor_hunk = Hunk { before: first_hunk.before.start..last_hunk.before.end, after: Default::default(), side: Side::Ancestor, }; let ancestor_hunk = std::slice::from_ref(&ancestor_hunk); let ancestor_nl = detect_line_ending_or_nl(ancestor_hunk, input, ¤t_tokens); write_conflict_marker(out, b'|', ancestor_label, marker_size, ancestor_nl); write_hunks(ancestor_hunk, input, ¤t_tokens, out); write_conflict_marker(out, b'=', None, marker_size, nl); write_hunks(their_hunks, input, ¤t_tokens, out); write_conflict_marker(out, b'>', other_label, marker_size, nl); } else { write_hunks(our_hunks, input, ¤t_tokens, out); } } } } } write_hunks(back_hunks, input, ¤t_tokens, out); ancestor_integrated_until = last_hunk.before.end; } Conflict::ResolveWithOurs | Conflict::ResolveWithTheirs => { let (our_hunks, their_hunks) = match filled_hunks_side { Side::Current => (¤t_hunks, &intersecting), Side::Other => (&intersecting, ¤t_hunks), Side::Ancestor => { unreachable!("initial hunks are never ancestors") } }; if hunks_differ_in_diff3(ConflictStyle::Diff3, our_hunks, their_hunks, input, ¤t_tokens) { resolution = Resolution::CompleteWithAutoResolvedConflict; } let hunks_to_write = if conflict == Conflict::ResolveWithOurs { our_hunks } else { their_hunks }; if let Some(first_hunk) = hunks_to_write.first() { write_ancestor(input, ancestor_integrated_until, first_hunk.before.start as usize, out); } write_hunks(hunks_to_write, input, ¤t_tokens, out); if let Some(last_hunk) = hunks_to_write.last() { ancestor_integrated_until = last_hunk.before.end; } } Conflict::ResolveWithUnion => { let (hunks_front_and_back, num_hunks_front) = zealously_contract_hunks(&mut current_hunks, &mut intersecting, input, ¤t_tokens); let (our_hunks, their_hunks) = match filled_hunks_side { Side::Current => (¤t_hunks, &intersecting), Side::Other => (&intersecting, ¤t_hunks), Side::Ancestor => { unreachable!("initial hunks are never ancestors") } }; if hunks_differ_in_diff3(ConflictStyle::Diff3, our_hunks, their_hunks, input, ¤t_tokens) { resolution = Resolution::CompleteWithAutoResolvedConflict; } let (front_hunks, back_hunks) = hunks_front_and_back.split_at(num_hunks_front); let first_hunk = first_hunk(front_hunks, our_hunks, their_hunks, back_hunks); write_ancestor(input, ancestor_integrated_until, first_hunk.before.start as usize, out); write_hunks(front_hunks, input, ¤t_tokens, out); assure_ends_with_nl(out, detect_line_ending_or_nl(front_hunks, input, ¤t_tokens)); write_hunks(our_hunks, input, ¤t_tokens, out); assure_ends_with_nl(out, detect_line_ending_or_nl(our_hunks, input, ¤t_tokens)); write_hunks(their_hunks, input, ¤t_tokens, out); if !back_hunks.is_empty() { assure_ends_with_nl(out, detect_line_ending_or_nl(their_hunks, input, ¤t_tokens)); } write_hunks(back_hunks, input, ¤t_tokens, out); let last_hunk = last_hunk(front_hunks, our_hunks, their_hunks, back_hunks); ancestor_integrated_until = last_hunk.before.end; } } } write_ancestor(input, ancestor_integrated_until, input.before.len(), out); resolution } fn first_hunk<'a>(front: &'a [Hunk], ours: &'a [Hunk], theirs: &'a [Hunk], back: &'a [Hunk]) -> &'a Hunk { front .first() .or(ours.first()) .or(theirs.first()) .or(back.first()) .expect("at least one hunk - we aborted if there are none anywhere") } /// Note that last-hunk could be [`first_hunk()`], so the hunk must only be used accordingly. fn last_hunk<'a>(front: &'a [Hunk], ours: &'a [Hunk], theirs: &'a [Hunk], back: &'a [Hunk]) -> &'a Hunk { back.last() .or(theirs.last()) .or(ours.last()) .or(front.last()) .expect("at least one hunk - we aborted if there are none anywhere") } fn before_range_from_hunks(hunks: &[Hunk]) -> Range { hunks .first() .zip(hunks.last()) .map(|(f, l)| f.before.start..l.before.end) .expect("at least one entry") } gix-merge-0.2.0/src/blob/builtin_driver/text/mod.rs000064400000000000000000000100461046102023000203470ustar 00000000000000use bstr::BStr; use std::num::NonZeroU8; /// The way the built-in [text driver](crate::blob::BuiltinDriver::Text) will express /// merge conflicts in the resulting file. #[derive(Default, Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum ConflictStyle { /// Only show the zealously minified conflicting lines of the local changes and the incoming (other) changes, /// hiding the base version entirely. /// /// ```text /// line1-changed-by-both /// <<<<<<< local /// line2-to-be-changed-in-incoming /// ======= /// line2-changed /// >>>>>>> incoming /// ``` #[default] Merge, /// Show non-minimized hunks of local changes, the base, and the incoming (other) changes. /// /// This mode does not hide any information. /// /// ```text /// <<<<<<< local /// line1-changed-by-both /// line2-to-be-changed-in-incoming /// ||||||| 9a8d80c /// line1-to-be-changed-by-both /// line2-to-be-changed-in-incoming /// ======= /// line1-changed-by-both /// line2-changed /// >>>>>>> incoming /// ``` Diff3, /// Like [`Diff3](Self::Diff3), but will show *minimized* hunks of local change and the incoming (other) changes, /// as well as non-minimized hunks of the base. /// /// ```text /// line1-changed-by-both /// <<<<<<< local /// line2-to-be-changed-in-incoming /// ||||||| 9a8d80c /// line1-to-be-changed-by-both /// line2-to-be-changed-in-incoming /// ======= /// line2-changed /// >>>>>>> incoming /// ``` ZealousDiff3, } /// The set of labels to annotate conflict markers with. /// /// That way it becomes clearer where the content of conflicts are originating from. #[derive(Default, Copy, Clone, Debug, Eq, PartialEq)] pub struct Labels<'a> { /// The label for the common *ancestor*. pub ancestor: Option<&'a BStr>, /// The label for the *current* (or *our*) side. pub current: Option<&'a BStr>, /// The label for the *other* (or *their*) side. pub other: Option<&'a BStr>, } /// Options for the builtin [text driver](crate::blob::BuiltinDriver::Text). #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Options { /// Determine of the diff will be performed. /// Defaults to [`imara_diff::Algorithm::Myers`]. pub diff_algorithm: imara_diff::Algorithm, /// Decide what to do to automatically resolve conflicts, or to keep them. pub conflict: Conflict, } impl Default for Options { fn default() -> Self { Options { conflict: Default::default(), diff_algorithm: imara_diff::Algorithm::Myers, } } } /// What to do to resolve a conflict. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum Conflict { /// Keep the conflict by marking it in the source file. Keep { /// How to visualize conflicts in merged files. style: ConflictStyle, /// The amount of markers to draw, defaults to 7, i.e. `<<<<<<<` marker_size: NonZeroU8, }, /// Chose our side to resolve a conflict. ResolveWithOurs, /// Chose their side to resolve a conflict. ResolveWithTheirs, /// Place our and their lines one after another, in any order ResolveWithUnion, } impl Conflict { /// The amount of conflict marker characters to print by default. // TODO: use NonZeroU8::new().unwrap() here once the MSRV supports it. pub const DEFAULT_MARKER_SIZE: u8 = 7; /// The amount of conflict markers to print if this instance contains them, or `None` otherwise pub fn marker_size(&self) -> Option { match self { Conflict::Keep { marker_size, .. } => Some(marker_size.get()), Conflict::ResolveWithOurs | Conflict::ResolveWithTheirs | Conflict::ResolveWithUnion => None, } } } impl Default for Conflict { fn default() -> Self { Conflict::Keep { style: Default::default(), marker_size: Conflict::DEFAULT_MARKER_SIZE.try_into().unwrap(), } } } pub(super) mod function; mod utils; gix-merge-0.2.0/src/blob/builtin_driver/text/utils.rs000064400000000000000000000425151046102023000207360ustar 00000000000000use crate::blob::builtin_driver::text::ConflictStyle; use bstr::{BStr, ByteSlice, ByteVec}; use std::iter::Peekable; use std::ops::Range; /// Used only when `diff3` is the conflict style as `zdiff3` automatically reduces hunks into nothing. /// Here we check if all hunks are the same. pub fn hunks_differ_in_diff3( style: ConflictStyle, a: &[Hunk], b: &[Hunk], input: &imara_diff::intern::InternedInput<&[u8]>, current_tokens: &[imara_diff::intern::Token], ) -> bool { if style != ConflictStyle::Diff3 { return true; } let tokens_for_hunk = |hunk: &Hunk| -> &[imara_diff::intern::Token] { &tokens_for_side(hunk.side, input, current_tokens)[hunk.after.start as usize..hunk.after.end as usize] }; a.iter() .flat_map(tokens_for_hunk) .ne(b.iter().flat_map(tokens_for_hunk)) } pub fn contains_lines(hunks: &[Hunk]) -> bool { hunks.iter().any(|h| !h.after.is_empty()) } /// ## Deviation /// /// This implementation definitely isn't the same as in Git, primarily because it seemed impossible /// to understand what's going on there without investing more time than it seemed worth. pub fn detect_line_ending( hunks: &[Hunk], input: &mut imara_diff::intern::InternedInput<&[u8]>, current_tokens: &[imara_diff::intern::Token], ) -> Option<&'static BStr> { fn is_eol_crlf( hunks: &[Hunk], input: &mut imara_diff::intern::InternedInput<&[u8]>, current_tokens: &[imara_diff::intern::Token], ) -> Option { let (range, side) = hunks.iter().rev().find_map(|h| { (!h.after.is_empty()) .then_some((&h.after, h.side)) .or((!h.before.is_empty()).then_some((&h.before, Side::Ancestor))) })?; let tokens = tokens_for_side(side, input, current_tokens); { let last_line = tokens .get(range.end as usize - 1) .map(|token| &input.interner[*token])?; if last_line.last() == Some(&b'\n') { return last_line.get(last_line.len().checked_sub(2)?).map(|c| *c == b'\r'); } } let second_to_last_line = tokens .get(range.end.checked_sub(2)? as usize) .map(|token| &input.interner[*token])?; second_to_last_line .get(second_to_last_line.len().checked_sub(2)?) .map(|c| *c == b'\r') } is_eol_crlf(hunks, input, current_tokens).map(|is_crlf| if is_crlf { b"\r\n".into() } else { b"\n".into() }) } pub fn detect_line_ending_or_nl( hunks: &[Hunk], input: &mut imara_diff::intern::InternedInput<&[u8]>, current_tokens: &[imara_diff::intern::Token], ) -> &'static BStr { detect_line_ending(hunks, input, current_tokens).unwrap_or(b"\n".into()) } fn tokens_for_side<'a>( side: Side, input: &'a imara_diff::intern::InternedInput<&[u8]>, current_tokens: &'a [imara_diff::intern::Token], ) -> &'a [imara_diff::intern::Token] { match side { Side::Current => current_tokens, Side::Other => &input.after, Side::Ancestor => &input.before, } } pub fn assure_ends_with_nl(out: &mut Vec, nl: &BStr) { if !out.is_empty() && !out.ends_with(b"\n") { out.push_str(nl); } } pub fn write_conflict_marker(out: &mut Vec, marker: u8, label: Option<&BStr>, marker_size: u8, nl: &BStr) { assure_ends_with_nl(out, nl); out.extend(std::iter::repeat(marker).take(marker_size as usize)); if let Some(label) = label { out.push(b' '); out.extend_from_slice(label); } out.push_str(nl); } pub fn write_ancestor(input: &imara_diff::intern::InternedInput<&[u8]>, from: u32, to: usize, out: &mut Vec) { if to < from as usize { return; } if let Some(tokens) = input.before.get(from as usize..to) { write_tokens(&input.interner, tokens, out); } } /// Look at all hunks in `in_out` and fill in the ancestor in the range of `ancestor_range`. /// This is all based on knowing the ranges are sequences of tokens. pub fn fill_ancestor(Range { start, end }: &Range, in_out: &mut Vec) { fn is_nonzero(num: &u32) -> bool { *num > 0 } if in_out.is_empty() { return; } let first = &in_out[0]; let mut first_idx = 0; if let Some(lines_to_add) = first.before.start.checked_sub(*start).filter(is_nonzero) { in_out.insert(0, ancestor_hunk(*start, lines_to_add)); first_idx += 1; } let mut added_hunks = false; for (idx, next_idx) in (first_idx..in_out.len()).map(|idx| (idx, idx + 1)) { let Some(next_hunk) = in_out.get(next_idx) else { break }; let hunk = &in_out[idx]; if let Some(lines_to_add) = next_hunk.before.start.checked_sub(hunk.before.end).filter(is_nonzero) { in_out.push(ancestor_hunk(hunk.before.end, lines_to_add)); added_hunks = true; } } let in_out_len = in_out.len(); if added_hunks { in_out[first_idx..in_out_len].sort_by_key(|hunk| hunk.before.start); } let last = &in_out[in_out_len - 1]; if let Some(lines_to_add) = end.checked_sub(last.before.end).filter(is_nonzero) { in_out.push(ancestor_hunk(last.before.end, lines_to_add)); } } fn ancestor_hunk(start: u32, num_lines: u32) -> Hunk { let range = start..start + num_lines; Hunk { before: range.clone(), after: range, side: Side::Ancestor, } } /// Reduce the area of `a_hunks` and the hunks in `b_hunks` so that only those lines that are /// actually different remain. Note that we have to compare the resolved values, not only the tokens, /// so `current_tokens` is expected to be known to the `input` (and its `interner`). /// Hunks from all input arrays maybe removed in the process from the front and back, in case they /// are entirely equal to what's in `hunk`. Note also that `a_hunks` and `b_hunks` are treated to be consecutive, /// so [`fill_ancestor()`] must have been called beforehand, and are assumed to covert the same space in the /// ancestor buffer. /// Use `mode` to determine how hunks may be handled. /// /// Return a new vector of all the hunks that were removed from front and back, with partial hunks inserted, /// along with the amount of hunks that go front, with the remaining going towards the back. #[must_use] pub fn zealously_contract_hunks( a_hunks: &mut Vec, b_hunks: &mut Vec, input: &imara_diff::intern::InternedInput<&[u8]>, current_tokens: &[imara_diff::intern::Token], ) -> (Vec, usize) { let line_content = |token_idx: u32, side: Side| { let tokens = match side { Side::Current => current_tokens, Side::Other => &input.after, Side::Ancestor => &input.before, }; &input.interner[tokens[token_idx as usize]] }; let (mut last_a_hunk_idx, mut last_b_hunk_idx) = (0, 0); let (mut out, hunks_in_front) = { let (mut remove_leading_a_hunks_from, mut remove_leading_b_hunks_from) = (None, None); let (mut a_hunk_token_equal_till, mut b_hunk_token_equal_till) = (None, None); for ((a_token_idx, a_hunk_idx, a_hunk_side), (b_token_idx, b_hunk_idx, b_hunk_side)) in iterate_hunks(a_hunks).zip(iterate_hunks(b_hunks)) { let a_line = line_content(a_token_idx, a_hunk_side).as_bstr(); let b_line = line_content(b_token_idx, b_hunk_side).as_bstr(); if last_a_hunk_idx != a_hunk_idx { a_hunk_token_equal_till = None; last_a_hunk_idx = a_hunk_idx; } if last_b_hunk_idx != b_hunk_idx { b_hunk_token_equal_till = None; last_b_hunk_idx = b_hunk_idx; } if a_line == b_line { (remove_leading_a_hunks_from, remove_leading_b_hunks_from) = (Some(a_hunk_idx), Some(b_hunk_idx)); (a_hunk_token_equal_till, b_hunk_token_equal_till) = (Some(a_token_idx), Some(b_token_idx)); } else { break; } } let mut out = Vec::with_capacity(remove_leading_a_hunks_from.unwrap_or_else(|| { if a_hunk_token_equal_till.is_some() { 1 } else { 0 } })); truncate_hunks_from_from_front( a_hunks, remove_leading_a_hunks_from, a_hunk_token_equal_till, Some(&mut out), ); truncate_hunks_from_from_front(b_hunks, remove_leading_b_hunks_from, b_hunk_token_equal_till, None); let hunks_in_front = out.len(); (out, hunks_in_front) }; (last_a_hunk_idx, last_b_hunk_idx) = (0, 0); { let (mut remove_trailing_a_hunks_from, mut remove_trailing_b_hunks_from) = (None, None); let (mut a_hunk_token_equal_from, mut b_hunk_token_equal_from) = (None, None); for ((a_token_idx, a_hunk_idx, a_hunk_side), (b_token_idx, b_hunk_idx, b_hunk_side)) in iterate_hunks_rev(a_hunks).zip(iterate_hunks_rev(b_hunks)) { let a_line = line_content(a_token_idx, a_hunk_side).as_bstr(); let b_line = line_content(b_token_idx, b_hunk_side).as_bstr(); if last_a_hunk_idx != a_hunk_idx { a_hunk_token_equal_from = None; last_a_hunk_idx = a_hunk_idx; } if last_b_hunk_idx != b_hunk_idx { b_hunk_token_equal_from = None; last_b_hunk_idx = b_hunk_idx; } if a_line == b_line { (remove_trailing_a_hunks_from, remove_trailing_b_hunks_from) = (Some(a_hunk_idx), Some(b_hunk_idx)); (a_hunk_token_equal_from, b_hunk_token_equal_from) = (Some(a_token_idx), Some(b_token_idx)); } else { break; } } truncate_hunks_from_from_back( a_hunks, remove_trailing_a_hunks_from, a_hunk_token_equal_from, Some(&mut out), ); truncate_hunks_from_from_back(b_hunks, remove_trailing_b_hunks_from, b_hunk_token_equal_from, None); } (out, hunks_in_front) } fn range_by_side(hunk: &mut Hunk) -> &mut Range { match hunk.side { Side::Current | Side::Other => &mut hunk.after, Side::Ancestor => &mut hunk.before, } } fn truncate_hunks_from_from_front( hunks: &mut Vec, hunks_to_remove_until_idx: Option, hunk_token_equal_till: Option, mut out_hunks: Option<&mut Vec>, ) { let Some(hunks_to_remove_until_idx) = hunks_to_remove_until_idx else { assert!(hunk_token_equal_till.is_none()); return; }; let mut last_index_to_remove = Some(hunks_to_remove_until_idx); let hunk = &mut hunks[hunks_to_remove_until_idx]; let range = range_by_side(hunk); if let Some(hunk_token_equal_till) = hunk_token_equal_till { let orig_start = range.start; let new_start = hunk_token_equal_till + 1; range.start = new_start; if Range::::is_empty(range) { range.start = orig_start; } else if let Some(out) = out_hunks.as_deref_mut() { last_index_to_remove = hunks_to_remove_until_idx.checked_sub(1); let mut removed_hunk = hunk.clone(); let new_range = range_by_side(&mut removed_hunk); new_range.start = orig_start; new_range.end = new_start; out.push(removed_hunk); } else { last_index_to_remove = hunks_to_remove_until_idx.checked_sub(1); } } if let Some(last_index_to_remove) = last_index_to_remove { let mut current_idx = 0; hunks.retain(|hunk| { if current_idx > last_index_to_remove { true } else { current_idx += 1; if let Some(out) = out_hunks.as_deref_mut() { out.push(hunk.clone()); } false } }); } } fn truncate_hunks_from_from_back( hunks: &mut Vec, remove_trailing_hunks_from_idx: Option, hunk_token_equal_from: Option, mut out_hunks: Option<&mut Vec>, ) { let Some(mut remove_trailing_hunks_from_idx) = remove_trailing_hunks_from_idx else { assert!(hunk_token_equal_from.is_none()); return; }; let hunk = &mut hunks[remove_trailing_hunks_from_idx]; let range = range_by_side(hunk); if let Some(hunk_token_equal_from) = hunk_token_equal_from { let orig_end = range.end; let new_end = hunk_token_equal_from; range.end = new_end; if Range::::is_empty(range) { range.end = orig_end; } else if let Some(out) = out_hunks.as_deref_mut() { remove_trailing_hunks_from_idx += 1; let mut removed_hunk = hunk.clone(); let new_range = range_by_side(&mut removed_hunk); new_range.start = new_end; new_range.end = orig_end; out.push(removed_hunk); } else { remove_trailing_hunks_from_idx += 1; } } if let Some(out) = out_hunks { out.extend_from_slice(&hunks[remove_trailing_hunks_from_idx..]); } hunks.truncate(remove_trailing_hunks_from_idx); } /// Return an iterator over `(token_idx, hunk_idx, hunk_side)` from `hunks`. fn iterate_hunks(hunks: &[Hunk]) -> impl Iterator + '_ { hunks.iter().enumerate().flat_map(|(hunk_idx, hunk)| { match hunk.side { Side::Current | Side::Other => &hunk.after, Side::Ancestor => &hunk.before, } .clone() .map(move |idx| (idx, hunk_idx, hunk.side)) }) } /// Return a reverse iterator over `(token_idx, hunk_idx, hunk_side)` from `hunks`. fn iterate_hunks_rev(hunks: &[Hunk]) -> impl Iterator + '_ { hunks.iter().enumerate().rev().flat_map(|(hunk_idx, hunk)| { match hunk.side { Side::Current | Side::Other => &hunk.after, Side::Ancestor => &hunk.before, } .clone() .rev() .map(move |idx| (idx, hunk_idx, hunk.side)) }) } pub fn write_hunks( hunks: &[Hunk], input: &imara_diff::intern::InternedInput<&[u8]>, current_tokens: &[imara_diff::intern::Token], out: &mut Vec, ) { for hunk in hunks { let (tokens, range) = match hunk.side { Side::Current => (current_tokens, &hunk.after), Side::Other => (input.after.as_slice(), &hunk.after), Side::Ancestor => (input.before.as_slice(), &hunk.before), }; write_tokens(&input.interner, &tokens[usize_range(range)], out); } } fn usize_range(range: &Range) -> Range { range.start as usize..range.end as usize } fn write_tokens( interner: &imara_diff::intern::Interner<&[u8]>, tokens: &[imara_diff::intern::Token], out: &mut Vec, ) { for token in tokens { out.extend_from_slice(interner[*token]); } } /// Find all hunks in `iter` which aren't from the same side as `hunk` and intersect with it. /// Also put `hunk` into `input` so it's the first item, and possibly put more hunks of the side of `hunk` so /// `iter` doesn't have any overlapping hunks left. /// Return `true` if `intersecting` is non-empty after the operation, indicating overlapping hunks were found. pub fn take_intersecting( iter: &mut Peekable>, input: &mut Vec, intersecting: &mut Vec, ) -> Option<()> { input.clear(); input.push(iter.next()?); intersecting.clear(); fn left_overlaps_right(left: &Hunk, right: &Hunk) -> bool { left.side != right.side && (right.before.contains(&left.before.start) || (right.before.is_empty() && right.before.start == left.before.start)) } loop { let hunk = input.last().expect("just pushed"); while iter.peek().filter(|b_hunk| left_overlaps_right(b_hunk, hunk)).is_some() { intersecting.extend(iter.next()); } // The hunks that overlap might themselves overlap with a following hunk of the other side. // If so, split it so it doesn't overlap anymore. let mut found_more_intersections = false; while intersecting .last_mut() .zip(iter.peek_mut()) .filter(|(last_intersecting, candidate)| left_overlaps_right(candidate, last_intersecting)) .is_some() { input.extend(iter.next()); found_more_intersections = true; } if !found_more_intersections { break; } } Some(()) } pub fn tokens(input: &[u8]) -> imara_diff::sources::ByteLines<'_, true> { imara_diff::sources::byte_lines_with_terminator(input) } #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum Side { Current, Other, /// A special marker that is just used to be able to mix-in hunks that only point to the ancestor. /// Only `before` matters then. Ancestor, } #[derive(Debug, Clone)] pub struct Hunk { pub before: Range, pub after: Range, pub side: Side, } pub struct CollectHunks { pub hunks: Vec, pub side: Side, } impl imara_diff::Sink for CollectHunks { type Out = Vec; fn process_change(&mut self, before: Range, after: Range) { self.hunks.push(Hunk { before, after, side: self.side, }); } fn finish(self) -> Self::Out { self.hunks } } gix-merge-0.2.0/src/blob/mod.rs000064400000000000000000000167641046102023000143570ustar 00000000000000// TODO: remove this - only needed while &mut Vec isn't used. #![allow(clippy::ptr_arg)] use crate::blob::platform::{DriverChoice, ResourceRef}; use bstr::BString; use std::path::PathBuf; /// pub mod builtin_driver; /// pub mod pipeline; /// pub mod platform; /// Define if a merge is conflicted or not. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum Resolution { /// Everything could be resolved during the merge, and there was no conflict. Complete, /// Conflicts were resolved automatically, even thought the result is complete /// and free of conflict markers. /// This can only be the case for text-file content merges. CompleteWithAutoResolvedConflict, /// A conflict is still present in the form of conflict markers. Conflict, } /// A way to classify the side of a resource for merging. #[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)] pub enum ResourceKind { /// Our side of the state. CurrentOrOurs, /// Their side of the state. OtherOrTheirs, /// The state of the common base of both ours and theirs. CommonAncestorOrBase, } /// Define a built-in way of performing a three-way merge, including auto-resolution support. /// /// Some values are related to diffing, some are related to conversions. #[derive(Default, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum BuiltinDriver { /// Perform a merge between text-sources such that conflicts are marked according to /// `merge.conflictStyle` in the Git configuration. /// /// If any of the inputs, *base*, *ours* or *theirs* looks like non-text/binary, /// the [`Binary`](Self::Binary) driver will be used instead. /// /// Also see [`builtin_driver::text::ConflictStyle`]. #[default] Text, /// Merge 'unmergable' content by choosing *ours* or *theirs*, without performing /// an actual merge. /// /// Note that if the merge operation is for virtual ancestor (a merge for merge-bases), /// then *ours* will always be chosen. Binary, /// Merge text-sources and resolve conflicts by adding conflicting lines one after another, /// in random order, without adding conflict markers either. /// /// This can be useful for files that change a lot, but will remain usable merely by adding /// all changed lines. Union, } /// Define a driver program that performs a three-way merge. /// /// Some values are related to diffing, some are related to conversions. #[derive(Default, Debug, Clone, PartialEq, Eq)] pub struct Driver { /// The name of the driver, as referred to by `[merge "name"]` in the git configuration. pub name: BString, /// The human-readable version of `name`, only to be used for displaying driver-information to the user. pub display_name: BString, /// The command to execute to perform the merge entirely like ` %O %A %B %L %P %S %X %Y`. /// /// * **%O** /// - the common ancestor version, or *base*. /// * **%A** /// - the current version, or *ours*. /// * **%B** /// - the other version, or *theirs*. /// * **%L** /// - The conflict-marker size as positive number. /// * **%P** /// - The path in which the merged result would be stored, as workspace-relative path, of the current/ours side. /// * **%S** /// - The conflict-label for the common ancestor or *base*. /// * **%X** /// - The conflict-label for the current version or *ours*. /// * **%Y** /// - The conflict-label for the other version or *theirs*. /// /// Note that conflict-labels are behind the conflict markers, to annotate them. /// /// A typical invocation with all arguments substituted could then look like this: /// /// ```sh /// .merge_file_nR2Qs1 .merge_file_WYXCJe .merge_file_UWbzrm 7 file e2a2970 HEAD feature /// ``` /// /// The driver is expected to leave its version in the file at `%A`, by overwriting it. pub command: BString, /// If `true`, this is the `name` of the driver to use when a virtual-merge-base is created, as a merge of all /// available merge-bases if there are more than one. /// /// This value can also be special built-in drivers named `text`, `binary` or `union`. Note that user-defined /// drivers with the same name will be preferred over built-in ones, but only for files whose git attributes /// specified the driver by *name*. pub recursive: Option, } /// A conversion pipeline to take an object or path from what's stored in Git to what can be merged, while /// following the guidance of git-attributes at the respective path to learn how the merge should be performed. /// /// Depending on the source, different conversions are performed: /// /// * `worktree on disk` -> `object for storage in git` /// * `object` -> `possibly renormalized object` /// - Renormalization means that the `object` is converted to what would be checked out into the work-tree, /// just to turn it back into an object. #[derive(Clone)] pub struct Pipeline { /// A way to read data directly from the worktree. pub roots: pipeline::WorktreeRoots, /// A pipeline to convert objects from the worktree to Git, and also from Git to the worktree, and back to Git. pub filter: gix_filter::Pipeline, /// Options affecting the way we read files. pub options: pipeline::Options, /// A buffer to produce disk-accessible paths from worktree roots. path: PathBuf, } /// A utility for gathering and processing all state necessary to perform a three-way merge. /// /// It can re-use buffers if all three parts of participating in the merge are /// set repeatedly. #[derive(Clone)] pub struct Platform { /// The current version (ours). current: Option, /// The ancestor version (base). ancestor: Option, /// The other version (theirs). other: Option, /// A way to convert objects into a diff-able format. pub filter: Pipeline, /// A way to access `.gitattributes` pub attr_stack: gix_worktree::Stack, /// Further configuration that affects the merge. pub options: platform::Options, /// All available merge drivers. /// /// They are referenced in git-attributes by name, and we hand out indices into this array. drivers: Vec, /// Pre-configured attributes to obtain additional merge-related information. attrs: gix_filter::attributes::search::Outcome, /// The way we convert resources into mergeable states. pub filter_mode: pipeline::Mode, } /// The product of a [`prepare_merge()`](Platform::prepare_merge()) call to finally /// perform the merge and retrieve the merge results. #[derive(Copy, Clone)] pub struct PlatformRef<'parent> { /// The platform that hosts the resources, used to access drivers. pub(super) parent: &'parent Platform, /// The current or our side of the merge operation. pub current: ResourceRef<'parent>, /// The ancestor or base of the merge operation. pub ancestor: ResourceRef<'parent>, /// The other or their side of the merge operation. pub other: ResourceRef<'parent>, /// Which driver to use according to the resource's configuration, /// using the path of `current` to read git-attributes. pub driver: DriverChoice, /// Possibly processed options for use when performing the actual merge. /// /// They may be inspected before the merge, or altered at will. pub options: platform::merge::Options, } gix-merge-0.2.0/src/blob/pipeline.rs000064400000000000000000000374531046102023000154030ustar 00000000000000use super::{Pipeline, ResourceKind}; use bstr::BStr; use gix_filter::driver::apply::{Delay, MaybeDelayed}; use gix_filter::pipeline::convert::{ToGitOutcome, ToWorktreeOutcome}; use gix_object::tree::EntryKind; use std::io::Read; use std::path::{Path, PathBuf}; /// Options for use in a [`Pipeline`]. #[derive(Default, Clone, PartialEq, Eq, Debug, Hash, Ord, PartialOrd)] pub struct Options { /// The amount of bytes that an object has to reach before being treated as binary. /// These objects will not be queried, nor will their data be processed in any way. /// If `0`, no file is ever considered binary due to their size. /// /// Note that for files stored in `git`, what counts is their stored, decompressed size, /// thus `git-lfs` files would typically not be considered binary unless one explicitly sets /// them. /// However, if they are to be retrieved from the worktree, the worktree size is what matters, /// even though that also might be a `git-lfs` file which is small in Git. pub large_file_threshold_bytes: u64, } /// The specific way to convert a resource. #[derive(Default, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum Mode { /// Prepare resources as they are stored in `git`. /// /// This is naturally the case when object-ids are used, but a conversion is needed /// when data is read from a worktree. #[default] ToGit, /// For sources that are object-ids, convert them to what *would* be stored in the worktree, /// and back to what *would* be stored in Git. /// /// Sources that are located in a worktree are merely converted to what *would* be stored in Git. /// /// This is useful to prevent merge conflicts due to inconcistent whitespace. Renormalize, } /// A way to access roots for different kinds of resources that are possibly located and accessible in a worktree. #[derive(Clone, Debug, Default)] pub struct WorktreeRoots { /// The worktree root where the current (or our) version of the resource is present. pub current_root: Option, /// The worktree root where the other (or their) version of the resource is present. pub other_root: Option, /// The worktree root where containing the resource of the common ancestor of our and their version. pub common_ancestor_root: Option, } impl WorktreeRoots { /// Return the root path for the given `kind` pub fn by_kind(&self, kind: ResourceKind) -> Option<&Path> { match kind { ResourceKind::CurrentOrOurs => self.current_root.as_deref(), ResourceKind::CommonAncestorOrBase => self.common_ancestor_root.as_deref(), ResourceKind::OtherOrTheirs => self.other_root.as_deref(), } } /// Return `true` if all worktree roots are unset. pub fn is_unset(&self) -> bool { self.current_root.is_none() && self.other_root.is_none() && self.common_ancestor_root.is_none() } } /// Lifecycle impl Pipeline { /// Create a new instance of a pipeline which produces blobs suitable for merging. /// /// `roots` allow to read worktree files directly, and `worktree_filter` is used /// to transform object database data directly. /// `options` are used to further configure the way we act. pub fn new(roots: WorktreeRoots, worktree_filter: gix_filter::Pipeline, options: Options) -> Self { Pipeline { roots, filter: worktree_filter, options, path: Default::default(), } } } /// Access impl Pipeline {} /// Data as returned by [`Pipeline::convert_to_mergeable()`]. #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug)] pub enum Data { /// The data to use for merging was written into the buffer that was passed during the call to [`Pipeline::convert_to_mergeable()`]. Buffer, /// The file or blob is above the big-file threshold and cannot be processed. /// /// In this state, the file cannot be merged. TooLarge { /// The size of the object prior to performing any filtering or as it was found on disk. /// /// Note that technically, the size isn't always representative of the same 'state' of the /// content, as once it can be the size of the blob in git, and once it's the size of file /// in the worktree - both can differ a lot depending on filters. size: u64, }, } /// pub mod convert_to_mergeable { use std::collections::TryReserveError; use bstr::BString; use gix_object::tree::EntryKind; /// The error returned by [Pipeline::convert_to_mergeable()](super::Pipeline::convert_to_mergeable()). #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error("Entry at '{rela_path}' must be regular file or symlink, but was {actual:?}")] InvalidEntryKind { rela_path: BString, actual: EntryKind }, #[error("Entry at '{rela_path}' could not be read as symbolic link")] ReadLink { rela_path: BString, source: std::io::Error }, #[error("Entry at '{rela_path}' could not be opened for reading or read from")] OpenOrRead { rela_path: BString, source: std::io::Error }, #[error("Entry at '{rela_path}' could not be copied from a filter process to a memory buffer")] StreamCopy { rela_path: BString, source: std::io::Error }, #[error(transparent)] FindObject(#[from] gix_object::find::existing_object::Error), #[error(transparent)] ConvertToWorktree(#[from] gix_filter::pipeline::convert::to_worktree::Error), #[error(transparent)] ConvertToGit(#[from] gix_filter::pipeline::convert::to_git::Error), #[error("Memory allocation failed")] OutOfMemory(#[from] TryReserveError), } } /// Conversion impl Pipeline { /// Convert the object at `id`, `mode`, `rela_path` and `kind`, providing access to `attributes` and `objects`. /// The resulting merge-able data is written into `out`, if it's not too large. /// The returned [`Data`] contains information on how to use `out`, which will be cleared if it is `None`, indicating /// that no object was found at the location *on disk* - it's always an error to provide an object ID that doesn't exist /// in the object database. /// /// `attributes` must be returning the attributes at `rela_path` and is used for obtaining worktree filter settings, /// and `objects` must be usable if `kind` is a resource in the object database, /// i.e. if no worktree root is available. It's notable that if a worktree root is present for `kind`, /// then a `rela_path` is used to access it on disk. /// /// If `id` [is null](gix_hash::ObjectId::is_null()) or the file in question doesn't exist in the worktree in case /// [a root](WorktreeRoots) is present, then `out` will be left cleared and the output data will be `None`. /// This is useful to simplify the calling code as empty buffers signal that nothing is there. /// /// Note that `mode` is trusted, and we will not re-validate that the entry in the worktree actually is of that mode. /// Only blobs are allowed. /// /// Use `convert` to control what kind of the resource will be produced. #[allow(clippy::too_many_arguments)] pub fn convert_to_mergeable( &mut self, id: &gix_hash::oid, mode: EntryKind, rela_path: &BStr, kind: ResourceKind, attributes: &mut dyn FnMut(&BStr, &mut gix_filter::attributes::search::Outcome), objects: &dyn gix_object::FindObjectOrHeader, convert: Mode, out: &mut Vec, ) -> Result, convert_to_mergeable::Error> { if !matches!(mode, EntryKind::Blob | EntryKind::BlobExecutable) { return Err(convert_to_mergeable::Error::InvalidEntryKind { rela_path: rela_path.to_owned(), actual: mode, }); } out.clear(); match self.roots.by_kind(kind) { Some(root) => { self.path.clear(); self.path.push(root); self.path.push(gix_path::from_bstr(rela_path)); let size_in_bytes = (self.options.large_file_threshold_bytes > 0) .then(|| { none_if_missing(self.path.metadata().map(|md| md.len())).map_err(|err| { convert_to_mergeable::Error::OpenOrRead { rela_path: rela_path.to_owned(), source: err, } }) }) .transpose()?; let data = match size_in_bytes { Some(None) => None, // missing as identified by the size check Some(Some(size)) if size > self.options.large_file_threshold_bytes => Some(Data::TooLarge { size }), _ => { let file = none_if_missing(std::fs::File::open(&self.path)).map_err(|err| { convert_to_mergeable::Error::OpenOrRead { rela_path: rela_path.to_owned(), source: err, } })?; if let Some(file) = file { match convert { Mode::ToGit | Mode::Renormalize => { let res = self.filter.convert_to_git( file, gix_path::from_bstr(rela_path).as_ref(), attributes, &mut |buf| { if convert == Mode::Renormalize { Ok(None) } else { objects.try_find(id, buf).map(|obj| obj.map(|_| ())) } }, )?; match res { ToGitOutcome::Unchanged(mut file) => { file.read_to_end(out).map_err(|err| { convert_to_mergeable::Error::OpenOrRead { rela_path: rela_path.to_owned(), source: err, } })?; } ToGitOutcome::Process(mut stream) => { stream.read_to_end(out).map_err(|err| { convert_to_mergeable::Error::OpenOrRead { rela_path: rela_path.to_owned(), source: err, } })?; } ToGitOutcome::Buffer(buf) => { out.clear(); out.try_reserve(buf.len())?; out.extend_from_slice(buf); } } } } Some(Data::Buffer) } else { None } } }; Ok(data) } None => { let data = if id.is_null() { None } else { let header = objects .try_header(id) .map_err(gix_object::find::existing_object::Error::Find)? .ok_or_else(|| gix_object::find::existing_object::Error::NotFound { oid: id.to_owned() })?; let is_binary = self.options.large_file_threshold_bytes > 0 && header.size > self.options.large_file_threshold_bytes; let data = if is_binary { Data::TooLarge { size: header.size } } else { objects .try_find(id, out) .map_err(gix_object::find::existing_object::Error::Find)? .ok_or_else(|| gix_object::find::existing_object::Error::NotFound { oid: id.to_owned() })?; if convert == Mode::Renormalize { { let res = self .filter .convert_to_worktree(out, rela_path, attributes, Delay::Forbid)?; match res { ToWorktreeOutcome::Unchanged(_) => {} ToWorktreeOutcome::Buffer(src) => { out.clear(); out.try_reserve(src.len())?; out.extend_from_slice(src); } ToWorktreeOutcome::Process(MaybeDelayed::Immediate(mut stream)) => { std::io::copy(&mut stream, out).map_err(|err| { convert_to_mergeable::Error::StreamCopy { rela_path: rela_path.to_owned(), source: err, } })?; } ToWorktreeOutcome::Process(MaybeDelayed::Delayed(_)) => { unreachable!("we prohibit this") } }; } let res = self.filter.convert_to_git( &**out, &gix_path::from_bstr(rela_path), attributes, &mut |_buf| Ok(None), )?; match res { ToGitOutcome::Unchanged(_) => {} ToGitOutcome::Process(mut stream) => { stream .read_to_end(out) .map_err(|err| convert_to_mergeable::Error::OpenOrRead { rela_path: rela_path.to_owned(), source: err, })?; } ToGitOutcome::Buffer(buf) => { out.clear(); out.try_reserve(buf.len())?; out.extend_from_slice(buf); } } } Data::Buffer }; Some(data) }; Ok(data) } } } } fn none_if_missing(res: std::io::Result) -> std::io::Result> { match res { Ok(data) => Ok(Some(data)), Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(None), Err(err) => Err(err), } } gix-merge-0.2.0/src/blob/platform/merge.rs000064400000000000000000000537541046102023000165230ustar 00000000000000use crate::blob::{builtin_driver, PlatformRef, Resolution}; use std::io::Read; use std::path::PathBuf; /// Options for the use in the [`PlatformRef::merge()`] call. #[derive(Default, Copy, Clone, Debug, Eq, PartialEq)] pub struct Options { /// If `true`, the resources being merged are contained in a virtual ancestor, /// which is the case when merge bases are merged into one. /// This flag affects the choice of merge drivers. pub is_virtual_ancestor: bool, /// Determine how to resolve conflicts. If `None`, no conflict resolution is possible, and it picks a side. pub resolve_binary_with: Option, /// Options for the builtin [text driver](crate::blob::BuiltinDriver::Text). pub text: builtin_driver::text::Options, } /// The error returned by [`PlatformRef::merge()`]. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error(transparent)] PrepareExternalDriver(#[from] inner::prepare_external_driver::Error), #[error("Failed to launch external merge driver: {cmd}")] SpawnExternalDriver { cmd: String, source: std::io::Error }, #[error("External merge driver failed with non-zero exit status {status:?}: {cmd}")] ExternalDriverFailure { status: std::process::ExitStatus, cmd: String, }, #[error("IO failed when dealing with merge-driver output")] ExternalDriverIO(#[from] std::io::Error), } /// The product of a [`PlatformRef::prepare_external_driver()`] operation. /// /// This type allows to creation of [`std::process::Command`], ready to run, with `stderr` and `stdout` set to *inherit*, /// but `stdin` closed. /// It's expected to leave its result in the file substituted at `current` which is then supposed to be read back from there. // TODO: remove dead-code annotation #[allow(dead_code)] pub struct Command { /// The pre-configured command cmd: std::process::Command, /// A tempfile holding the *current* (ours) state of the resource. current: gix_tempfile::Handle, /// The path at which `current` is located, for reading the result back from later. current_path: PathBuf, /// A tempfile holding the *ancestor* (base) state of the resource. ancestor: gix_tempfile::Handle, /// A tempfile holding the *other* (their) state of the resource. other: gix_tempfile::Handle, } // Just to keep things here but move them a level up later. pub(super) mod inner { /// pub mod prepare_external_driver { use crate::blob::builtin_driver::text::Conflict; use crate::blob::platform::{merge, DriverChoice}; use crate::blob::{builtin_driver, BuiltinDriver, Driver, PlatformRef, ResourceKind}; use bstr::{BString, ByteVec}; use gix_tempfile::{AutoRemove, ContainingDirectory}; use std::io::Write; use std::ops::{Deref, DerefMut}; use std::path::{Path, PathBuf}; use std::process::Stdio; /// The error returned by [PlatformRef::prepare_external_driver()](PlatformRef::prepare_external_driver()). #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error("The resource of kind {kind:?} was too large to be processed")] ResourceTooLarge { kind: ResourceKind }, #[error( "Tempfile to store content of '{rela_path}' ({kind:?}) for passing to external merge command could not be created" )] CreateTempfile { rela_path: BString, kind: ResourceKind, source: std::io::Error, }, #[error( "Could not write content of '{rela_path}' ({kind:?}) to tempfile for passing to external merge command" )] WriteTempfile { rela_path: BString, kind: ResourceKind, source: std::io::Error, }, } /// Plumbing impl<'parent> PlatformRef<'parent> { /// Given `merge_command` and `context`, typically obtained from git-configuration, and the currently set merge-resources, /// prepare the invocation and temporary files needed to launch it according to protocol. /// See the documentation of [`Driver::command`] for possible substitutions. /// /// Please note that this is an expensive operation this will always create three temporary files to hold all sides of the merge. /// /// The resulting command should be spawned, and when successful, [the result file can be opened](merge::Command::open_result_file) /// to read back the result into a suitable buffer. /// /// ### Deviation /// /// * We allow passing more context than Git would by taking a whole `context`, /// it's up to the caller to decide how much is filled. /// * Our tempfiles aren't suffixed `.merge_file_XXXXXX` with `X` replaced with characters for uniqueness. pub fn prepare_external_driver( &self, merge_command: BString, builtin_driver::text::Labels { ancestor, current, other, }: builtin_driver::text::Labels<'_>, context: gix_command::Context, ) -> Result { fn write_data( data: &[u8], ) -> std::io::Result<(gix_tempfile::Handle, PathBuf)> { let mut file = gix_tempfile::new(Path::new(""), ContainingDirectory::Exists, AutoRemove::Tempfile)?; file.write_all(data)?; let mut path = Default::default(); file.with_mut(|f| { f.path().clone_into(&mut path); })?; let file = file.close()?; Ok((file, path)) } let base = self.ancestor.data.as_slice().ok_or(Error::ResourceTooLarge { kind: ResourceKind::CommonAncestorOrBase, })?; let ours = self.current.data.as_slice().ok_or(Error::ResourceTooLarge { kind: ResourceKind::CurrentOrOurs, })?; let theirs = self.other.data.as_slice().ok_or(Error::ResourceTooLarge { kind: ResourceKind::OtherOrTheirs, })?; let (base_tmp, base_path) = write_data(base).map_err(|err| Error::CreateTempfile { rela_path: self.ancestor.rela_path.into(), kind: ResourceKind::CommonAncestorOrBase, source: err, })?; let (ours_tmp, ours_path) = write_data(ours).map_err(|err| Error::CreateTempfile { rela_path: self.current.rela_path.into(), kind: ResourceKind::CurrentOrOurs, source: err, })?; let (theirs_tmp, theirs_path) = write_data(theirs).map_err(|err| Error::CreateTempfile { rela_path: self.other.rela_path.into(), kind: ResourceKind::OtherOrTheirs, source: err, })?; let mut cmd = BString::from(Vec::with_capacity(merge_command.len())); let mut count = 0; for token in merge_command.split(|b| *b == b'%') { count += 1; let token = if count > 1 { match token.first() { Some(&b'O') => { cmd.push_str(gix_path::into_bstr(&base_path).as_ref()); &token[1..] } Some(&b'A') => { cmd.push_str(gix_path::into_bstr(&ours_path).as_ref()); &token[1..] } Some(&b'B') => { cmd.push_str(gix_path::into_bstr(&theirs_path).as_ref()); &token[1..] } Some(&b'L') => { let marker_size = self .options .text .conflict .marker_size() .unwrap_or(Conflict::DEFAULT_MARKER_SIZE); cmd.push_str(format!("{marker_size}")); &token[1..] } Some(&b'P') => { cmd.push_str(gix_quote::single(self.current.rela_path)); &token[1..] } Some(&b'S') => { cmd.push_str(gix_quote::single(ancestor.unwrap_or_default())); &token[1..] } Some(&b'X') => { cmd.push_str(gix_quote::single(current.unwrap_or_default())); &token[1..] } Some(&b'Y') => { cmd.push_str(gix_quote::single(other.unwrap_or_default())); &token[1..] } Some(_other) => { cmd.push(b'%'); token } None => b"%", } } else { token }; cmd.extend_from_slice(token); } Ok(merge::Command { cmd: gix_command::prepare(gix_path::from_bstring(cmd)) .with_context(context) .with_shell() .stdin(Stdio::null()) .stdout(Stdio::inherit()) .stderr(Stdio::inherit()) .into(), current: ours_tmp, current_path: ours_path, ancestor: base_tmp, other: theirs_tmp, }) } /// Return the configured driver program for use with [`Self::prepare_external_driver()`], or `Err` /// with the built-in driver to use instead. pub fn configured_driver(&self) -> Result<&'parent Driver, BuiltinDriver> { match self.driver { DriverChoice::BuiltIn(builtin) => Err(builtin), DriverChoice::Index(idx) => self.parent.drivers.get(idx).ok_or(BuiltinDriver::default()), } } } impl std::fmt::Debug for merge::Command { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.cmd.fmt(f) } } impl Deref for merge::Command { type Target = std::process::Command; fn deref(&self) -> &Self::Target { &self.cmd } } impl DerefMut for merge::Command { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.cmd } } impl merge::Command { /// Open the file which should have been written to the location of `ours`, to yield the result of the merge operation. /// Calling this makes sense only after the merge command has finished successfully. pub fn open_result_file(&self) -> std::io::Result { std::fs::File::open(&self.current_path) } } } /// pub mod builtin_merge { use crate::blob::platform::resource; use crate::blob::platform::resource::Data; use crate::blob::{builtin_driver, BuiltinDriver, PlatformRef, Resolution}; /// An identifier to tell us how a merge conflict was resolved by [builtin_merge](PlatformRef::builtin_merge). #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum Pick { /// In a binary merge, chose the ancestor. /// /// Use [`PlatformRef::buffer_by_pick()`] to retrieve it. Ancestor, /// In a binary merge, chose our side. /// /// Use [`PlatformRef::buffer_by_pick()`] to retrieve it. Ours, /// In a binary merge, chose their side. /// /// Use [`PlatformRef::buffer_by_pick()`] to retrieve it. Theirs, /// New data was produced with the result of the merge, to be found in the buffer that was passed to /// [builtin_merge()](PlatformRef::builtin_merge). /// This happens for any merge that isn't a binary merge. Buffer, } /// Plumbing impl<'parent> PlatformRef<'parent> { /// Perform the merge using the given `driver`, possibly placing the output in `out`. /// `input` can be used to keep tokens between runs, but note it will only grow in size unless cleared manually. /// Use `labels` to annotate conflict sections in case of a text-merge. /// Returns `None` if one of the buffers is too large, making a merge impossible. /// Note that if the *pick* wasn't [`Pick::Buffer`], then `out` will not have been cleared, /// and one has to take the data from the respective resource. /// /// If there is no buffer loaded as the resource is too big, we will automatically perform a binary merge /// which effectively chooses our side by default. pub fn builtin_merge( &self, driver: BuiltinDriver, out: &mut Vec, input: &mut imara_diff::intern::InternedInput<&'parent [u8]>, labels: builtin_driver::text::Labels<'_>, ) -> (Pick, Resolution) { let base = self.ancestor.data.as_slice().unwrap_or_default(); let ours = self.current.data.as_slice().unwrap_or_default(); let theirs = self.other.data.as_slice().unwrap_or_default(); let driver = if driver != BuiltinDriver::Binary && (is_binary_buf(self.ancestor.data) || is_binary_buf(self.other.data) || is_binary_buf(self.current.data)) { BuiltinDriver::Binary } else { driver }; match driver { BuiltinDriver::Text => { let resolution = builtin_driver::text(out, input, labels, ours, base, theirs, self.options.text); (Pick::Buffer, resolution) } BuiltinDriver::Binary => { // easier to reason about the 'split' compared to merging both conditions #[allow(clippy::if_same_then_else)] if !(self.current.id.is_null() || self.other.id.is_null()) && self.current.id == self.other.id { (Pick::Ours, Resolution::Complete) } else if (self.current.id.is_null() || self.other.id.is_null()) && ours == theirs { (Pick::Ours, Resolution::Complete) } else { let (pick, resolution) = builtin_driver::binary(self.options.resolve_binary_with); let pick = match pick { builtin_driver::binary::Pick::Ours => Pick::Ours, builtin_driver::binary::Pick::Theirs => Pick::Theirs, builtin_driver::binary::Pick::Ancestor => Pick::Ancestor, }; (pick, resolution) } } BuiltinDriver::Union => { let resolution = builtin_driver::text( out, input, labels, ours, base, theirs, builtin_driver::text::Options { conflict: builtin_driver::text::Conflict::ResolveWithUnion, ..self.options.text }, ); (Pick::Buffer, resolution) } } } } fn is_binary_buf(data: resource::Data<'_>) -> bool { match data { Data::Missing => false, Data::Buffer(buf) => { let buf = &buf[..buf.len().min(8000)]; buf.contains(&0) } Data::TooLarge { .. } => true, } } } } /// Convenience impl<'parent> PlatformRef<'parent> { /// Perform the merge, possibly invoking an external merge command, and store the result in `out`, returning `(pick, resolution)`. /// Note that `pick` indicates which resource the buffer should be taken from, unless it's [`Pick::Buffer`](inner::builtin_merge::Pick::Buffer) /// to indicate it's `out`. /// Use `labels` to annotate conflict sections in case of a text-merge. /// The merge is configured by `opts` and possible merge driver command executions are affected by `context`. /// /// Note that at this stage, none-existing input data will simply default to an empty buffer when running the actual merge algorithm. /// Too-large resources will result in an error. /// /// Generally, it is assumed that standard logic, like deletions of files, is handled before any of this is called, so we are lenient /// in terms of buffer handling to make it more useful in the face of missing local files. pub fn merge( &self, out: &mut Vec, labels: builtin_driver::text::Labels<'_>, context: &gix_command::Context, ) -> Result<(inner::builtin_merge::Pick, Resolution), Error> { match self.configured_driver() { Ok(driver) => { let mut cmd = self.prepare_external_driver(driver.command.clone(), labels, context.clone())?; let status = cmd.status().map_err(|err| Error::SpawnExternalDriver { cmd: format!("{:?}", cmd.cmd), source: err, })?; if !status.success() { return Err(Error::ExternalDriverFailure { cmd: format!("{:?}", cmd.cmd), status, }); } out.clear(); cmd.open_result_file()?.read_to_end(out)?; Ok((inner::builtin_merge::Pick::Buffer, Resolution::Complete)) } Err(builtin) => { let mut input = imara_diff::intern::InternedInput::new(&[][..], &[]); out.clear(); let (pick, resolution) = self.builtin_merge(builtin, out, &mut input, labels); Ok((pick, resolution)) } } } /// Using a `pick` obtained from [`merge()`](Self::merge), obtain the respective buffer suitable for reading or copying. /// Return `Ok(None)` if the `pick` corresponds to a buffer (that was written separately). /// Return `Err(())` if the buffer is *too large*, so it was never read. #[allow(clippy::result_unit_err)] pub fn buffer_by_pick(&self, pick: inner::builtin_merge::Pick) -> Result, ()> { match pick { inner::builtin_merge::Pick::Ancestor => self.ancestor.data.as_slice().map(Some).ok_or(()), inner::builtin_merge::Pick::Ours => self.current.data.as_slice().map(Some).ok_or(()), inner::builtin_merge::Pick::Theirs => self.other.data.as_slice().map(Some).ok_or(()), inner::builtin_merge::Pick::Buffer => Ok(None), } } /// Use `pick` to return the object id of the merged result, assuming that `buf` was passed as `out` to [merge()](Self::merge). /// In case of binary or large files, this will simply be the existing ID of the resource. /// In case of resources available in the object DB for binary merges, the object ID will be returned. /// If new content was produced due to a content merge, `buf` will be written out /// to the object database using `write_blob`. /// Beware that the returned ID could be `Ok(None)` if the underlying resource was loaded /// from the worktree *and* was too large so it was never loaded from disk. /// `Ok(None)` will also be returned if one of the resources was missing. /// `write_blob()` is used to turn buffers. pub fn id_by_pick( &self, pick: inner::builtin_merge::Pick, buf: &[u8], mut write_blob: impl FnMut(&[u8]) -> Result, ) -> Result, E> { let field = match pick { inner::builtin_merge::Pick::Ancestor => &self.ancestor, inner::builtin_merge::Pick::Ours => &self.current, inner::builtin_merge::Pick::Theirs => &self.other, inner::builtin_merge::Pick::Buffer => return write_blob(buf).map(Some), }; use crate::blob::platform::resource::Data; match field.data { Data::TooLarge { .. } | Data::Missing if !field.id.is_null() => Ok(Some(field.id.to_owned())), Data::TooLarge { .. } | Data::Missing => Ok(None), Data::Buffer(buf) if field.id.is_null() => write_blob(buf).map(Some), Data::Buffer(_) => Ok(Some(field.id.to_owned())), } } } gix-merge-0.2.0/src/blob/platform/mod.rs000064400000000000000000000113361046102023000161710ustar 00000000000000use crate::blob::{pipeline, BuiltinDriver, Pipeline, Platform}; use bstr::{BStr, BString}; use gix_filter::attributes; /// A stored value representing a resource that participates in a merge. #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug)] pub(super) struct Resource { /// The `id` of the value, or `null` if it's only living in a worktree. id: gix_hash::ObjectId, /// The repository-relative path where the resource lives in the tree. rela_path: BString, /// The outcome of converting a resource into a mergable format using [Pipeline::convert_to_mergeable()]. data: Option, /// The kind of the resource we are looking at. Only possible values are `Blob` and `BlobExecutable`. mode: gix_object::tree::EntryKind, /// A possibly empty buffer, depending on `conversion.data` which may indicate the data is considered binary /// or the resource doesn't exist. buffer: Vec, } /// A blob or executable ready to be merged in one way or another. #[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)] pub struct ResourceRef<'a> { /// The data itself, suitable for merging, and if the object or worktree item is present at all. pub data: resource::Data<'a>, /// The location of the resource, relative to the working tree. pub rela_path: &'a BStr, /// The id of the content as it would be stored in `git`, or `null` if the content doesn't exist anymore at /// `rela_path` or if it was never computed. This can happen with content read from the worktree, which /// after its 'to-git' conversion never had its hash computed. pub id: &'a gix_hash::oid, } /// Options for use in [`Platform::new()`]. #[derive(Default, Clone, PartialEq, Eq, Debug, Hash, Ord, PartialOrd)] pub struct Options { /// Define which driver to use by name if the `merge` attribute for a resource is unspecified. /// /// This is the value of the `merge.default` git configuration. pub default_driver: Option, } /// The selection of the driver to use by a resource obtained with [`Platform::prepare_merge()`]. /// /// If available, an index into the `drivers` field to access more diff-related information of the driver for items /// at the given path, as previously determined by git-attributes. /// /// * `merge` is set /// - Use the [`BuiltinDriver::Text`] /// * `-merge` is unset /// - Use the [`BuiltinDriver::Binary`] /// * `!merge` is unspecified /// - Use [`Options::default_driver`] or [`BuiltinDriver::Text`]. /// * `merge=name` /// - Search for a user-configured or built-in driver called `name`. /// - If not found, silently default to [`BuiltinDriver::Text`] /// /// Note that drivers are queried even if there is no object available. #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)] pub enum DriverChoice { /// Use the given built-in driver to perform the merge. BuiltIn(BuiltinDriver), /// Use the user-provided driver program using the index into [the platform drivers array](Platform::drivers()). Index(usize), } impl Default for DriverChoice { fn default() -> Self { DriverChoice::BuiltIn(Default::default()) } } /// Lifecycle impl Platform { /// Create a new instance with a way to `filter` data from the object database and turn it into something that is merge-able. /// `filter_mode` decides how to do that specifically. /// Use `attr_stack` to access attributes pertaining worktree filters and merge settings. /// `drivers` are the list of available merge drivers that individual paths can refer to by means of git attributes. /// `options` further configure the operation. pub fn new( filter: Pipeline, filter_mode: pipeline::Mode, attr_stack: gix_worktree::Stack, mut drivers: Vec, options: Options, ) -> Self { drivers.sort_by(|a, b| a.name.cmp(&b.name)); Platform { drivers, current: None, ancestor: None, other: None, filter, filter_mode, attr_stack, attrs: { let mut out = attributes::search::Outcome::default(); out.initialize_with_selection(&Default::default(), ["merge", "conflict-marker-size"]); out }, options, } } } /// Access impl Platform { /// Return all drivers that this instance was initialized with. /// /// They are sorted by [`name`](super::Driver::name) to support binary searches. pub fn drivers(&self) -> &[super::Driver] { &self.drivers } } /// pub mod set_resource; /// pub mod resource; /// pub mod merge; pub use merge::inner::{builtin_merge, prepare_external_driver}; /// pub mod prepare_merge; gix-merge-0.2.0/src/blob/platform/prepare_merge.rs000064400000000000000000000117031046102023000202250ustar 00000000000000use crate::blob::builtin_driver::text::Conflict; use crate::blob::platform::{merge, DriverChoice, ResourceRef}; use crate::blob::{BuiltinDriver, Platform, PlatformRef, ResourceKind}; use bstr::{BStr, BString, ByteSlice}; use gix_filter::attributes; use std::num::NonZeroU8; use std::str::FromStr; /// The error returned by [Platform::prepare_merge_state()](Platform::prepare_merge()). #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error("The 'current', 'ancestor' or 'other' resource for the merge operation were not set")] UnsetResource, #[error("Failed to obtain attributes for {kind:?} resource at '{rela_path}'")] Attributes { rela_path: BString, kind: ResourceKind, source: std::io::Error, }, } /// Preparation impl Platform { /// Prepare all state needed for performing a merge, using all [previously set](Self::set_resource()) resources. /// `objects` is used to possibly lookup attribute files when obtaining merge-related attributes. /// /// `options` are to be used when merging later, and they may be altered to implement correct binary merges /// in the present of [virtual merge bases](merge::Options::is_virtual_ancestor). /// /// Note that no additional validation is performed here to facilitate inspection, which means that /// resource buffers might still be too large to be merged, preventing a successful merge at a later time. pub fn prepare_merge( &mut self, objects: &impl gix_object::Find, mut options: merge::Options, ) -> Result, Error> { let current = self.current.as_ref().ok_or(Error::UnsetResource)?; let ancestor = self.ancestor.as_ref().ok_or(Error::UnsetResource)?; let other = self.other.as_ref().ok_or(Error::UnsetResource)?; let entry = self .attr_stack .at_entry(current.rela_path.as_bstr(), None, objects) .map_err(|err| Error::Attributes { source: err, kind: ResourceKind::CurrentOrOurs, rela_path: current.rela_path.clone(), })?; entry.matching_attributes(&mut self.attrs); let mut attrs = self.attrs.iter_selected(); let merge_attr = attrs.next().expect("pre-initialized with 'merge'"); let marker_size_attr = attrs.next().expect("pre-initialized with 'conflict-marker-size'"); let mut driver = match merge_attr.assignment.state { attributes::StateRef::Set => DriverChoice::BuiltIn(BuiltinDriver::Text), attributes::StateRef::Unset => DriverChoice::BuiltIn(BuiltinDriver::Binary), attributes::StateRef::Value(_) | attributes::StateRef::Unspecified => { let name = match merge_attr.assignment.state { attributes::StateRef::Value(name) => Some(name.as_bstr()), attributes::StateRef::Unspecified => { self.options.default_driver.as_ref().map(|name| name.as_bstr()) } _ => unreachable!("only value and unspecified are possible here"), }; self.find_driver_by_name(name) } }; if let attributes::StateRef::Value(value) = marker_size_attr.assignment.state { if let Some(value) = u8::from_str(value.as_bstr().to_str_lossy().as_ref()) .ok() .and_then(NonZeroU8::new) { match &mut options.text.conflict { Conflict::Keep { marker_size, .. } => *marker_size = value, Conflict::ResolveWithOurs | Conflict::ResolveWithTheirs | Conflict::ResolveWithUnion => {} } } } if let Some(recursive_driver_name) = match driver { DriverChoice::Index(idx) => self.drivers.get(idx), _ => None, } .and_then(|driver| driver.recursive.as_deref()) .filter(|_| options.is_virtual_ancestor) { driver = self.find_driver_by_name(Some(recursive_driver_name.as_bstr())); options.resolve_binary_with = Some(crate::blob::builtin_driver::binary::ResolveWith::Ours); } let out = PlatformRef { parent: self, driver, current: ResourceRef::new(current), ancestor: ResourceRef::new(ancestor), other: ResourceRef::new(other), options, }; Ok(out) } fn find_driver_by_name(&self, name: Option<&BStr>) -> DriverChoice { name.and_then(|name| { self.drivers .binary_search_by(|d| d.name.as_bstr().cmp(name)) .ok() .map(DriverChoice::Index) .or_else(|| { name.to_str() .ok() .and_then(BuiltinDriver::by_name) .map(DriverChoice::BuiltIn) }) }) .unwrap_or_default() } } gix-merge-0.2.0/src/blob/platform/resource.rs000064400000000000000000000035471046102023000172460ustar 00000000000000use crate::blob::{ pipeline, platform::{Resource, ResourceRef}, }; impl<'a> ResourceRef<'a> { pub(super) fn new(cache: &'a Resource) -> Self { ResourceRef { data: cache.data.map_or(Data::Missing, |data| match data { pipeline::Data::Buffer => Data::Buffer(&cache.buffer), pipeline::Data::TooLarge { size } => Data::TooLarge { size }, }), rela_path: cache.rela_path.as_ref(), id: &cache.id, } } } /// The data of a mergeable resource, as it could be determined and computed previously. #[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)] pub enum Data<'a> { /// The object is missing, either because it didn't exist in the working tree or because its `id` was null. /// Such data equals an empty buffer. Missing, /// The textual data as processed and ready for merging, i.e. suitable for storage in Git. Buffer(&'a [u8]), /// The file or blob is above the big-file threshold and cannot be processed. /// /// In this state, the file cannot be merged. TooLarge { /// The size of the object prior to performing any filtering or as it was found on disk. /// /// Note that technically, the size isn't always representative of the same 'state' of the /// content, as once it can be the size of the blob in Git, and once it's the size of file /// in the worktree. size: u64, }, } impl<'a> Data<'a> { /// Return ourselves as slice of bytes if this instance stores data. /// Note that missing data is interpreted as empty slice, to facilitate additions and deletions. pub fn as_slice(&self) -> Option<&'a [u8]> { match self { Data::Buffer(d) => Some(d), Data::Missing => Some(&[]), Data::TooLarge { .. } => None, } } } gix-merge-0.2.0/src/blob/platform/set_resource.rs000064400000000000000000000071761046102023000201230ustar 00000000000000use bstr::{BStr, BString}; use crate::blob::platform::Resource; use crate::blob::{pipeline, Platform, ResourceKind}; /// The error returned by [Platform::set_resource](Platform::set_resource). #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error("Can only diff blobs, not {mode:?}")] InvalidMode { mode: gix_object::tree::EntryKind }, #[error("Failed to read {kind:?} worktree data from '{rela_path}'")] Io { rela_path: BString, kind: ResourceKind, source: std::io::Error, }, #[error("Failed to obtain attributes for {kind:?} resource at '{rela_path}'")] Attributes { rela_path: BString, kind: ResourceKind, source: std::io::Error, }, #[error(transparent)] ConvertToMergeable(#[from] pipeline::convert_to_mergeable::Error), } /// Preparation impl Platform { /// Store enough information about a resource to eventually use it in a merge, where… /// /// * `id` is the hash of the resource. If it [is null](gix_hash::ObjectId::is_null()), it should either /// be a resource in the worktree, or it's considered a non-existing, deleted object. /// If an `id` is known, as the hash of the object as (would) be stored in `git`, then it should be provided /// for completeness. Note that it's not expected to be in `objects` if `rela_path` is set and a worktree-root /// is available for `kind`. /// * `mode` is the kind of object (only blobs and executables are allowed) /// * `rela_path` is the relative path as seen from the (work)tree root. /// * `kind` identifies the side of the merge this resource will be used for. /// * `objects` provides access to the object database in case the resource can't be read from a worktree. pub fn set_resource( &mut self, id: gix_hash::ObjectId, mode: gix_object::tree::EntryKind, rela_path: &BStr, kind: ResourceKind, objects: &impl gix_object::FindObjectOrHeader, ) -> Result<(), Error> { if !matches!( mode, gix_object::tree::EntryKind::Blob | gix_object::tree::EntryKind::BlobExecutable ) { return Err(Error::InvalidMode { mode }); } let entry = self .attr_stack .at_entry(rela_path, None, objects) .map_err(|err| Error::Attributes { source: err, kind, rela_path: rela_path.to_owned(), })?; let storage = match kind { ResourceKind::OtherOrTheirs => &mut self.other, ResourceKind::CommonAncestorOrBase => &mut self.ancestor, ResourceKind::CurrentOrOurs => &mut self.current, }; let mut buf_storage = Vec::new(); let out = self.filter.convert_to_mergeable( &id, mode, rela_path, kind, &mut |_, out| { let _ = entry.matching_attributes(out); }, objects, self.filter_mode, storage.as_mut().map_or(&mut buf_storage, |s| &mut s.buffer), )?; match storage { None => { *storage = Some(Resource { id, rela_path: rela_path.to_owned(), data: out, mode, buffer: buf_storage, }); } Some(storage) => { storage.id = id; storage.rela_path = rela_path.to_owned(); storage.data = out; storage.mode = mode; } }; Ok(()) } } gix-merge-0.2.0/src/commit/function.rs000064400000000000000000000127201046102023000157630ustar 00000000000000use crate::blob::builtin_driver; use crate::commit::{Error, Options}; use gix_object::FindExt; use std::borrow::Cow; /// Like [`tree()`](crate::tree()), but it takes only two commits, `our_commit` and `their_commit` to automatically /// compute the merge-bases among them. /// If there are multiple merge bases, these will be auto-merged into one, recursively, if /// [`allow_missing_merge_base`](Options::allow_missing_merge_base) is `true`. /// /// `labels` are names where [`current`](crate::blob::builtin_driver::text::Labels::current) is a name for `our_commit` /// and [`other`](crate::blob::builtin_driver::text::Labels::other) is a name for `their_commit`. /// If [`ancestor`](crate::blob::builtin_driver::text::Labels::ancestor) is unset, it will be set by us based on the /// merge-bases of `our_commit` and `their_commit`. /// /// The `graph` is used to find the merge-base between `our_commit` and `their_commit`, and can also act as cache /// to speed up subsequent merge-base queries. /// /// Use `abbreviate_hash(id)` to shorten the given `id` according to standard git shortening rules. It's used in case /// the ancestor-label isn't explicitly set so that the merge base label becomes the shortened `id`. /// Note that it's a dyn closure only to make it possible to recursively call this function in case of multiple merge-bases. /// /// `write_object` is used only if it's allowed to merge multiple merge-bases into one, and if there /// are multiple merge bases, and to write merged buffers as blobs. /// /// ### Performance /// /// Note that `objects` *should* have an object cache to greatly accelerate tree-retrieval. /// /// ### Notes /// /// When merging merge-bases recursively, the options are adjusted automatically to act like Git, i.e. merge binary /// blobs and resolve with *ours*, while resorting to using the base/ancestor in case of unresolvable conflicts. /// /// ### Deviation /// /// * It's known that certain conflicts around symbolic links can be auto-resolved. We don't have an option for this /// at all, yet, primarily as Git seems to not implement the *ours*/*theirs* choice in other places even though it /// reasonably could. So we leave it to the caller to continue processing the returned tree at will. #[allow(clippy::too_many_arguments)] pub fn commit<'objects>( our_commit: gix_hash::ObjectId, their_commit: gix_hash::ObjectId, labels: builtin_driver::text::Labels<'_>, graph: &mut gix_revwalk::Graph<'_, '_, gix_revwalk::graph::Commit>, diff_resource_cache: &mut gix_diff::blob::Platform, blob_merge: &mut crate::blob::Platform, objects: &'objects (impl gix_object::FindObjectOrHeader + gix_object::Write), abbreviate_hash: &mut dyn FnMut(&gix_hash::oid) -> String, options: Options, ) -> Result, Error> { let merge_bases = gix_revision::merge_base(our_commit, &[their_commit], graph)?; let mut virtual_merge_bases = Vec::new(); let mut state = gix_diff::tree::State::default(); let mut commit_to_tree = |commit_id: gix_hash::ObjectId| objects.find_commit(&commit_id, &mut state.buf1).map(|c| c.tree()); let (merge_base_tree_id, ancestor_name): (_, Cow<'_, str>) = match merge_bases.clone() { Some(base_commit) if base_commit.len() == 1 => { (commit_to_tree(base_commit[0])?, abbreviate_hash(&base_commit[0]).into()) } Some(mut base_commits) => { let virtual_base_tree = if options.use_first_merge_base { let first = base_commits.first().expect("if Some() there is at least one."); commit_to_tree(*first)? } else { let first = base_commits.pop().expect("at least two"); let second = base_commits.pop().expect("at least one left"); let out = crate::commit::virtual_merge_base( first, second, base_commits, graph, diff_resource_cache, blob_merge, objects, abbreviate_hash, options.tree_merge.clone(), )?; virtual_merge_bases = out.virtual_merge_bases; out.tree_id }; (virtual_base_tree, "merged common ancestors".into()) } None => { if options.allow_missing_merge_base { (gix_hash::ObjectId::empty_tree(our_commit.kind()), "empty tree".into()) } else { return Err(Error::NoMergeBase { our_commit_id: our_commit, their_commit_id: their_commit, }); } } }; let mut labels = labels; // TODO(borrowchk): this re-assignment shouldn't be needed. if labels.ancestor.is_none() { labels.ancestor = Some(ancestor_name.as_ref().into()); } let our_tree_id = objects.find_commit(&our_commit, &mut state.buf1)?.tree(); let their_tree_id = objects.find_commit(&their_commit, &mut state.buf1)?.tree(); let outcome = crate::tree( &merge_base_tree_id, &our_tree_id, &their_tree_id, labels, objects, |buf| objects.write_buf(gix_object::Kind::Blob, buf), &mut state, diff_resource_cache, blob_merge, options.tree_merge, )?; Ok(super::Outcome { tree_merge: outcome, merge_bases, merge_base_tree_id, virtual_merge_bases, }) } gix-merge-0.2.0/src/commit/mod.rs000064400000000000000000000055131046102023000147170ustar 00000000000000/// The error returned by [`commit()`](crate::commit()). #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error("Failed to obtain the merge base between the two commits to be merged")] MergeBase(#[from] gix_revision::merge_base::Error), #[error(transparent)] VirtualMergeBase(#[from] virtual_merge_base::Error), #[error(transparent)] MergeTree(#[from] crate::tree::Error), #[error("No common ancestor between {our_commit_id} and {their_commit_id}")] NoMergeBase { /// The commit on our side that was to be merged. our_commit_id: gix_hash::ObjectId, /// The commit on their side that was to be merged. their_commit_id: gix_hash::ObjectId, }, #[error("Could not find ancestor, our or their commit to extract tree from")] FindCommit(#[from] gix_object::find::existing_object::Error), } /// A way to configure [`commit()`](crate::commit()). #[derive(Default, Debug, Clone)] pub struct Options { /// If `true`, merging unrelated commits is allowed, with the merge-base being assumed as empty tree. pub allow_missing_merge_base: bool, /// Options to define how trees should be merged. pub tree_merge: crate::tree::Options, /// If `true`, do not merge multiple merge-bases into one. Instead, just use the first one. // TODO: test #[doc(alias = "no_recursive", alias = "git2")] pub use_first_merge_base: bool, } /// The result of [`commit()`](crate::commit()). #[derive(Clone)] pub struct Outcome<'a> { /// The outcome of the actual tree-merge. pub tree_merge: crate::tree::Outcome<'a>, /// The tree id of the base commit we used. This is either… /// * the single merge-base we found /// * the first of multiple merge-bases if [`use_first_merge_base`](Options::use_first_merge_base) was `true`. /// * the merged tree of all merge-bases, which then isn't linked to an actual commit. /// * an empty tree, if [`allow_missing_merge_base`](Options::allow_missing_merge_base) is enabled. pub merge_base_tree_id: gix_hash::ObjectId, /// The object ids of all the commits which were found to be merge-bases, or `None` if there was no merge-base. pub merge_bases: Option>, /// A list of virtual commits that were created to merge multiple merge-bases into one, the last one being /// the one we used as merge-base for the merge. /// As they are not reachable by anything they will be garbage collected, but knowing them provides options. /// Would be empty if no virtual commit was needed at all as there was only a single merge-base. /// Otherwise, the last commit id is the one with the `merge_base_tree_id`. pub virtual_merge_bases: Vec, } pub(super) mod function; /// pub mod virtual_merge_base; pub use virtual_merge_base::function::virtual_merge_base; gix-merge-0.2.0/src/commit/virtual_merge_base.rs000064400000000000000000000137441046102023000200040ustar 00000000000000/// The outcome produced by [`commit::merge_base()`](crate::commit::virtual_merge_base()). pub struct Outcome { /// The commit ids of all the virtual merge bases we have produced in the process of recursively merging the merge-bases. /// As they have been written to the object database, they are still available until they are garbage collected. /// The last one is the most recently produced and the one returned as `commit_id`. /// This is never empty. pub virtual_merge_bases: Vec, /// The id of the commit that was created to hold the merged tree. pub commit_id: gix_hash::ObjectId, /// The hash of the merged tree. pub tree_id: gix_hash::ObjectId, } /// The error returned by [`commit::merge_base()`](crate::commit::virtual_merge_base()). #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error(transparent)] MergeTree(#[from] crate::tree::Error), #[error("Failed to write tree for merged merge-base or virtual commit")] WriteObject(gix_object::write::Error), #[error( "Conflicts occurred when trying to resolve multiple merge-bases by merging them. This is most certainly a bug." )] VirtualMergeBaseConflict, #[error("Could not find commit to use as basis for a virtual commit")] FindCommit(#[from] gix_object::find::existing_object::Error), } pub(super) mod function { use super::Error; use crate::blob::builtin_driver; use crate::tree::{treat_as_unresolved, TreatAsUnresolved}; use gix_object::FindExt; /// Create a single virtual merge-base by merging `first_commit`, `second_commit` and `others` into one. /// Note that `first_commit` and `second_commit` are expected to have been popped off `others`, so `first_commit` /// was the last provided merge-base of function that provides multiple merge-bases for a pair of commits. /// /// The parameters `graph`, `diff_resource_cache`, `blob_merge`, `objects`, `abbreviate_hash` and `options` are passed /// directly to [`tree()`](crate::tree()) for merging the trees of two merge-bases at a time. /// Note that most of `options` are overwritten to match the requirements of a merge-base merge. #[allow(clippy::too_many_arguments)] pub fn virtual_merge_base<'objects>( first_commit: gix_hash::ObjectId, second_commit: gix_hash::ObjectId, mut others: Vec, graph: &mut gix_revwalk::Graph<'_, '_, gix_revwalk::graph::Commit>, diff_resource_cache: &mut gix_diff::blob::Platform, blob_merge: &mut crate::blob::Platform, objects: &'objects (impl gix_object::FindObjectOrHeader + gix_object::Write), abbreviate_hash: &mut dyn FnMut(&gix_hash::oid) -> String, mut options: crate::tree::Options, ) -> Result { let mut merged_commit_id = first_commit; others.push(second_commit); options.tree_conflicts = Some(crate::tree::ResolveWith::Ancestor); options.blob_merge.is_virtual_ancestor = true; options.blob_merge.text.conflict = builtin_driver::text::Conflict::ResolveWithOurs; let favor_ancestor = Some(builtin_driver::binary::ResolveWith::Ancestor); options.blob_merge.resolve_binary_with = favor_ancestor; options.symlink_conflicts = favor_ancestor; let labels = builtin_driver::text::Labels { current: Some("Temporary merge branch 1".into()), other: Some("Temporary merge branch 2".into()), ancestor: None, }; let mut virtual_merge_bases = Vec::new(); let mut tree_id = None; while let Some(next_commit_id) = others.pop() { options.marker_size_multiplier += 1; let mut out = crate::commit( merged_commit_id, next_commit_id, labels, graph, diff_resource_cache, blob_merge, objects, abbreviate_hash, crate::commit::Options { allow_missing_merge_base: false, tree_merge: options.clone(), use_first_merge_base: false, }, )?; // This shouldn't happen, but if for some buggy reason it does, we rather bail. if out.tree_merge.has_unresolved_conflicts(TreatAsUnresolved { content_merge: treat_as_unresolved::ContentMerge::Markers, tree_merge: treat_as_unresolved::TreeMerge::Undecidable, }) { return Err(Error::VirtualMergeBaseConflict.into()); } let merged_tree_id = out .tree_merge .tree .write(|tree| objects.write(tree)) .map_err(Error::WriteObject)?; tree_id = Some(merged_tree_id); merged_commit_id = create_virtual_commit(objects, merged_commit_id, next_commit_id, merged_tree_id)?; virtual_merge_bases.extend(out.virtual_merge_bases); virtual_merge_bases.push(merged_commit_id); } Ok(super::Outcome { virtual_merge_bases, commit_id: merged_commit_id, tree_id: tree_id.map_or_else( || { let mut buf = Vec::new(); objects.find_commit(&merged_commit_id, &mut buf).map(|c| c.tree()) }, Ok, )?, }) } fn create_virtual_commit( objects: &(impl gix_object::Find + gix_object::Write), parent_a: gix_hash::ObjectId, parent_b: gix_hash::ObjectId, tree_id: gix_hash::ObjectId, ) -> Result { let mut buf = Vec::new(); let mut commit: gix_object::Commit = objects.find_commit(&parent_a, &mut buf)?.into(); commit.parents = vec![parent_a, parent_b].into(); commit.tree = tree_id; objects.write(&commit).map_err(Error::WriteObject) } } gix-merge-0.2.0/src/lib.rs000064400000000000000000000010131046102023000134050ustar 00000000000000//! Provide facilities to merge *blobs*, *trees* and *commits*. //! //! * [blob-merges](blob) look at file content. //! * [tree-merges](mod@tree) look at trees and merge them structurally, triggering blob-merges as needed. //! * [commit-merges](mod@commit) are like tree merges, but compute or create the merge-base on the fly. #![deny(rust_2018_idioms)] #![deny(missing_docs)] #![forbid(unsafe_code)] /// pub mod blob; /// pub mod commit; pub use commit::function::commit; /// pub mod tree; pub use tree::function::tree; gix-merge-0.2.0/src/tree/function.rs000064400000000000000000002267231046102023000154440ustar 00000000000000use crate::tree::utils::{ apply_change, perform_blob_merge, possibly_rewritten_location, rewrite_location_with_renamed_directory, to_components, track, unique_path_in_tree, ChangeList, ChangeListRef, PossibleConflict, TrackedChange, TreeNodes, }; use crate::tree::ConflictMapping::{Original, Swapped}; use crate::tree::{ Conflict, ConflictIndexEntry, ConflictIndexEntryPathHint, ConflictMapping, ContentMerge, Error, Options, Outcome, Resolution, ResolutionFailure, ResolveWith, }; use bstr::{BString, ByteSlice}; use gix_diff::tree::recorder::Location; use gix_diff::tree_with_rewrites::Change; use gix_hash::ObjectId; use gix_object::tree::{EntryKind, EntryMode}; use gix_object::{tree, FindExt}; use std::borrow::Cow; use std::convert::Infallible; /// Perform a merge between `our_tree` and `their_tree`, using `base_tree` as merge-base. /// Note that `base_tree` can be an empty tree to indicate 'no common ancestor between the two sides'. /// /// * `labels` are relevant for text-merges and will be shown in conflicts. /// * `objects` provides access to trees when diffing them. /// * `write_blob_to_odb(content) -> Result` writes newly merged content into the odb to obtain an id /// that will be used in merged trees. /// * `diff_state` is state used for diffing trees. /// * `diff_resource_cache` is used for similarity checks. /// * `blob_merge` is a pre-configured platform to merge any content. /// - Note that it shouldn't be allowed to read from the worktree, given that this is a tree-merge. /// * `options` are used to affect how the merge is performed. /// /// ### Unbiased (Ours x Theirs == Theirs x Ours) /// /// The algorithm is implemented so that the result is the same no matter how the sides are ordered. /// /// ### Differences to Merge-ORT /// /// Merge-ORT (Git) defines the desired outcomes where are merely mimicked here. The algorithms are different, and it's /// clear that Merge-ORT is significantly more elaborate and general. /// /// It also writes out trees once it's done with them in a form of reduction process, here an editor is used /// to keep only the changes, to be written by the caller who receives it as part of the result. /// This may use more memory in the worst case scenario, but in average *shouldn't* perform much worse due to the /// natural sparsity of the editor. /// /// Our rename-tracking also produces copy information, but we discard it and simply treat it like an addition. /// /// Finally, our algorithm will consider reasonable solutions to merge-conflicts as conflicts that are resolved, leaving /// only content with conflict markers as unresolved ones. /// /// ### Performance /// /// Note that `objects` *should* have an object cache to greatly accelerate tree-retrieval. #[allow(clippy::too_many_arguments)] pub fn tree<'objects, E>( base_tree: &gix_hash::oid, our_tree: &gix_hash::oid, their_tree: &gix_hash::oid, mut labels: crate::blob::builtin_driver::text::Labels<'_>, objects: &'objects impl gix_object::FindObjectOrHeader, mut write_blob_to_odb: impl FnMut(&[u8]) -> Result, diff_state: &mut gix_diff::tree::State, diff_resource_cache: &mut gix_diff::blob::Platform, blob_merge: &mut crate::blob::Platform, options: Options, ) -> Result, Error> where E: Into>, { let ours_needs_diff = base_tree != our_tree; let theirs_needs_diff = base_tree != their_tree; let _span = gix_trace::coarse!("gix_merge::tree", ?base_tree, ?our_tree, ?their_tree, ?labels); let (mut base_buf, mut side_buf) = (Vec::new(), Vec::new()); let ancestor_tree = objects.find_tree(base_tree, &mut base_buf)?; let mut editor = tree::Editor::new(ancestor_tree.to_owned(), objects, base_tree.kind()); let ancestor_tree = gix_object::TreeRefIter::from_bytes(&base_buf); let tree_conflicts = options.tree_conflicts; let mut our_changes = Vec::new(); if ours_needs_diff { let our_tree = objects.find_tree_iter(our_tree, &mut side_buf)?; gix_diff::tree_with_rewrites( ancestor_tree, our_tree, diff_resource_cache, diff_state, objects, |change| -> Result<_, Infallible> { track(change, &mut our_changes); Ok(gix_diff::tree_with_rewrites::Action::Continue) }, gix_diff::tree_with_rewrites::Options { location: Some(Location::Path), rewrites: options.rewrites, }, )?; } let mut our_tree = TreeNodes::new(); for (idx, change) in our_changes.iter().enumerate() { our_tree.track_change(&change.inner, idx); } let mut their_changes = Vec::new(); if theirs_needs_diff { let their_tree = objects.find_tree_iter(their_tree, &mut side_buf)?; gix_diff::tree_with_rewrites( ancestor_tree, their_tree, diff_resource_cache, diff_state, objects, |change| -> Result<_, Infallible> { track(change, &mut their_changes); Ok(gix_diff::tree_with_rewrites::Action::Continue) }, gix_diff::tree_with_rewrites::Options { location: Some(Location::Path), rewrites: options.rewrites, }, )?; } let mut their_tree = TreeNodes::new(); for (idx, change) in their_changes.iter().enumerate() { their_tree.track_change(&change.inner, idx); } let mut conflicts = Vec::new(); let mut failed_on_first_conflict = false; let mut should_fail_on_conflict = |mut conflict: Conflict| -> bool { if tree_conflicts.is_some() { if let Err(failure) = conflict.resolution { conflict.resolution = Ok(Resolution::Forced(failure)); } } if let Some(how) = options.fail_on_conflict { if conflict.resolution.is_err() || conflict.is_unresolved(how) { failed_on_first_conflict = true; } } conflicts.push(conflict); failed_on_first_conflict }; let ((mut our_changes, mut our_tree), (mut their_changes, mut their_tree)) = ((&mut our_changes, &mut our_tree), (&mut their_changes, &mut their_tree)); let mut outer_side = Original; if their_changes.is_empty() { ((our_changes, our_tree), (their_changes, their_tree)) = ((their_changes, their_tree), (our_changes, our_tree)); (labels.current, labels.other) = (labels.other, labels.current); outer_side = outer_side.swapped(); } #[derive(Debug)] enum MatchKind { /// A tree is supposed to be superseded by something else. EraseTree, /// A leaf node is superseded by a tree EraseLeaf, } 'outer: while their_changes.iter().rev().any(|c| !c.was_written) { let mut segment_start = 0; let mut last_seen_len = their_changes.len(); while segment_start != last_seen_len { for theirs_idx in segment_start..last_seen_len { // `their` can be a tree, and it could be used to efficiently prune child-changes as these // trees are always rewrites with parent ids (of course we validate), so child-changes could be handled // quickly. However, for now the benefit of having these trees is to have them as part of the match-tree // on *our* side so that it's clear that we passed a renamed directory (by identity). let TrackedChange { inner: theirs, was_written, needs_tree_insertion, rewritten_location, } = &their_changes[theirs_idx]; if theirs.entry_mode().is_tree() || *was_written { continue; } if needs_tree_insertion.is_some() { their_tree.insert(theirs, theirs_idx); } match our_tree .check_conflict( rewritten_location .as_ref() .map_or_else(|| theirs.source_location(), |t| t.0.as_bstr()), ) .filter(|ours| { ours.change_idx() .zip(needs_tree_insertion.flatten()) .map_or(true, |(ours_idx, ignore_idx)| ours_idx != ignore_idx) && our_tree.is_not_same_change_in_possible_conflict(theirs, ours, our_changes) }) { None => { if let Some((rewritten_location, ours_idx)) = rewritten_location { // `no_entry` to the index because that's not a conflict at all, // but somewhat advanced rename tracking. if should_fail_on_conflict(Conflict::with_resolution( Resolution::SourceLocationAffectedByRename { final_location: rewritten_location.to_owned(), }, (&our_changes[*ours_idx].inner, theirs, Original, outer_side), [None, None, None], )) { break 'outer; }; editor.remove(to_components(theirs.location()))?; } apply_change(&mut editor, theirs, rewritten_location.as_ref().map(|t| &t.0))?; their_changes[theirs_idx].was_written = true; } Some(candidate) => { use crate::tree::utils::to_components_bstring_ref as toc; debug_assert!( rewritten_location.is_none(), "We should probably handle the case where a rewritten location is passed down here" ); let (ours_idx, match_kind) = match candidate { PossibleConflict::PassedRewrittenDirectory { change_idx } => { let ours = &our_changes[change_idx]; let location_after_passed_rename = rewrite_location_with_renamed_directory(theirs.location(), &ours.inner); if let Some(new_location) = location_after_passed_rename { their_tree.remove_existing_leaf(theirs.location()); push_deferred_with_rewrite( (theirs.clone(), Some(change_idx)), Some((new_location, change_idx)), their_changes, ); } else { apply_change(&mut editor, theirs, None)?; their_changes[theirs_idx].was_written = true; } their_changes[theirs_idx].was_written = true; continue; } PossibleConflict::TreeToNonTree { change_idx: Some(idx) } if matches!( our_changes[idx].inner, Change::Deletion { .. } | Change::Addition { .. } | Change::Rewrite { .. } ) => { (Some(idx), Some(MatchKind::EraseTree)) } PossibleConflict::NonTreeToTree { change_idx } => (change_idx, Some(MatchKind::EraseLeaf)), PossibleConflict::Match { change_idx: ours_idx } => (Some(ours_idx), None), _ => (None, None), }; let Some(ours_idx) = ours_idx else { let ours = match candidate { PossibleConflict::TreeToNonTree { change_idx, .. } | PossibleConflict::NonTreeToTree { change_idx, .. } => change_idx, PossibleConflict::Match { change_idx } | PossibleConflict::PassedRewrittenDirectory { change_idx } => Some(change_idx), } .map(|idx| &mut our_changes[idx]); if let Some(ours) = ours { gix_trace::debug!("Turning a case we could probably handle into a conflict for now. theirs: {theirs:#?} ours: {ours:#?} kind: {match_kind:?}"); let conflict = Conflict::unknown((&ours.inner, theirs, Original, outer_side)); if let Some(ResolveWith::Ours) = tree_conflicts { apply_our_resolution(&ours.inner, theirs, outer_side, &mut editor)?; *match outer_side { Original => &mut ours.was_written, Swapped => &mut their_changes[theirs_idx].was_written, } = true; } if should_fail_on_conflict(conflict) { break 'outer; }; } else if matches!(candidate, PossibleConflict::TreeToNonTree { .. }) { let (mode, id) = theirs.entry_mode_and_id(); let location = theirs.location(); let renamed_location = unique_path_in_tree( location.as_bstr(), &editor, their_tree, labels.other.unwrap_or_default(), )?; match tree_conflicts { None => { editor.upsert(toc(&renamed_location), mode.kind(), id.to_owned())?; } Some(ResolveWith::Ours) => { if outer_side.is_swapped() { editor.upsert(to_components(location), mode.kind(), id.to_owned())?; } } Some(ResolveWith::Ancestor) => { // we found no matching node of 'ours', so nothing to apply here. } } let conflict = Conflict::without_resolution( ResolutionFailure::OursDirectoryTheirsNonDirectoryTheirsRenamed { renamed_unique_path_of_theirs: renamed_location, }, (theirs, theirs, Original, outer_side), [ None, None, index_entry_at_path( &mode.kind().into(), &id.to_owned(), ConflictIndexEntryPathHint::RenamedOrTheirs, ), ], ); their_changes[theirs_idx].was_written = true; if should_fail_on_conflict(conflict) { break 'outer; }; } else if matches!(candidate, PossibleConflict::NonTreeToTree { .. }) { // We are writing on top of what was a file, a conflict we probably already saw and dealt with. let location = theirs.location(); let (mode, id) = theirs.entry_mode_and_id(); editor.upsert(to_components(location), mode.kind(), id.to_owned())?; their_changes[theirs_idx].was_written = true; } else { gix_trace::debug!("Couldn't figure out how to handle {match_kind:?} theirs: {theirs:#?} candidate: {candidate:#?}"); } continue; }; let ours = &our_changes[ours_idx].inner; match (ours, theirs) { ( Change::Modification { previous_id, previous_entry_mode, id: our_id, location: our_location, entry_mode: our_mode, .. }, Change::Rewrite { source_id: their_source_id, id: their_id, location: their_location, entry_mode: their_mode, source_location, .. }, ) | ( Change::Rewrite { source_id: their_source_id, id: their_id, location: their_location, entry_mode: their_mode, source_location, .. }, Change::Modification { previous_id, previous_entry_mode, id: our_id, location: our_location, entry_mode: our_mode, .. }, ) => { let side = if matches!(ours, Change::Modification { .. }) { Original } else { Swapped }; if let Some(merged_mode) = merge_modes(*our_mode, *their_mode) { debug_assert_eq!( previous_id, their_source_id, "both refer to the same base, so should always match" ); let their_rewritten_location = possibly_rewritten_location( pick_our_tree(side, our_tree, their_tree), their_location.as_ref(), pick_our_changes(side, our_changes, their_changes), ); let renamed_without_change = their_source_id == their_id; let (merged_blob_id, resolution) = if renamed_without_change { (*our_id, None) } else { let (our_location, our_id, our_mode, their_location, their_id, their_mode) = match side { Original => ( our_location, our_id, our_mode, their_location, their_id, their_mode, ), Swapped => ( their_location, their_id, their_mode, our_location, our_id, our_mode, ), }; let (merged_blob_id, resolution) = perform_blob_merge( labels, objects, blob_merge, &mut diff_state.buf1, &mut write_blob_to_odb, (our_location, *our_id, *our_mode), (their_location, *their_id, *their_mode), (source_location, *previous_id, *previous_entry_mode), (0, outer_side), &options, )?; (merged_blob_id, Some(resolution)) }; editor.remove(toc(our_location))?; pick_our_tree(side, our_tree, their_tree) .remove_existing_leaf(our_location.as_bstr()); let final_location = their_rewritten_location.clone(); let new_change = Change::Addition { location: their_rewritten_location.unwrap_or_else(|| their_location.to_owned()), relation: None, entry_mode: merged_mode, id: merged_blob_id, }; if should_fail_on_conflict(Conflict::with_resolution( Resolution::OursModifiedTheirsRenamedAndChangedThenRename { merged_mode: (merged_mode != *their_mode).then_some(merged_mode), merged_blob: resolution.map(|resolution| ContentMerge { resolution, merged_blob_id, }), final_location, }, (ours, theirs, side, outer_side), [ index_entry(previous_entry_mode, previous_id), index_entry(our_mode, our_id), index_entry(their_mode, their_id), ], )) { break 'outer; } // The other side gets the addition, not our side. push_deferred( (new_change, None), pick_our_changes_mut(side, their_changes, our_changes), ); } else { match tree_conflicts { None => { // keep both states - 'our_location' is the previous location as well. editor.upsert(toc(our_location), our_mode.kind(), *our_id)?; editor.upsert(toc(their_location), their_mode.kind(), *their_id)?; } Some(ResolveWith::Ours) => { editor.remove(toc(source_location))?; if side.to_global(outer_side).is_swapped() { editor.upsert(toc(their_location), their_mode.kind(), *their_id)?; } else { editor.upsert(toc(our_location), our_mode.kind(), *our_id)?; } } Some(ResolveWith::Ancestor) => {} } if should_fail_on_conflict(Conflict::without_resolution( ResolutionFailure::OursModifiedTheirsRenamedTypeMismatch, (ours, theirs, side, outer_side), [ index_entry_at_path( previous_entry_mode, previous_id, ConflictIndexEntryPathHint::RenamedOrTheirs, ), None, index_entry_at_path( their_mode, their_id, ConflictIndexEntryPathHint::RenamedOrTheirs, ), ], )) { break 'outer; } } } ( Change::Modification { location, previous_id, previous_entry_mode, entry_mode: our_mode, id: our_id, .. }, Change::Modification { entry_mode: their_mode, id: their_id, .. }, ) if !involves_submodule(our_mode, their_mode) && merge_modes(*our_mode, *their_mode).is_some() && our_id != their_id => { let (merged_blob_id, resolution) = perform_blob_merge( labels, objects, blob_merge, &mut diff_state.buf1, &mut write_blob_to_odb, (location, *our_id, *our_mode), (location, *their_id, *their_mode), (location, *previous_id, *previous_entry_mode), (0, outer_side), &options, )?; let merged_mode = merge_modes_prev(*our_mode, *their_mode, *previous_entry_mode) .expect("BUG: merge_modes() reports a valid mode, this one should do too"); editor.upsert(toc(location), merged_mode.kind(), merged_blob_id)?; if should_fail_on_conflict(Conflict::with_resolution( Resolution::OursModifiedTheirsModifiedThenBlobContentMerge { merged_blob: ContentMerge { resolution, merged_blob_id, }, }, (ours, theirs, Original, outer_side), [ index_entry(previous_entry_mode, previous_id), index_entry(our_mode, our_id), index_entry(their_mode, their_id), ], )) { break 'outer; }; } ( Change::Addition { location, entry_mode: our_mode, id: our_id, .. }, Change::Addition { entry_mode: their_mode, id: their_id, .. }, ) if !involves_submodule(our_mode, their_mode) && our_id != their_id => { let conflict = if let Some(merged_mode) = merge_modes(*our_mode, *their_mode) { let side = if our_mode == their_mode || matches!(our_mode.kind(), EntryKind::Blob) { outer_side } else { outer_side.swapped() }; let (merged_blob_id, resolution) = perform_blob_merge( labels, objects, blob_merge, &mut diff_state.buf1, &mut write_blob_to_odb, (location, *our_id, merged_mode), (location, *their_id, merged_mode), (location, their_id.kind().null(), merged_mode), (0, side), &options, )?; editor.upsert(toc(location), merged_mode.kind(), merged_blob_id)?; Conflict::with_resolution( Resolution::OursModifiedTheirsModifiedThenBlobContentMerge { merged_blob: ContentMerge { resolution, merged_blob_id, }, }, (ours, theirs, Original, outer_side), [None, index_entry(our_mode, our_id), index_entry(their_mode, their_id)], ) } else { // Actually this has a preference, as symlinks are always left in place with the other side renamed. let ( logical_side, label_of_side_to_be_moved, (our_mode, our_id, our_path_hint), (their_mode, their_id, their_path_hint), ) = if matches!(our_mode.kind(), EntryKind::Link | EntryKind::Tree) { ( Original, labels.other.unwrap_or_default(), (*our_mode, *our_id, ConflictIndexEntryPathHint::Current), (*their_mode, *their_id, ConflictIndexEntryPathHint::RenamedOrTheirs), ) } else { ( Swapped, labels.current.unwrap_or_default(), (*their_mode, *their_id, ConflictIndexEntryPathHint::RenamedOrTheirs), (*our_mode, *our_id, ConflictIndexEntryPathHint::Current), ) }; let tree_with_rename = pick_our_tree(logical_side, their_tree, our_tree); let renamed_location = unique_path_in_tree( location.as_bstr(), &editor, tree_with_rename, label_of_side_to_be_moved, )?; let mut conflict = Conflict::without_resolution( ResolutionFailure::OursAddedTheirsAddedTypeMismatch { their_unique_location: renamed_location.clone(), }, (ours, theirs, logical_side, outer_side), [ None, index_entry_at_path(&our_mode, &our_id, our_path_hint), index_entry_at_path(&their_mode, &their_id, their_path_hint), ], ); match tree_conflicts { None => { let new_change = Change::Addition { location: renamed_location, entry_mode: their_mode, id: their_id, relation: None, }; editor.upsert(toc(location), our_mode.kind(), our_id)?; tree_with_rename.remove_existing_leaf(location.as_bstr()); push_deferred( (new_change, None), pick_our_changes_mut(logical_side, their_changes, our_changes), ); } Some(resolve) => { conflict.entries = Default::default(); match resolve { ResolveWith::Ours => match outer_side { Original => { editor.upsert(toc(location), our_mode.kind(), our_id)?; } Swapped => { editor.upsert(toc(location), their_mode.kind(), their_id)?; } }, ResolveWith::Ancestor => { // Do nothing - this discards both sides. // Note that one of these adds might be the result of a rename, which // means we effectively loose the original and can't get it back as that information is degenerated. } } } } conflict }; if should_fail_on_conflict(conflict) { break 'outer; } } ( Change::Modification { location, entry_mode, id, previous_entry_mode, previous_id, }, Change::Deletion { .. }, ) | ( Change::Deletion { .. }, Change::Modification { location, entry_mode, id, previous_entry_mode, previous_id, }, ) => { let (label_of_side_to_be_moved, side) = if matches!(ours, Change::Modification { .. }) { (labels.current.unwrap_or_default(), Original) } else { (labels.other.unwrap_or_default(), Swapped) }; let deletion_prefaces_addition_of_directory = { let change_on_right = match side { Original => their_changes.get(theirs_idx + 1), Swapped => our_changes.get(ours_idx + 1), }; change_on_right .map(|change| { change.inner.entry_mode().is_tree() && change.inner.location() == location && matches!(change.inner, Change::Addition { .. }) }) .unwrap_or_default() }; let should_break = if deletion_prefaces_addition_of_directory { let entries = [ index_entry(previous_entry_mode, previous_id), index_entry(entry_mode, id), None, ]; match tree_conflicts { None => { let our_tree = pick_our_tree(side, our_tree, their_tree); let renamed_path = unique_path_in_tree( location.as_bstr(), &editor, our_tree, label_of_side_to_be_moved, )?; editor.remove(toc(location))?; our_tree.remove_existing_leaf(location.as_bstr()); let new_change = Change::Addition { location: renamed_path.clone(), relation: None, entry_mode: *entry_mode, id: *id, }; let should_break = should_fail_on_conflict(Conflict::without_resolution( ResolutionFailure::OursModifiedTheirsDirectoryThenOursRenamed { renamed_unique_path_to_modified_blob: renamed_path, }, (ours, theirs, side, outer_side), entries, )); // Since we move *our* side, our tree needs to be modified. push_deferred( (new_change, None), pick_our_changes_mut(side, our_changes, their_changes), ); should_break } Some(ResolveWith::Ours) => { match side.to_global(outer_side) { Original => { // ours is modification editor.upsert(toc(location), entry_mode.kind(), *id)?; } Swapped => { // ours is deletion editor.remove(toc(location))?; } } should_fail_on_conflict(Conflict::without_resolution( ResolutionFailure::OursModifiedTheirsDeleted, (ours, theirs, side, outer_side), entries, )) } Some(ResolveWith::Ancestor) => { should_fail_on_conflict(Conflict::without_resolution( ResolutionFailure::OursModifiedTheirsDeleted, (ours, theirs, side, outer_side), entries, )) } } } else { let entries = [ index_entry(previous_entry_mode, previous_id), index_entry(entry_mode, id), None, ]; match tree_conflicts { None => { editor.upsert(toc(location), entry_mode.kind(), *id)?; } Some(ResolveWith::Ours) => { let ours = match outer_side { Original => ours, Swapped => theirs, }; match ours { Change::Modification { .. } => { editor.upsert(toc(location), entry_mode.kind(), *id)?; } Change::Deletion { .. } => { editor.remove(toc(location))?; } _ => unreachable!("parent-match assures this"), }; } Some(ResolveWith::Ancestor) => {} }; should_fail_on_conflict(Conflict::without_resolution( ResolutionFailure::OursModifiedTheirsDeleted, (ours, theirs, side, outer_side), entries, )) }; if should_break { break 'outer; }; } ( Change::Modification { .. }, Change::Addition { location, entry_mode, id, .. }, ) if ours.location() != theirs.location() => { match tree_conflicts { None => { unreachable!("modification/deletion pair should prevent modification/addition from happening") } Some(ResolveWith::Ancestor) => {} Some(ResolveWith::Ours) => { if outer_side.is_swapped() { editor.upsert(toc(location), entry_mode.kind(), *id)?; } // we have already taken care of the 'root' of this - // everything that follows can safely be ignored } } } ( Change::Rewrite { source_location, source_entry_mode, source_id, entry_mode: our_mode, id: our_id, location: our_location, .. }, Change::Rewrite { entry_mode: their_mode, id: their_id, location: their_location, .. }, // NOTE: renames are only tracked among these kinds of types anyway, but we make sure. ) if our_mode.is_blob_or_symlink() && their_mode.is_blob_or_symlink() => { let (merged_blob_id, mut resolution) = if our_id == their_id { (*our_id, None) } else { let (id, resolution) = perform_blob_merge( labels, objects, blob_merge, &mut diff_state.buf1, &mut write_blob_to_odb, (our_location, *our_id, *our_mode), (their_location, *their_id, *their_mode), (source_location, *source_id, *source_entry_mode), (1, outer_side), &options, )?; (id, Some(resolution)) }; let merged_mode = merge_modes(*our_mode, *their_mode).expect("this case was assured earlier"); if matches!(tree_conflicts, None | Some(ResolveWith::Ours)) { editor.remove(toc(source_location))?; our_tree.remove_existing_leaf(source_location.as_bstr()); their_tree.remove_existing_leaf(source_location.as_bstr()); } let their_location = possibly_rewritten_location(our_tree, their_location.as_bstr(), our_changes) .map_or(Cow::Borrowed(their_location.as_bstr()), Cow::Owned); let our_location = possibly_rewritten_location(their_tree, our_location.as_bstr(), their_changes) .map_or(Cow::Borrowed(our_location.as_bstr()), Cow::Owned); let (our_addition, their_addition) = if our_location == their_location { ( None, Some(Change::Addition { location: our_location.into_owned(), relation: None, entry_mode: merged_mode, id: merged_blob_id, }), ) } else { if should_fail_on_conflict(Conflict::without_resolution( ResolutionFailure::OursRenamedTheirsRenamedDifferently { merged_blob: resolution.take().map(|resolution| ContentMerge { resolution, merged_blob_id, }), }, (ours, theirs, Original, outer_side), [ index_entry_at_path( source_entry_mode, source_id, ConflictIndexEntryPathHint::Source, ), index_entry_at_path( our_mode, &merged_blob_id, ConflictIndexEntryPathHint::Current, ), index_entry_at_path( their_mode, &merged_blob_id, ConflictIndexEntryPathHint::RenamedOrTheirs, ), ], )) { break 'outer; }; match tree_conflicts { None => { let our_addition = Change::Addition { location: our_location.into_owned(), relation: None, entry_mode: merged_mode, id: merged_blob_id, }; let their_addition = Change::Addition { location: their_location.into_owned(), relation: None, entry_mode: merged_mode, id: merged_blob_id, }; (Some(our_addition), Some(their_addition)) } Some(ResolveWith::Ancestor) => (None, None), Some(ResolveWith::Ours) => { let our_addition = Change::Addition { location: match outer_side { Original => our_location, Swapped => their_location, } .into_owned(), relation: None, entry_mode: merged_mode, id: merged_blob_id, }; (Some(our_addition), None) } } }; if let Some(resolution) = resolution { if should_fail_on_conflict(Conflict::with_resolution( Resolution::OursModifiedTheirsModifiedThenBlobContentMerge { merged_blob: ContentMerge { resolution, merged_blob_id, }, }, (ours, theirs, Original, outer_side), [ index_entry_at_path( source_entry_mode, source_id, ConflictIndexEntryPathHint::Source, ), index_entry_at_path( our_mode, &merged_blob_id, ConflictIndexEntryPathHint::Current, ), index_entry_at_path( their_mode, &merged_blob_id, ConflictIndexEntryPathHint::RenamedOrTheirs, ), ], )) { break 'outer; }; } if let Some(addition) = our_addition { push_deferred((addition, Some(ours_idx)), our_changes); } if let Some(addition) = their_addition { push_deferred((addition, Some(theirs_idx)), their_changes); } } ( Change::Deletion { .. }, Change::Rewrite { source_location, entry_mode: rewritten_mode, id: rewritten_id, location, .. }, ) | ( Change::Rewrite { source_location, entry_mode: rewritten_mode, id: rewritten_id, location, .. }, Change::Deletion { .. }, ) if !rewritten_mode.is_commit() => { let side = if matches!(ours, Change::Deletion { .. }) { Original } else { Swapped }; match tree_conflicts { None | Some(ResolveWith::Ours) => { editor.remove(toc(source_location))?; pick_our_tree(side, our_tree, their_tree) .remove_existing_leaf(source_location.as_bstr()); } Some(ResolveWith::Ancestor) => {} } let their_rewritten_location = possibly_rewritten_location( pick_our_tree(side, our_tree, their_tree), location.as_ref(), pick_our_changes(side, our_changes, their_changes), ) .unwrap_or_else(|| location.to_owned()); let our_addition = Change::Addition { location: their_rewritten_location, relation: None, entry_mode: *rewritten_mode, id: *rewritten_id, }; if should_fail_on_conflict(Conflict::without_resolution( ResolutionFailure::OursDeletedTheirsRenamed, (ours, theirs, side, outer_side), [ None, None, index_entry_at_path( rewritten_mode, rewritten_id, ConflictIndexEntryPathHint::RenamedOrTheirs, ), ], )) { break 'outer; }; let ours_is_rewrite = side.is_swapped(); if tree_conflicts.is_none() || (matches!(tree_conflicts, Some(ResolveWith::Ours)) && ours_is_rewrite) { push_deferred( (our_addition, None), pick_our_changes_mut(side, their_changes, our_changes), ); } } ( Change::Rewrite { source_location, source_entry_mode, source_id, entry_mode: our_mode, id: our_id, location, .. }, Change::Addition { id: their_id, entry_mode: their_mode, location: add_location, .. }, ) | ( Change::Addition { id: their_id, entry_mode: their_mode, location: add_location, .. }, Change::Rewrite { source_location, source_entry_mode, source_id, entry_mode: our_mode, id: our_id, location, .. }, ) if !involves_submodule(our_mode, their_mode) => { let side = if matches!(ours, Change::Rewrite { .. }) { Original } else { Swapped }; if let Some(merged_mode) = merge_modes(*our_mode, *their_mode) { let (merged_blob_id, resolution) = if our_id == their_id { (*our_id, None) } else { let (id, resolution) = perform_blob_merge( labels, objects, blob_merge, &mut diff_state.buf1, &mut write_blob_to_odb, (location, *our_id, *our_mode), (location, *their_id, *their_mode), (source_location, source_id.kind().null(), *source_entry_mode), (0, outer_side), &options, )?; (id, Some(resolution)) }; editor.remove(toc(source_location))?; pick_our_tree(side, our_tree, their_tree).remove_leaf(source_location.as_bstr()); if let Some(resolution) = resolution { if should_fail_on_conflict(Conflict::with_resolution( Resolution::OursModifiedTheirsModifiedThenBlobContentMerge { merged_blob: ContentMerge { resolution, merged_blob_id, }, }, (ours, theirs, Original, outer_side), [None, index_entry(our_mode, our_id), index_entry(their_mode, their_id)], )) { break 'outer; }; } // Because this constellation can only be found by the lookup tree, there is // no need to put it as addition, we know it's not going to intersect on the other side. editor.upsert(toc(location), merged_mode.kind(), merged_blob_id)?; } else { // We always remove the source from the tree - it might be re-added later. let ours_is_rename = tree_conflicts == Some(ResolveWith::Ours) && side == outer_side; let remove_rename_source = tree_conflicts.is_none() || ours_is_rename || add_location != source_location; if remove_rename_source { editor.remove(toc(source_location))?; pick_our_tree(side, our_tree, their_tree) .remove_leaf(source_location.as_bstr()); } let ( logical_side, label_of_side_to_be_moved, (our_mode, our_id, our_path_hint), (their_mode, their_id, their_path_hint), ) = if matches!(our_mode.kind(), EntryKind::Link | EntryKind::Tree) { ( Original, labels.other.unwrap_or_default(), (*our_mode, *our_id, ConflictIndexEntryPathHint::Current), (*their_mode, *their_id, ConflictIndexEntryPathHint::RenamedOrTheirs), ) } else { ( Swapped, labels.current.unwrap_or_default(), (*their_mode, *their_id, ConflictIndexEntryPathHint::RenamedOrTheirs), (*our_mode, *our_id, ConflictIndexEntryPathHint::Current), ) }; let tree_with_rename = pick_our_tree(logical_side, their_tree, our_tree); let renamed_location = unique_path_in_tree( location.as_bstr(), &editor, tree_with_rename, label_of_side_to_be_moved, )?; let upsert_rename_destination = tree_conflicts.is_none() || ours_is_rename; if upsert_rename_destination { editor.upsert(toc(location), our_mode.kind(), our_id)?; tree_with_rename.remove_existing_leaf(location.as_bstr()); } let conflict = Conflict::without_resolution( ResolutionFailure::OursAddedTheirsAddedTypeMismatch { their_unique_location: renamed_location.clone(), }, (ours, theirs, side, outer_side), [ None, index_entry_at_path(&our_mode, &our_id, our_path_hint), index_entry_at_path(&their_mode, &their_id, their_path_hint), ], ); if tree_conflicts.is_none() { let new_change_with_rename = Change::Addition { location: renamed_location, entry_mode: their_mode, id: their_id, relation: None, }; push_deferred( ( new_change_with_rename, Some(pick_idx(logical_side, theirs_idx, ours_idx)), ), pick_our_changes_mut(logical_side, their_changes, our_changes), ); } if should_fail_on_conflict(conflict) { break 'outer; } } } _unknown => { debug_assert!( match_kind.is_none() || (ours.location() == theirs.location() || ours.source_location() == theirs.source_location()), "BUG: right now it's not known to be possible to match changes from different paths: {match_kind:?} {candidate:?}" ); if let Some(ResolveWith::Ours) = tree_conflicts { apply_our_resolution(ours, theirs, outer_side, &mut editor)?; } if should_fail_on_conflict(Conflict::unknown((ours, theirs, Original, outer_side))) { break 'outer; }; } } their_changes[theirs_idx].was_written = true; our_changes[ours_idx].was_written = true; } } } segment_start = last_seen_len; last_seen_len = their_changes.len(); } ((our_changes, our_tree), (their_changes, their_tree)) = ((their_changes, their_tree), (our_changes, our_tree)); (labels.current, labels.other) = (labels.other, labels.current); outer_side = outer_side.swapped(); } Ok(Outcome { tree: editor, conflicts, failed_on_first_unresolved_conflict: failed_on_first_conflict, }) } fn apply_our_resolution( local_ours: &Change, local_theirs: &Change, outer_side: ConflictMapping, editor: &mut gix_object::tree::Editor<'_>, ) -> Result<(), Error> { let ours = match outer_side { Original => local_ours, Swapped => local_theirs, }; Ok(apply_change(editor, ours, None)?) } fn involves_submodule(a: &EntryMode, b: &EntryMode) -> bool { a.is_commit() || b.is_commit() } /// Allows equal modes or prefers executables bits in case of blobs /// /// Note that this is often not correct as the previous mode of each side should be taken into account so that: /// /// on | on = on /// off | off = off /// on | off || off | on = conflict fn merge_modes(a: EntryMode, b: EntryMode) -> Option { match (a.kind(), b.kind()) { (_, _) if a == b => Some(a), (EntryKind::BlobExecutable, EntryKind::BlobExecutable | EntryKind::Blob) | (EntryKind::Blob, EntryKind::BlobExecutable) => Some(EntryKind::BlobExecutable.into()), _ => None, } } /// Use this version if there is a single common `prev` value for both `a` and `b` to detect /// if the mode was turned on or off. fn merge_modes_prev(a: EntryMode, b: EntryMode, prev: EntryMode) -> Option { match (a.kind(), b.kind()) { (_, _) if a == b => Some(a), (a @ EntryKind::BlobExecutable, b @ (EntryKind::BlobExecutable | EntryKind::Blob)) | (a @ EntryKind::Blob, b @ EntryKind::BlobExecutable) => { let prev = prev.kind(); let changed = if a == prev { b } else { a }; Some( match (prev, changed) { (EntryKind::Blob, EntryKind::BlobExecutable) => EntryKind::BlobExecutable, (EntryKind::BlobExecutable, EntryKind::Blob) => EntryKind::Blob, _ => unreachable!("upper match already assured we only deal with blobs"), } .into(), ) } _ => None, } } fn push_deferred(change_and_idx: (Change, Option), changes: &mut ChangeList) { push_deferred_with_rewrite(change_and_idx, None, changes); } fn push_deferred_with_rewrite( (change, ours_idx): (Change, Option), new_location: Option<(BString, usize)>, changes: &mut ChangeList, ) { changes.push(TrackedChange { inner: change, was_written: false, needs_tree_insertion: Some(ours_idx), rewritten_location: new_location, }); } fn pick_our_tree<'a>(side: ConflictMapping, ours: &'a mut TreeNodes, theirs: &'a mut TreeNodes) -> &'a mut TreeNodes { match side { Original => ours, Swapped => theirs, } } fn pick_our_changes<'a>( side: ConflictMapping, ours: &'a ChangeListRef, theirs: &'a ChangeListRef, ) -> &'a ChangeListRef { match side { Original => ours, Swapped => theirs, } } fn pick_idx(side: ConflictMapping, ours: usize, theirs: usize) -> usize { match side { Original => ours, Swapped => theirs, } } fn pick_our_changes_mut<'a>( side: ConflictMapping, ours: &'a mut ChangeList, theirs: &'a mut ChangeList, ) -> &'a mut ChangeList { match side { Original => ours, Swapped => theirs, } } fn index_entry(mode: &gix_object::tree::EntryMode, id: &gix_hash::ObjectId) -> Option { Some(ConflictIndexEntry { mode: *mode, id: *id, path_hint: None, }) } fn index_entry_at_path( mode: &gix_object::tree::EntryMode, id: &gix_hash::ObjectId, hint: ConflictIndexEntryPathHint, ) -> Option { Some(ConflictIndexEntry { mode: *mode, id: *id, path_hint: Some(hint), }) } gix-merge-0.2.0/src/tree/mod.rs000064400000000000000000000777461046102023000144070ustar 00000000000000use bstr::BString; use gix_diff::tree_with_rewrites::Change; use gix_diff::Rewrites; /// The error returned by [`tree()`](crate::tree()). #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { #[error("Could not find ancestor, our or their tree to get started")] FindTree(#[from] gix_object::find::existing_object::Error), #[error("Could not find ancestor, our or their tree iterator to get started")] FindTreeIter(#[from] gix_object::find::existing_iter::Error), #[error("Failed to diff our side or their side")] DiffTree(#[from] gix_diff::tree_with_rewrites::Error), #[error("Could not apply merge result to base tree")] TreeEdit(#[from] gix_object::tree::editor::Error), #[error("Failed to load resource to prepare for blob merge")] BlobMergeSetResource(#[from] crate::blob::platform::set_resource::Error), #[error(transparent)] BlobMergePrepare(#[from] crate::blob::platform::prepare_merge::Error), #[error(transparent)] BlobMerge(#[from] crate::blob::platform::merge::Error), #[error("Failed to write merged blob content as blob to the object database")] WriteBlobToOdb(Box), #[error("The merge was performed, but the binary merge result couldn't be selected as it wasn't found")] MergeResourceNotFound, } /// The outcome produced by [`tree()`](crate::tree()). #[derive(Clone)] pub struct Outcome<'a> { /// The ready-made (but unwritten) *base* tree, including all non-conflicting changes, and the changes that had /// conflicts which could be resolved automatically. /// /// This means, if all of their changes were conflicting, this will be equivalent to the *base* tree. pub tree: gix_object::tree::Editor<'a>, /// The set of conflicts we encountered. Can be empty to indicate there was no conflict. /// Note that conflicts might have been auto-resolved, but they are listed here for completeness. /// Use [`has_unresolved_conflicts()`](Outcome::has_unresolved_conflicts()) to see if any action is needed /// before using [`tree`](Outcome::tree). pub conflicts: Vec, /// `true` if `conflicts` contains only a single [*unresolved* conflict](ResolutionFailure) in the last slot, but /// possibly more [resolved ones](Resolution) before that. /// This also makes this outcome a very partial merge that cannot be completed. /// Only set if [`fail_on_conflict`](Options::fail_on_conflict) is `true`. pub failed_on_first_unresolved_conflict: bool, } /// Determine what should be considered an unresolved conflict. #[derive(Default, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct TreatAsUnresolved { /// Determine which content merges should be considered unresolved. pub content_merge: treat_as_unresolved::ContentMerge, /// Determine which tree merges should be considered unresolved. pub tree_merge: treat_as_unresolved::TreeMerge, } /// pub mod treat_as_unresolved { use crate::tree::TreatAsUnresolved; /// Which kind of content merges should be considered unresolved? #[derive(Default, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum ContentMerge { /// Content merges that still show conflict markers. #[default] Markers, /// Content merges who would have conflicted if it wasn't for a /// [resolution strategy](crate::blob::builtin_driver::text::Conflict::ResolveWithOurs). ForcedResolution, } /// Which kind of tree merges should be considered unresolved? #[derive(Default, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum TreeMerge { /// All failed renames. Undecidable, /// All failed renames, and the ones where a tree item was renamed to avoid a clash. #[default] EvasiveRenames, /// All of `EvasiveRenames`, and tree merges that would have conflicted but which were resolved /// with a [resolution strategy](super::ResolveWith). ForcedResolution, } /// Instantiation/Presets impl TreatAsUnresolved { /// Return an instance with the highest sensitivity to what should be considered unresolved as it /// includes entries which have been resolved using a [merge strategy](super::ResolveWith). pub fn forced_resolution() -> Self { Self { content_merge: ContentMerge::ForcedResolution, tree_merge: TreeMerge::ForcedResolution, } } /// Return an instance that considers unresolved any conflict that Git would also consider unresolved. /// This is the same as the `default()` implementation. pub fn git() -> Self { Self::default() } /// Only undecidable tree merges and conflict markers are considered unresolved. /// This also means that renamed entries to make space for a conflicting one is considered acceptable, /// making this preset the most lenient. pub fn undecidable() -> Self { Self { content_merge: ContentMerge::Markers, tree_merge: TreeMerge::Undecidable, } } } } impl Outcome<'_> { /// Return `true` if there is any conflict that would still need to be resolved as they would yield undesirable trees. /// This is based on `how` to determine what should be considered unresolved. pub fn has_unresolved_conflicts(&self, how: TreatAsUnresolved) -> bool { self.conflicts.iter().any(|c| c.is_unresolved(how)) } /// Returns `true` if `index` changed as we applied conflicting stages to it, using `how` to determine if a /// conflict should be considered unresolved. /// `removal_mode` decides how unconflicted entries should be removed if they are superseded by /// their conflicted counterparts. /// It's important that `index` is at the state of [`Self::tree`]. /// /// Note that in practice, whenever there is a single [conflict](Conflict), this function will return `true`. pub fn index_changed_after_applying_conflicts( &self, index: &mut gix_index::State, how: TreatAsUnresolved, removal_mode: apply_index_entries::RemovalMode, ) -> bool { apply_index_entries(&self.conflicts, how, index, removal_mode) } } /// A description of a conflict (i.e. merge issue without an auto-resolution) as seen during a [tree-merge](crate::tree()). /// They may have a resolution that was applied automatically, or be left for the caller to resolved. #[derive(Debug, Clone)] pub struct Conflict { /// A record on how the conflict resolution succeeded with `Ok(_)` or failed with `Err(_)`. /// Note that in case of `Err(_)`, edits may still have been made to the tree to aid resolution. /// On failure, one can examine `ours` and `theirs` to potentially find a custom solution. /// Note that the descriptions of resolutions or resolution failures may be swapped compared /// to the actual changes. This is due to changes like `modification|deletion` being treated the /// same as `deletion|modification`, i.e. *ours* is not more privileged than theirs. /// To compensate for that, use [`changes_in_resolution()`](Conflict::changes_in_resolution()). pub resolution: Result, /// The change representing *our* side. pub ours: Change, /// The change representing *their* side. pub theirs: Change, /// An array to store an entry for each stage of the conflict. /// /// * `entries[0]` => Base /// * `entries[1]` => Ours /// * `entries[2]` => Theirs /// /// Note that ours and theirs might be swapped, so one should access it through [`Self::entries()`] to compensate for that. pub entries: [Option; 3], /// Determine how to interpret the `ours` and `theirs` fields. This is used to implement [`Self::changes_in_resolution()`] /// and [`Self::into_parts_by_resolution()`]. map: ConflictMapping, } /// A conflicting entry for insertion into the index. /// It will always be either on stage 1 (ancestor/base), 2 (ours) or 3 (theirs) #[derive(Debug, Clone, Copy)] pub struct ConflictIndexEntry { /// The kind of object at this stage. /// Note that it's possible that this is a directory, for instance if a directory was replaced with a file. pub mode: gix_object::tree::EntryMode, /// The id defining the state of the object. pub id: gix_hash::ObjectId, /// Hidden, maybe one day we can do without? path_hint: Option, } /// A hint for [`apply_index_entries()`] to know which paths to use for an entry. /// This is only used when necessary. #[derive(Debug, Clone, Copy)] enum ConflictIndexEntryPathHint { /// Use the previous path, i.e. rename source. Source, /// Use the current path as it is in the tree. Current, /// Use the path of the final destination, or *their* name. /// It's definitely finicky, as we don't store the actual path and instead refer to it. RenamedOrTheirs, } /// A utility to help define which side is what in the [`Conflict`] type. #[derive(Debug, Clone, Copy, Eq, PartialEq)] enum ConflictMapping { /// The sides are as described in the field documentation, i.e. `ours` is `ours`. Original, /// The sides are the opposite of the field documentation. i.e. `ours` is `theirs` and `theirs` is `ours`. Swapped, } impl ConflictMapping { fn is_swapped(&self) -> bool { matches!(self, ConflictMapping::Swapped) } fn swapped(self) -> ConflictMapping { match self { ConflictMapping::Original => ConflictMapping::Swapped, ConflictMapping::Swapped => ConflictMapping::Original, } } fn to_global(self, global: ConflictMapping) -> ConflictMapping { match global { ConflictMapping::Original => self, ConflictMapping::Swapped => self.swapped(), } } } impl Conflict { /// Return `true` if this instance is considered unresolved based on the criterion specified by `how`. pub fn is_unresolved(&self, how: TreatAsUnresolved) -> bool { use crate::blob; let content_merge_unresolved = |info: &ContentMerge| match how.content_merge { treat_as_unresolved::ContentMerge::Markers => matches!(info.resolution, blob::Resolution::Conflict), treat_as_unresolved::ContentMerge::ForcedResolution => { matches!( info.resolution, blob::Resolution::Conflict | blob::Resolution::CompleteWithAutoResolvedConflict ) } }; match how.tree_merge { treat_as_unresolved::TreeMerge::Undecidable => { self.resolution.is_err() || self .content_merge() .map_or(false, |info| content_merge_unresolved(&info)) } treat_as_unresolved::TreeMerge::EvasiveRenames | treat_as_unresolved::TreeMerge::ForcedResolution => { match &self.resolution { Ok(success) => match success { Resolution::SourceLocationAffectedByRename { .. } => false, Resolution::Forced(_) => { how.tree_merge == treat_as_unresolved::TreeMerge::ForcedResolution || self .content_merge() .map_or(false, |merged_blob| content_merge_unresolved(&merged_blob)) } Resolution::OursModifiedTheirsRenamedAndChangedThenRename { merged_blob, final_location, .. } => final_location.is_some() || merged_blob.as_ref().map_or(false, content_merge_unresolved), Resolution::OursModifiedTheirsModifiedThenBlobContentMerge { merged_blob } => { content_merge_unresolved(merged_blob) } }, Err(_failure) => true, } } } } /// Returns the changes of fields `ours` and `theirs` so they match their description in the /// [`Resolution`] or [`ResolutionFailure`] respectively. /// Without this, the sides may appear swapped as `ours|theirs` is treated the same as `theirs/ours` /// if both types are different, like `modification|deletion`. pub fn changes_in_resolution(&self) -> (&Change, &Change) { match self.map { ConflictMapping::Original => (&self.ours, &self.theirs), ConflictMapping::Swapped => (&self.theirs, &self.ours), } } /// Similar to [`changes_in_resolution()`](Self::changes_in_resolution()), but returns the parts /// of the structure so the caller can take ownership. This can be useful when applying your own /// resolutions for resolution failures. pub fn into_parts_by_resolution(self) -> (Result, Change, Change) { match self.map { ConflictMapping::Original => (self.resolution, self.ours, self.theirs), ConflictMapping::Swapped => (self.resolution, self.theirs, self.ours), } } /// Return the index entries for insertion into the index, to match with what's returned by [`Self::changes_in_resolution()`]. pub fn entries(&self) -> [Option; 3] { match self.map { ConflictMapping::Original => self.entries, ConflictMapping::Swapped => [self.entries[0], self.entries[2], self.entries[1]], } } /// Return information about the content merge if it was performed. pub fn content_merge(&self) -> Option { fn failure_merged_blob(failure: &ResolutionFailure) -> Option { match failure { ResolutionFailure::OursRenamedTheirsRenamedDifferently { merged_blob } => *merged_blob, ResolutionFailure::Unknown | ResolutionFailure::OursDirectoryTheirsNonDirectoryTheirsRenamed { .. } | ResolutionFailure::OursModifiedTheirsDeleted | ResolutionFailure::OursModifiedTheirsRenamedTypeMismatch | ResolutionFailure::OursModifiedTheirsDirectoryThenOursRenamed { renamed_unique_path_to_modified_blob: _, } | ResolutionFailure::OursAddedTheirsAddedTypeMismatch { .. } | ResolutionFailure::OursDeletedTheirsRenamed => None, } } match &self.resolution { Ok(success) => match success { Resolution::Forced(failure) => failure_merged_blob(failure), Resolution::SourceLocationAffectedByRename { .. } => None, Resolution::OursModifiedTheirsRenamedAndChangedThenRename { merged_blob, .. } => *merged_blob, Resolution::OursModifiedTheirsModifiedThenBlobContentMerge { merged_blob } => Some(*merged_blob), }, Err(failure) => failure_merged_blob(failure), } } } /// Describes of a conflict involving *our* change and *their* change was specifically resolved. /// /// Note that all resolutions are side-agnostic, so *ours* could also have been *theirs* and vice versa. /// Also note that symlink merges are always done via binary merge, using the same logic. #[derive(Debug, Clone)] pub enum Resolution { /// *ours* had a renamed directory and *theirs* made a change in the now renamed directory. /// We moved that change into its location. SourceLocationAffectedByRename { /// The repository-relative path to the location that the change ended up in after /// being affected by a renamed directory. final_location: BString, }, /// *ours* was a modified blob and *theirs* renamed that blob. /// We moved the changed blob from *ours* to its new location, and merged it successfully. /// If this is a `copy`, the source of the copy was set to be the changed blob as well so both match. OursModifiedTheirsRenamedAndChangedThenRename { /// If one side added the executable bit, we always add it in the merged result. merged_mode: Option, /// If `Some(…)`, the content of the involved blob had to be merged. merged_blob: Option, /// The repository relative path to the location the blob finally ended up in. /// It's `Some()` only if *they* rewrote the blob into a directory which *we* renamed on *our* side. final_location: Option, }, /// *ours* and *theirs* carried changes and where content-merged. /// /// Note that *ours* and *theirs* may also be rewrites with the same destination and mode, /// or additions. OursModifiedTheirsModifiedThenBlobContentMerge { /// The outcome of the content merge. merged_blob: ContentMerge, }, /// This is a resolution failure was forcefully turned into a usable resolution, i.e. [making a choice](ResolveWith) /// is turned into a valid resolution. Forced(ResolutionFailure), } /// Describes of a conflict involving *our* change and *their* failed to be resolved. #[derive(Debug, Clone)] pub enum ResolutionFailure { /// *ours* was renamed, but *theirs* was renamed differently. Both versions will be present in the tree, OursRenamedTheirsRenamedDifferently { /// If `Some(…)`, the content of the involved blob had to be merged. merged_blob: Option, }, /// *ours* was modified, but *theirs* was turned into a directory, so *ours* was renamed to a non-conflicting path. OursModifiedTheirsDirectoryThenOursRenamed { /// The path at which `ours` can be found in the tree - it's in the same directory that it was in before. renamed_unique_path_to_modified_blob: BString, }, /// *ours* is a directory, but *theirs* is a non-directory (i.e. file), which wants to be in its place, even though /// *ours* has a modification in that subtree. /// Rename *theirs* to retain that modification. /// /// Important: there is no actual modification on *ours* side, so *ours* is filled in with *theirs* as the data structure /// cannot represent this case. // TODO: Can we have a better data-structure? This would be for a rewrite though. OursDirectoryTheirsNonDirectoryTheirsRenamed { /// The non-conflicting path of *their* non-tree entry. renamed_unique_path_of_theirs: BString, }, /// *ours* was added (or renamed into place) with a different mode than theirs, e.g. blob and symlink, and we kept /// the symlink in its original location, renaming the other side to `their_unique_location`. OursAddedTheirsAddedTypeMismatch { /// The location at which *their* state was placed to resolve the name and type clash, named to indicate /// where the entry is coming from. their_unique_location: BString, }, /// *ours* was modified, and they renamed the same file, but there is also a non-mergable type-change. /// Here we keep both versions of the file. OursModifiedTheirsRenamedTypeMismatch, /// *ours* was deleted, but *theirs* was renamed. OursDeletedTheirsRenamed, /// *ours* was modified and *theirs* was deleted. We keep the modified one and ignore the deletion. OursModifiedTheirsDeleted, /// *ours* and *theirs* are in an untested state so it can't be handled yet, and is considered a conflict /// without adding our *or* their side to the resulting tree. Unknown, } /// Information about a blob content merge for use in a [`Resolution`]. /// Note that content merges always count as success to avoid duplication of cases, which forces callers /// to check for the [`resolution`](Self::resolution) field. #[derive(Debug, Copy, Clone)] pub struct ContentMerge { /// The fully merged blob. pub merged_blob_id: gix_hash::ObjectId, /// Identify the kind of resolution of the blob merge. Note that it may be conflicting. pub resolution: crate::blob::Resolution, } /// A way to configure [`tree()`](crate::tree()). #[derive(Default, Debug, Clone)] pub struct Options { /// If *not* `None`, rename tracking will be performed when determining the changes of each side of the merge. /// /// Note that [empty blobs](Rewrites::track_empty) should not be tracked for best results. pub rewrites: Option, /// Decide how blob-merges should be done. This relates to if conflicts can be resolved or not. pub blob_merge: crate::blob::platform::merge::Options, /// The context to use when invoking merge-drivers. pub blob_merge_command_ctx: gix_command::Context, /// If `Some(what-is-unresolved)`, the first unresolved conflict will cause the entire merge to stop. /// This is useful to see if there is any conflict, without performing the whole operation, something /// that can be very relevant during merges that would cause a lot of blob-diffs. pub fail_on_conflict: Option, /// This value also affects the size of merge-conflict markers, to allow differentiating /// merge conflicts on each level, for any value greater than 0, with values `N` causing `N*2` /// markers to be added to the configured value. /// /// This is used automatically when merging merge-bases recursively. pub marker_size_multiplier: u8, /// If `None`, when symlinks clash *ours* will be chosen and a conflict will occur. /// Otherwise, the same logic applies as for the merge of binary resources. pub symlink_conflicts: Option, /// If `None`, tree irreconcilable tree conflicts will result in [resolution failures](ResolutionFailure). /// Otherwise, one can choose a side. Note that it's still possible to determine that auto-resolution happened /// despite this choice, which allows carry forward the conflicting information, possibly for later resolution. /// If `Some(…)`, irreconcilable conflicts are reconciled by making a choice. /// Note that [`Conflict::entries()`] will still be set, to not degenerate information, even though they then represent /// the entries what would fit the index if no forced resolution was performed. /// It's up to the caller to handle that information mindfully. pub tree_conflicts: Option, } /// Decide how to resolve tree-related conflicts, but only those that have [no way of being correct](ResolutionFailure). #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum ResolveWith { /// On irreconcilable conflict, choose neither *our* nor *their* state, but keep the common *ancestor* state instead. Ancestor, /// On irreconcilable conflict, choose *our* side. /// /// Note that in order to get something equivalent to *theirs*, put *theirs* into the side of *ours*, /// swapping the sides essentially. Ours, } pub(super) mod function; mod utils; /// pub mod apply_index_entries { /// Determines how we deal with the removal of unconflicted entries if these are superseded by their conflicted counterparts, /// i.e. stage 1, 2 and 3. #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum RemovalMode { /// Add the [`gix_index::entry::Flags::REMOVE`] flag to entries that are to be removed. /// /// **Note** that this also means that unconflicted and conflicted stages will be visible in the same index. /// When written, entries marked for removal will automatically be ignored. However, this also means that /// one must not use the in-memory index or take specific care of entries that are marked for removal. Mark, /// Entries marked for removal (even those that were already marked) will be removed from memory at the end. /// /// This is an expensive step that leaves a consistent index, ready for use. Prune, } pub(super) mod function { use crate::tree::apply_index_entries::RemovalMode; use crate::tree::{Conflict, ConflictIndexEntryPathHint, Resolution, ResolutionFailure, TreatAsUnresolved}; use bstr::{BStr, ByteSlice}; use std::collections::{hash_map, HashMap}; /// Returns `true` if `index` changed as we applied conflicting stages to it, using `how` to determine if a /// conflict should be considered unresolved. /// Once a stage of a path conflicts, the unconflicting stage is removed even though it might be the one /// that is currently checked out. /// This removal is only done by flagging it with [gix_index::entry::Flags::REMOVE], which means /// these entries won't be written back to disk but will still be present in the index if `removal_mode` /// is [`RemovalMode::Mark`]. For proper removal, choose [`RemovalMode::Prune`]. /// It's important that `index` matches the tree that was produced as part of the merge that also /// brought about `conflicts`, or else this function will fail if it cannot find the path matching /// the conflicting entries. /// /// Note that in practice, whenever there is a single [conflict](Conflict), this function will return `true`. /// Errors can only occour if `index` isn't the one created from the merged tree that produced the `conflicts`. pub fn apply_index_entries( conflicts: &[Conflict], how: TreatAsUnresolved, index: &mut gix_index::State, removal_mode: RemovalMode, ) -> bool { if index.is_sparse() { gix_trace::error!("Refusing to apply index entries to sparse index - it's not tested yet"); return false; } let len = index.entries().len(); let mut idx_by_path_stage = HashMap::<(gix_index::entry::Stage, &BStr), usize>::default(); for conflict in conflicts.iter().filter(|c| c.is_unresolved(how)) { let (renamed_path, current_path): (Option<&BStr>, &BStr) = match &conflict.resolution { Ok(success) => match success { Resolution::Forced(_) => continue, Resolution::SourceLocationAffectedByRename { final_location } => { (Some(final_location.as_bstr()), final_location.as_bstr()) } Resolution::OursModifiedTheirsRenamedAndChangedThenRename { final_location, .. } => ( final_location.as_ref().map(|p| p.as_bstr()), conflict.changes_in_resolution().1.location(), ), Resolution::OursModifiedTheirsModifiedThenBlobContentMerge { .. } => { (None, conflict.ours.location()) } }, Err(failure) => match failure { ResolutionFailure::OursDirectoryTheirsNonDirectoryTheirsRenamed { renamed_unique_path_of_theirs, } => (Some(renamed_unique_path_of_theirs.as_bstr()), conflict.ours.location()), ResolutionFailure::OursRenamedTheirsRenamedDifferently { .. } => { (Some(conflict.theirs.location()), conflict.ours.location()) } ResolutionFailure::OursModifiedTheirsRenamedTypeMismatch | ResolutionFailure::OursDeletedTheirsRenamed | ResolutionFailure::OursModifiedTheirsDeleted | ResolutionFailure::Unknown => (None, conflict.ours.location()), ResolutionFailure::OursModifiedTheirsDirectoryThenOursRenamed { renamed_unique_path_to_modified_blob, } => ( Some(renamed_unique_path_to_modified_blob.as_bstr()), conflict.ours.location(), ), ResolutionFailure::OursAddedTheirsAddedTypeMismatch { their_unique_location } => { (Some(their_unique_location.as_bstr()), conflict.ours.location()) } }, }; let source_path = conflict.ours.source_location(); let entries_with_stage = conflict.entries().into_iter().enumerate().filter_map(|(idx, entry)| { entry.filter(|e| e.mode.is_no_tree()).map(|e| { ( match idx { 0 => gix_index::entry::Stage::Base, 1 => gix_index::entry::Stage::Ours, 2 => gix_index::entry::Stage::Theirs, _ => unreachable!("fixed size array with three items"), }, match e.path_hint { None => renamed_path.unwrap_or(current_path), Some(ConflictIndexEntryPathHint::Source) => source_path, Some(ConflictIndexEntryPathHint::Current) => current_path, Some(ConflictIndexEntryPathHint::RenamedOrTheirs) => { renamed_path.unwrap_or_else(|| conflict.changes_in_resolution().1.location()) } }, e, ) }) }); if !entries_with_stage.clone().any(|(_, path, _)| { index .entry_index_by_path_and_stage_bounded(path, gix_index::entry::Stage::Unconflicted, len) .is_some() }) { continue; } for (stage, path, entry) in entries_with_stage { if let Some(pos) = index.entry_index_by_path_and_stage_bounded(path, gix_index::entry::Stage::Unconflicted, len) { index.entries_mut()[pos].flags.insert(gix_index::entry::Flags::REMOVE); }; match idx_by_path_stage.entry((stage, path)) { hash_map::Entry::Occupied(map_entry) => { // This can happen due to the way the algorithm works. // The same happens in Git, but it stores the index-related data as part of its deduplicating tree. // We store each conflict we encounter, which also may duplicate their index entries, sometimes, but // with different values. The most recent value wins. // Instead of trying to deduplicate the index entries when the merge runs, we put the cost // to the tree-assembly - there is no way around it. let index_entry = &mut index.entries_mut()[*map_entry.get()]; index_entry.mode = entry.mode.into(); index_entry.id = entry.id; } hash_map::Entry::Vacant(map_entry) => { map_entry.insert(index.entries().len()); index.dangerously_push_entry( Default::default(), entry.id, stage.into(), entry.mode.into(), path, ); } }; } } let res = index.entries().len() != len; match removal_mode { RemovalMode::Mark => {} RemovalMode::Prune => { index.remove_entries(|_, _, e| e.flags.contains(gix_index::entry::Flags::REMOVE)); } } index.sort_entries(); res } } } pub use apply_index_entries::function::apply_index_entries; gix-merge-0.2.0/src/tree/utils.rs000064400000000000000000000573561046102023000147630ustar 00000000000000//! ## About `debug_assert!() //! //! The idea is to have code that won't panic in production. Thus, if in production that assertion would fail, //! we will rather let the code run and hope it will either be correct enough or fail in more graceful ways later. //! //! Once such a case becomes a bug and is reproduced in testing, the debug-assertion will kick in and hopefully //! contribute to finding a fix faster. use crate::blob::builtin_driver::binary::Pick; use crate::blob::ResourceKind; use crate::tree::{ Conflict, ConflictIndexEntry, ConflictIndexEntryPathHint, ConflictMapping, Error, Options, Resolution, ResolutionFailure, }; use bstr::ByteSlice; use bstr::{BStr, BString, ByteVec}; use gix_diff::tree_with_rewrites::{Change, ChangeRef}; use gix_hash::ObjectId; use gix_object::tree; use gix_object::tree::{EntryKind, EntryMode}; use std::collections::HashMap; /// Assuming that `their_location` is the destination of *their* rewrite, check if *it* passes /// over a directory rewrite in *our* tree. If so, rewrite it so that we get the path /// it would have had if it had been renamed along with *our* directory. pub fn possibly_rewritten_location( check_tree: &TreeNodes, their_location: &BStr, our_changes: &ChangeListRef, ) -> Option { check_tree.check_conflict(their_location).and_then(|pc| match pc { PossibleConflict::PassedRewrittenDirectory { change_idx } => { let passed_change = &our_changes[change_idx]; rewrite_location_with_renamed_directory(their_location, &passed_change.inner) } _ => None, }) } pub fn rewrite_location_with_renamed_directory(their_location: &BStr, passed_change: &Change) -> Option { match passed_change { Change::Rewrite { source_location, location, .. } if passed_change.entry_mode().is_tree() => { // This is safe even without dealing with slashes as we found this rewrite // by walking each component, and we know it's a tree for added safety. let suffix = their_location.strip_prefix(source_location.as_bytes())?; let mut rewritten = location.to_owned(); rewritten.push_str(suffix); Some(rewritten) } _ => None, } } /// Produce a unique path within the directory that contains the file at `file_path` like `a/b`, using `editor` /// and `tree` to assure unique names, to obtain the tree at `a/` and `side_name` to more clearly signal /// where the file is coming from. pub fn unique_path_in_tree( file_path: &BStr, editor: &tree::Editor<'_>, tree: &TreeNodes, side_name: &BStr, ) -> Result { let mut buf = file_path.to_owned(); buf.push(b'~'); buf.extend( side_name .as_bytes() .iter() .copied() .map(|b| if b == b'/' { b'_' } else { b }), ); // We could use a cursor here, but clashes are so unlikely that this wouldn't be meaningful for performance. let base_len = buf.len(); let mut suffix = 0; while editor.get(to_components_bstring_ref(&buf)).is_some() || tree.check_conflict(buf.as_bstr()).is_some() { buf.truncate(base_len); buf.push_str(format!("_{suffix}",)); suffix += 1; } Ok(buf) } /// Perform a merge between two blobs and return the result of its object id. #[allow(clippy::too_many_arguments)] pub fn perform_blob_merge( mut labels: crate::blob::builtin_driver::text::Labels<'_>, objects: &impl gix_object::FindObjectOrHeader, blob_merge: &mut crate::blob::Platform, buf: &mut Vec, write_blob_to_odb: &mut impl FnMut(&[u8]) -> Result, (our_location, our_id, our_mode): (&BString, ObjectId, EntryMode), (their_location, their_id, their_mode): (&BString, ObjectId, EntryMode), (previous_location, previous_id, previous_mode): (&BString, ObjectId, EntryMode), (extra_markers, outer_side): (u8, ConflictMapping), options: &Options, ) -> Result<(ObjectId, crate::blob::Resolution), Error> where E: Into>, { if our_id == their_id { // This can happen if the merge modes are different. debug_assert_ne!( our_mode, their_mode, "BUG: we must think anything has to be merged if the modes and the ids are the same" ); return Ok((their_id, crate::blob::Resolution::Complete)); } if matches!(our_mode.kind(), EntryKind::Link) && matches!(their_mode.kind(), EntryKind::Link) { let (pick, resolution) = crate::blob::builtin_driver::binary(options.symlink_conflicts); let (our_id, their_id) = match outer_side { ConflictMapping::Original => (our_id, their_id), ConflictMapping::Swapped => (their_id, our_id), }; let id = match pick { Pick::Ancestor => previous_id, Pick::Ours => our_id, Pick::Theirs => their_id, }; return Ok((id, resolution)); } let (our_kind, their_kind) = match outer_side { ConflictMapping::Original => (ResourceKind::CurrentOrOurs, ResourceKind::OtherOrTheirs), ConflictMapping::Swapped => (ResourceKind::OtherOrTheirs, ResourceKind::CurrentOrOurs), }; blob_merge.set_resource(our_id, our_mode.kind(), our_location.as_bstr(), our_kind, objects)?; blob_merge.set_resource( their_id, their_mode.kind(), their_location.as_bstr(), their_kind, objects, )?; blob_merge.set_resource( previous_id, previous_mode.kind(), previous_location.as_bstr(), ResourceKind::CommonAncestorOrBase, objects, )?; fn combined(side: &BStr, location: &BString) -> BString { let mut buf = side.to_owned(); buf.push_byte(b':'); buf.push_str(location); buf } if outer_side.is_swapped() { (labels.current, labels.other) = (labels.other, labels.current); } let (ancestor, current, other); let labels = if our_location == their_location { labels } else { ancestor = labels.ancestor.map(|side| combined(side, previous_location)); current = labels.current.map(|side| combined(side, our_location)); other = labels.other.map(|side| combined(side, their_location)); crate::blob::builtin_driver::text::Labels { ancestor: ancestor.as_ref().map(|n| n.as_bstr()), current: current.as_ref().map(|n| n.as_bstr()), other: other.as_ref().map(|n| n.as_bstr()), } }; let prep = blob_merge.prepare_merge(objects, with_extra_markers(options, extra_markers))?; let (pick, resolution) = prep.merge(buf, labels, &options.blob_merge_command_ctx)?; let merged_blob_id = prep .id_by_pick(pick, buf, write_blob_to_odb) .map_err(|err| Error::WriteBlobToOdb(err.into()))? .ok_or(Error::MergeResourceNotFound)?; Ok((merged_blob_id, resolution)) } fn with_extra_markers(opts: &Options, extra_makers: u8) -> crate::blob::platform::merge::Options { let mut out = opts.blob_merge; if let crate::blob::builtin_driver::text::Conflict::Keep { marker_size, .. } = &mut out.text.conflict { *marker_size = marker_size.saturating_add(extra_makers.saturating_add(opts.marker_size_multiplier.saturating_mul(2))); } out } /// A way to attach metadata to each change. #[derive(Debug)] pub struct TrackedChange { /// The actual change pub inner: Change, /// If `true`, this change counts as written to the tree using a [`tree::Editor`]. pub was_written: bool, /// If `Some(ours_idx_to_ignore)`, this change must be placed into the tree before handling it. /// This makes sure that new changes aren't visible too early, which would mean the algorithm /// knows things too early which can be misleading. /// The `ours_idx_to_ignore` assures that the same rewrite won't be used as matching side, which /// would lead to strange effects. Only set if it's a rewrite though. pub needs_tree_insertion: Option>, /// A new `(location, change_idx)` pair for the change that can happen if the location is touching a rewrite in a parent /// directory, but otherwise doesn't have a match. This means we shall redo the operation but with /// the changed path. /// The second tuple entry `change_idx` is the change-idx we passed over, which refers to the other side that interfered. pub rewritten_location: Option<(BString, usize)>, } pub type ChangeList = Vec; pub type ChangeListRef = [TrackedChange]; /// Only keep leaf nodes, or trees that are the renamed, pushing `change` on `changes`. /// Doing so makes it easy to track renamed or rewritten or copied directories, and properly /// handle *their* changes that fall within them. /// Note that it also rewrites `change` if it is a copy, turning it into an addition so copies don't have an effect /// on the merge algorithm. pub fn track(change: ChangeRef<'_>, changes: &mut ChangeList) { if change.entry_mode().is_tree() && matches!(change, ChangeRef::Modification { .. }) { return; } let is_tree = change.entry_mode().is_tree(); changes.push(TrackedChange { inner: match change.into_owned() { Change::Rewrite { id, entry_mode, location, relation, copy, .. } if copy => Change::Addition { location, relation, entry_mode, id, }, other => other, }, was_written: is_tree, needs_tree_insertion: None, rewritten_location: None, }); } /// Unconditionally apply `change` to `editor`. pub fn apply_change( editor: &mut tree::Editor<'_>, change: &Change, alternative_location: Option<&BString>, ) -> Result<(), tree::editor::Error> { use to_components_bstring_ref as to_components; if change.entry_mode().is_tree() { return Ok(()); } let (location, mode, id) = match change { Change::Addition { location, entry_mode, id, .. } | Change::Modification { location, entry_mode, id, .. } => (location, entry_mode, id), Change::Deletion { location, .. } => { editor.remove(to_components(alternative_location.unwrap_or(location)))?; return Ok(()); } Change::Rewrite { source_location, entry_mode, id, location, copy, .. } => { if !*copy { editor.remove(to_components(source_location))?; } (location, entry_mode, id) } }; editor.upsert( to_components(alternative_location.unwrap_or(location)), mode.kind(), *id, )?; Ok(()) } /// A potential conflict that needs to be checked. It comes in several varieties and always happens /// if paths overlap in some way between *theirs* and *ours*. #[derive(Debug)] pub enum PossibleConflict { /// *our* changes have a tree here, but *they* place a non-tree or edit an existing item (that we removed). TreeToNonTree { /// The possibly available change at this node. change_idx: Option, }, /// A non-tree in *our* tree turned into a tree in *theirs* - this can be done with additions in *theirs*, /// or if we added a blob, while they added a directory. NonTreeToTree { /// The possibly available change at this node. change_idx: Option, }, /// A perfect match, i.e. *our* change at `a/b/c` corresponds to *their* change at the same path. Match { /// The index to *our* change at *their* path. change_idx: usize, }, /// *their* change at `a/b/c` passed `a/b` which is an index to *our* change indicating a directory that was rewritten, /// with all its contents being renamed. However, *theirs* has been added *into* that renamed directory. PassedRewrittenDirectory { change_idx: usize }, } impl PossibleConflict { pub(super) fn change_idx(&self) -> Option { match self { PossibleConflict::TreeToNonTree { change_idx, .. } | PossibleConflict::NonTreeToTree { change_idx, .. } => { *change_idx } PossibleConflict::Match { change_idx, .. } | PossibleConflict::PassedRewrittenDirectory { change_idx, .. } => Some(*change_idx), } } } /// The flat list of all tree-nodes so we can avoid having a linked-tree using pointers /// which is useful for traversal and initial setup as that can then trivially be non-recursive. pub struct TreeNodes(Vec); /// Trees lead to other trees, or leafs (without children), and it can be represented by a renamed directory. #[derive(Debug, Default, Clone)] struct TreeNode { /// A mapping of path components to their children to quickly see if `theirs` in some way is potentially /// conflicting with `ours`. children: HashMap, /// The index to a change, which is always set if this is a leaf node (with no children), and if there are children and this /// is a rewritten tree. change_idx: Option, /// Keep track of where the location of this node is derived from. location: ChangeLocation, } #[derive(Debug, Default, Clone, Copy)] enum ChangeLocation { /// The change is at its current (and only) location, or in the source location of a rename. #[default] CurrentLocation, /// This is always the destination of a rename. RenamedLocation, } impl TreeNode { fn is_leaf_node(&self) -> bool { self.children.is_empty() } } impl TreeNodes { pub fn new() -> Self { TreeNodes(vec![TreeNode::default()]) } /// Insert our `change` at `change_idx`, into a linked-tree, assuring that each `change` is non-conflicting /// with this tree structure, i.e. each leaf path is only seen once. /// Note that directories can be added in between. pub fn track_change(&mut self, change: &Change, change_idx: usize) { for (path, location_hint) in [ Some((change.source_location(), ChangeLocation::CurrentLocation)), match change { Change::Addition { .. } | Change::Deletion { .. } | Change::Modification { .. } => None, Change::Rewrite { location, .. } => Some((location.as_bstr(), ChangeLocation::RenamedLocation)), }, ] .into_iter() .flatten() { let mut components = to_components(path).peekable(); let mut next_index = self.0.len(); let mut cursor = &mut self.0[0]; while let Some(component) = components.next() { let is_last = components.peek().is_none(); match cursor.children.get(component).copied() { None => { let new_node = TreeNode { children: Default::default(), change_idx: is_last.then_some(change_idx), location: location_hint, }; cursor.children.insert(component.to_owned(), next_index); self.0.push(new_node); cursor = &mut self.0[next_index]; next_index += 1; } Some(index) => { cursor = &mut self.0[index]; if is_last && !cursor.is_leaf_node() { // NOTE: we might encounter the same path multiple times in rare conditions. // At least we avoid overwriting existing intermediate changes, for good measure. if cursor.change_idx.is_none() { cursor.change_idx = Some(change_idx); } } } } } } } /// Search the tree with `our` changes for `theirs` by [`source_location()`](Change::source_location())). /// If there is an entry but both are the same, or if there is no entry, return `None`. pub fn check_conflict(&self, theirs_location: &BStr) -> Option { if self.0.len() == 1 { return None; } let components = to_components(theirs_location); let mut cursor = &self.0[0]; let mut cursor_idx = 0; let mut intermediate_change = None; for component in components { if cursor.change_idx.is_some() { intermediate_change = cursor.change_idx.map(|change_idx| (change_idx, cursor_idx)); } match cursor.children.get(component).copied() { // *their* change is outside *our* tree None => { let res = if cursor.is_leaf_node() { Some(PossibleConflict::NonTreeToTree { change_idx: cursor.change_idx, }) } else { // a change somewhere else, i.e. `a/c` and we know `a/b` only. intermediate_change.and_then(|(change, cursor_idx)| { let cursor = &self.0[cursor_idx]; // If this is a destination location of a rename, then the `their_location` // is already at the right spot, and we can just ignore it. if matches!(cursor.location, ChangeLocation::CurrentLocation) { Some(PossibleConflict::PassedRewrittenDirectory { change_idx: change }) } else { None } }) }; return res; } Some(child_idx) => { cursor_idx = child_idx; cursor = &self.0[cursor_idx]; } } } if cursor.is_leaf_node() { PossibleConflict::Match { change_idx: cursor.change_idx.expect("leaf nodes always have a change"), } } else { PossibleConflict::TreeToNonTree { change_idx: cursor.change_idx, } } .into() } /// Compare both changes and return `true` if they are *not* exactly the same. /// One two changes are the same, they will have the same effect. /// Since this is called after [`Self::check_conflict`], *our* change will not be applied, /// only theirs, which naturally avoids double-application /// (which shouldn't have side effects, but let's not risk it) pub fn is_not_same_change_in_possible_conflict( &self, theirs: &Change, conflict: &PossibleConflict, our_changes: &ChangeListRef, ) -> bool { conflict .change_idx() .map_or(true, |idx| our_changes[idx].inner != *theirs) } pub fn remove_existing_leaf(&mut self, location: &BStr) { self.remove_leaf_inner(location, true); } pub fn remove_leaf(&mut self, location: &BStr) { self.remove_leaf_inner(location, false); } fn remove_leaf_inner(&mut self, location: &BStr, must_exist: bool) { let mut components = to_components(location).peekable(); let mut cursor = &mut self.0[0]; while let Some(component) = components.next() { match cursor.children.get(component).copied() { None => debug_assert!(!must_exist, "didn't find '{location}' for removal"), Some(existing_idx) => { let is_last = components.peek().is_none(); if is_last { cursor.children.remove(component); cursor = &mut self.0[existing_idx]; debug_assert!( cursor.is_leaf_node(), "BUG: we should really only try to remove leaf nodes: {cursor:?}" ); cursor.change_idx = None; } else { cursor = &mut self.0[existing_idx]; } } } } } /// Insert `new_change` which affects this tree into it and put it into `storage` to obtain the index. /// Panic if that change already exists as it must be made so that it definitely doesn't overlap with this tree. pub fn insert(&mut self, new_change: &Change, new_change_idx: usize) { let mut next_index = self.0.len(); let mut cursor = &mut self.0[0]; for component in to_components(new_change.location()) { match cursor.children.get(component).copied() { None => { cursor.children.insert(component.to_owned(), next_index); self.0.push(TreeNode::default()); cursor = &mut self.0[next_index]; next_index += 1; } Some(existing_idx) => { cursor = &mut self.0[existing_idx]; } } } debug_assert!( !matches!(new_change, Change::Rewrite { .. }), "BUG: we thought we wouldn't do that current.location is related?" ); cursor.change_idx = Some(new_change_idx); cursor.location = ChangeLocation::CurrentLocation; } } pub fn to_components_bstring_ref(rela_path: &BString) -> impl Iterator { rela_path.split(|b| *b == b'/').map(Into::into) } pub fn to_components(rela_path: &BStr) -> impl Iterator { rela_path.split(|b| *b == b'/').map(Into::into) } impl Conflict { pub(super) fn without_resolution( resolution: ResolutionFailure, changes: (&Change, &Change, ConflictMapping, ConflictMapping), entries: [Option; 3], ) -> Self { Conflict::maybe_resolved(Err(resolution), changes, entries) } pub(super) fn with_resolution( resolution: Resolution, changes: (&Change, &Change, ConflictMapping, ConflictMapping), entries: [Option; 3], ) -> Self { Conflict::maybe_resolved(Ok(resolution), changes, entries) } fn maybe_resolved( resolution: Result, (ours, theirs, map, outer_map): (&Change, &Change, ConflictMapping, ConflictMapping), entries: [Option; 3], ) -> Self { Conflict { resolution, ours: ours.clone(), theirs: theirs.clone(), entries, map: map.to_global(outer_map), } } pub(super) fn unknown(changes: (&Change, &Change, ConflictMapping, ConflictMapping)) -> Self { let (source_mode, source_id) = changes.0.source_entry_mode_and_id(); let (our_mode, our_id) = changes.0.entry_mode_and_id(); let (their_mode, their_id) = changes.1.entry_mode_and_id(); let entries = [ Some(ConflictIndexEntry { mode: source_mode, id: source_id.into(), path_hint: Some(ConflictIndexEntryPathHint::Source), }), Some(ConflictIndexEntry { mode: our_mode, id: our_id.into(), path_hint: Some(ConflictIndexEntryPathHint::Current), }), Some(ConflictIndexEntry { mode: their_mode, id: their_id.into(), path_hint: Some(ConflictIndexEntryPathHint::RenamedOrTheirs), }), ]; Conflict::maybe_resolved(Err(ResolutionFailure::Unknown), changes, entries) } } gix-merge-0.2.0/tests/fixtures/generated-archives/make_blob_repo.tar000064400000000000000000002210001046102023000237250ustar 00000000000000./000075500000000000000000000000001046102023000073255ustar 00000000000000b000064400000000000000000000000021046102023000073240ustar 00000000000000b .git000075500000000000000000000000001046102023000077525ustar 00000000000000.git/COMMIT_EDITMSG000064400000000000000000000000051046102023000121130ustar 00000000000000init .git/index000064400000000000000000000011011046102023000110540ustar 00000000000000DIRCg$,g$,  Z=y«gc ['Ɔ-.gitattributesg$,Gg$,G  Z7ax"-4ϽUV$rbg$,J8g$,J8  Z9ڂrdoI B e-no-attrg$,Fg$,F  Z6 7F -Ljust-setg$,Hg$,H  Z8DPbYg sD-x+uniong$,K3g$,K3  Z:N[nA)_z Hunsetg$,Lmg$,Lm  Z; Fqaj>ӄ unspecifiedTREE7 0 }W<N-:R;+^,-v'bH.git/refs000075500000000000000000000000001046102023000107115ustar 00000000000000.git/refs/tags000075500000000000000000000000001046102023000116475ustar 00000000000000.git/refs/heads000075500000000000000000000000001046102023000117755ustar 00000000000000.git/refs/heads/main000064400000000000000000000000511046102023000127170ustar 0000000000000035033e6ac6c0d41954c95f9c7faf6d3de6e66447 .git/hooks000075500000000000000000000000001046102023000110755ustar 00000000000000.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000155740ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 .git/hooks/pre-push.sample000075500000000000000000000025361046102023000141330ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 .git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000153140ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : .git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000155330ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : .git/hooks/post-update.sample000075500000000000000000000002751046102023000146330ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info .git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000160770ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi .git/hooks/pre-receive.sample000075500000000000000000000010401046102023000145630ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi .git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000162070ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } .git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000153210ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : .git/hooks/pre-commit.sample000075500000000000000000000031531046102023000144400ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- .git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000144110ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END .git/hooks/commit-msg.sample000075500000000000000000000016001046102023000144330ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } .git/description000064400000000000000000000001111046102023000122700ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. .git/logs000075500000000000000000000000001046102023000107165ustar 00000000000000.git/logs/refs000075500000000000000000000000001046102023000116555ustar 00000000000000.git/logs/refs/heads000075500000000000000000000000001046102023000127415ustar 00000000000000.git/logs/refs/heads/main000064400000000000000000000002331046102023000136650ustar 000000000000000000000000000000000000000000000000000000 35033e6ac6c0d41954c95f9c7faf6d3de6e66447 committer 946771200 +0000 commit (initial): init .git/logs/HEAD000064400000000000000000000002331046102023000114170ustar 000000000000000000000000000000000000000000000000000000 35033e6ac6c0d41954c95f9c7faf6d3de6e66447 committer 946771200 +0000 commit (initial): init .git/info000075500000000000000000000000001046102023000107055ustar 00000000000000.git/info/exclude000064400000000000000000000003601046102023000123370ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ .git/HEAD000064400000000000000000000000251046102023000104520ustar 00000000000000ref: refs/heads/main .git/objects000075500000000000000000000000001046102023000114035ustar 00000000000000.git/objects/46000075500000000000000000000000001046102023000116345ustar 00000000000000.git/objects/46/8c711c84ad8d86d31961a0116afce73ed384a2000064400000000000000000000000341046102023000170410ustar 00000000000000xKOR04b(+.HMLLMFE.git/objects/f9000075500000000000000000000000001046102023000117215ustar 00000000000000.git/objects/f9/c2abb667d66307f10bb85bef27c686ef917f2d000064400000000000000000000001421046102023000173030ustar 00000000000000x- D c+Bow癐 J.g**Pm܋@Քe1H.p 6E-r#B sy̴Bm%fynwef(.git/objects/info000075500000000000000000000000001046102023000123365ustar 00000000000000.git/objects/pack000075500000000000000000000000001046102023000123215ustar 00000000000000.git/objects/4e000075500000000000000000000000001046102023000117135ustar 00000000000000.git/objects/4e/b25b6ea241159029ff885fd07a040c0387cf48000064400000000000000000000000251046102023000167620ustar 00000000000000xKOR0c(+N-Q/.git/objects/ab000075500000000000000000000000001046102023000117655ustar 00000000000000.git/objects/ab/dc440350b8ffac6259037f67cf0d73442d782b000064400000000000000000000000251046102023000171170ustar 00000000000000xKOR0c(;).git/objects/bb000075500000000000000000000000001046102023000117665ustar 00000000000000.git/objects/bb/e037dcfb18b5b3c6fa46a897970ba3972d1e4c000064400000000000000000000000301046102023000173370ustar 00000000000000xKORd*-.-N--B.git/objects/d9000075500000000000000000000000001046102023000117175ustar 00000000000000.git/objects/d9/05d9da82c97264ab6f4920e20242e088850ce9000064400000000000000000000000211046102023000167110ustar 00000000000000xKOR0bHla.git/objects/35000075500000000000000000000000001046102023000116325ustar 00000000000000.git/objects/35/033e6ac6c0d41954c95f9c7faf6d3de6e66447000064400000000000000000000001761046102023000171530ustar 00000000000000xe D{+^(jJ~E+j-b%=t.ox RreSo= v2D2R ڛh܌)vVj~ X>\ X댓rDq|unkQ\DWgbt6a.git/objects/61000075500000000000000000000000001046102023000116315ustar 00000000000000.git/objects/61/780798228d17af2d34fce4cfbdf35556832472000064400000000000000000000000211046102023000167170ustar 00000000000000xKOR0bHf^.git/config000064400000000000000000000002111046102023000112130ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true union000064400000000000000000000000061046102023000102370ustar 00000000000000union .gitattributes000064400000000000000000000001711046102023000120620ustar 00000000000000just-set merge conflict-marker-size=32 b merge=b union merge=union missing merge=missing unset -merge unspecified !merge unspecified000064400000000000000000000000141046102023000114040ustar 00000000000000unspecified e-no-attr000064400000000000000000000000021046102023000107110ustar 00000000000000e just-set000064400000000000000000000000111046102023000106610ustar 00000000000000just-set unset000064400000000000000000000000061046102023000102450ustar 00000000000000unset __gitoxide_meta__000075500000000000000000000000001046102023000125275ustar 00000000000000__gitoxide_meta__/identity000064400000000000000000000000171046102023000143600ustar 000000000000003777936047-unix__gitoxide_meta__/git-version000064400000000000000000000000431046102023000147740ustar 00000000000000git version 2.39.5 (Apple Git-154) gix-merge-0.2.0/tests/fixtures/generated-archives/text-baseline.tar000064400000000000000000024700001046102023000235410ustar 00000000000000./000075500000000000000000000000001046102023000073255ustar 00000000000000zdiff3-interesting000075500000000000000000000000001046102023000126275ustar 00000000000000zdiff3-interesting/merge-ours.merged-reversed000064400000000000000000000000401046102023000177670ustar 000000000000001 2 3 4 A B C 5 6 G H I J 7 8 9 zdiff3-interesting/diff3.merged000064400000000000000000000002611046102023000150650ustar 000000000000001 2 3 4 <<<<<<< zdiff3-interesting/ours.blob A B C D E F G H I J ||||||| zdiff3-interesting/base.blob 5 6 ======= A B C 5 6 G H I J >>>>>>> zdiff3-interesting/theirs.blob 7 8 9 zdiff3-interesting/merge-union.merged000064400000000000000000000000461046102023000163200ustar 000000000000001 2 3 4 A B C D E F 5 6 G H I J 7 8 9 zdiff3-interesting/ours.blob000064400000000000000000000000421046102023000145320ustar 000000000000001 2 3 4 A B C D E F G H I J 7 8 9 zdiff3-interesting/diff3.merged-reversed000064400000000000000000000002611046102023000167020ustar 000000000000001 2 3 4 <<<<<<< zdiff3-interesting/theirs.blob A B C 5 6 G H I J ||||||| zdiff3-interesting/base.blob 5 6 ======= A B C D E F G H I J >>>>>>> zdiff3-interesting/ours.blob 7 8 9 zdiff3-interesting/zdiff3.merged-reversed000064400000000000000000000002431046102023000170740ustar 000000000000001 2 3 4 A B C <<<<<<< zdiff3-interesting/theirs.blob 5 6 ||||||| zdiff3-interesting/base.blob 5 6 ======= D E F >>>>>>> zdiff3-interesting/ours.blob G H I J 7 8 9 zdiff3-interesting/base.blob000064400000000000000000000000221046102023000144520ustar 000000000000001 2 3 4 5 6 7 8 9 zdiff3-interesting/diff3-histogram.merged000064400000000000000000000002611046102023000170600ustar 000000000000001 2 3 4 <<<<<<< zdiff3-interesting/ours.blob A B C D E F G H I J ||||||| zdiff3-interesting/base.blob 5 6 ======= A B C 5 6 G H I J >>>>>>> zdiff3-interesting/theirs.blob 7 8 9 zdiff3-interesting/zdiff3-histogram.merged000064400000000000000000000002431046102023000172520ustar 000000000000001 2 3 4 A B C <<<<<<< zdiff3-interesting/ours.blob D E F ||||||| zdiff3-interesting/base.blob 5 6 ======= 5 6 >>>>>>> zdiff3-interesting/theirs.blob G H I J 7 8 9 zdiff3-interesting/diff3-histogram.merged-reversed000064400000000000000000000002611046102023000206750ustar 000000000000001 2 3 4 <<<<<<< zdiff3-interesting/theirs.blob A B C 5 6 G H I J ||||||| zdiff3-interesting/base.blob 5 6 ======= A B C D E F G H I J >>>>>>> zdiff3-interesting/ours.blob 7 8 9 zdiff3-interesting/merge-ours.merged000064400000000000000000000000421046102023000161540ustar 000000000000001 2 3 4 A B C D E F G H I J 7 8 9 zdiff3-interesting/merge.merged000064400000000000000000000001721046102023000151720ustar 000000000000001 2 3 4 A B C <<<<<<< zdiff3-interesting/ours.blob D E F ======= 5 6 >>>>>>> zdiff3-interesting/theirs.blob G H I J 7 8 9 zdiff3-interesting/merge-theirs.merged-reversed000064400000000000000000000000421046102023000202770ustar 000000000000001 2 3 4 A B C D E F G H I J 7 8 9 zdiff3-interesting/merge.merged-reversed000064400000000000000000000001721046102023000170070ustar 000000000000001 2 3 4 A B C <<<<<<< zdiff3-interesting/theirs.blob 5 6 ======= D E F >>>>>>> zdiff3-interesting/ours.blob G H I J 7 8 9 zdiff3-interesting/theirs.blob000064400000000000000000000000401046102023000150360ustar 000000000000001 2 3 4 A B C 5 6 G H I J 7 8 9 zdiff3-interesting/zdiff3-histogram.merged-reversed000064400000000000000000000002431046102023000210670ustar 000000000000001 2 3 4 A B C <<<<<<< zdiff3-interesting/theirs.blob 5 6 ||||||| zdiff3-interesting/base.blob 5 6 ======= D E F >>>>>>> zdiff3-interesting/ours.blob G H I J 7 8 9 zdiff3-interesting/zdiff3.merged000064400000000000000000000002431046102023000152570ustar 000000000000001 2 3 4 A B C <<<<<<< zdiff3-interesting/ours.blob D E F ||||||| zdiff3-interesting/base.blob 5 6 ======= 5 6 >>>>>>> zdiff3-interesting/theirs.blob G H I J 7 8 9 zdiff3-interesting/merge-theirs.merged000064400000000000000000000000401046102023000164600ustar 000000000000001 2 3 4 A B C 5 6 G H I J 7 8 9 zdiff3-interesting/merge-union.merged-reversed000064400000000000000000000000461046102023000201350ustar 000000000000001 2 3 4 A B C 5 6 D E F G H I J 7 8 9 partial-match000075500000000000000000000000001046102023000116375ustar 00000000000000partial-match/merge-ours.merged-reversed000064400000000000000000000000171046102023000170030ustar 000000000000000 X1 2 X3 X4 5 partial-match/diff3.merged000064400000000000000000000002151046102023000140740ustar 000000000000000 <<<<<<< partial-match/ours.blob X1 X2 X3 X4 ||||||| partial-match/base.blob 1 2 3 4 ======= X1 2 X3 X4 >>>>>>> partial-match/theirs.blob 5 partial-match/merge-union.merged000064400000000000000000000000221046102023000153220ustar 000000000000000 X1 X2 2 X3 X4 5 partial-match/ours.blob000064400000000000000000000000201046102023000135360ustar 000000000000000 X1 X2 X3 X4 5 partial-match/diff3.merged-reversed000064400000000000000000000002151046102023000157110ustar 000000000000000 <<<<<<< partial-match/theirs.blob X1 2 X3 X4 ||||||| partial-match/base.blob 1 2 3 4 ======= X1 X2 X3 X4 >>>>>>> partial-match/ours.blob 5 partial-match/zdiff3.merged-reversed000064400000000000000000000002041046102023000161010ustar 000000000000000 X1 <<<<<<< partial-match/theirs.blob 2 ||||||| partial-match/base.blob 1 2 3 4 ======= X2 >>>>>>> partial-match/ours.blob X3 X4 5 partial-match/base.blob000064400000000000000000000000141046102023000134630ustar 000000000000000 1 2 3 4 5 partial-match/diff3-histogram.merged000064400000000000000000000002151046102023000160670ustar 000000000000000 <<<<<<< partial-match/ours.blob X1 X2 X3 X4 ||||||| partial-match/base.blob 1 2 3 4 ======= X1 2 X3 X4 >>>>>>> partial-match/theirs.blob 5 partial-match/zdiff3-histogram.merged000064400000000000000000000002041046102023000162570ustar 000000000000000 X1 <<<<<<< partial-match/ours.blob X2 ||||||| partial-match/base.blob 1 2 3 4 ======= 2 >>>>>>> partial-match/theirs.blob X3 X4 5 partial-match/diff3-histogram.merged-reversed000064400000000000000000000002151046102023000177040ustar 000000000000000 <<<<<<< partial-match/theirs.blob X1 2 X3 X4 ||||||| partial-match/base.blob 1 2 3 4 ======= X1 X2 X3 X4 >>>>>>> partial-match/ours.blob 5 partial-match/merge-ours.merged000064400000000000000000000000201046102023000151600ustar 000000000000000 X1 X2 X3 X4 5 partial-match/merge.merged000064400000000000000000000001341046102023000142000ustar 000000000000000 X1 <<<<<<< partial-match/ours.blob X2 ======= 2 >>>>>>> partial-match/theirs.blob X3 X4 5 partial-match/merge-theirs.merged-reversed000064400000000000000000000000201046102023000173030ustar 000000000000000 X1 X2 X3 X4 5 partial-match/merge.merged-reversed000064400000000000000000000001341046102023000160150ustar 000000000000000 X1 <<<<<<< partial-match/theirs.blob 2 ======= X2 >>>>>>> partial-match/ours.blob X3 X4 5 partial-match/theirs.blob000064400000000000000000000000171046102023000140520ustar 000000000000000 X1 2 X3 X4 5 partial-match/zdiff3-histogram.merged-reversed000064400000000000000000000002041046102023000200740ustar 000000000000000 X1 <<<<<<< partial-match/theirs.blob 2 ||||||| partial-match/base.blob 1 2 3 4 ======= X2 >>>>>>> partial-match/ours.blob X3 X4 5 partial-match/zdiff3.merged000064400000000000000000000002041046102023000142640ustar 000000000000000 X1 <<<<<<< partial-match/ours.blob X2 ||||||| partial-match/base.blob 1 2 3 4 ======= 2 >>>>>>> partial-match/theirs.blob X3 X4 5 partial-match/merge-theirs.merged000064400000000000000000000000171046102023000154740ustar 000000000000000 X1 2 X3 X4 5 partial-match/merge-union.merged-reversed000064400000000000000000000000221046102023000171370ustar 000000000000000 X1 2 X2 X3 X4 5 no-change-add000075500000000000000000000000001046102023000114765ustar 00000000000000no-change-add/merge-ours.merged-reversed000064400000000000000000000001031046102023000166360ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/diff3.merged000064400000000000000000000001031046102023000137270ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/merge-union.merged000064400000000000000000000001031046102023000151610ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/ours.blob000064400000000000000000000001031046102023000133770ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/diff3.merged-reversed000064400000000000000000000001031046102023000155440ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/zdiff3.merged-reversed000064400000000000000000000001031046102023000157360ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/base.blob000064400000000000000000000000231046102023000133220ustar 00000000000000 line 1 line 2 no-change-add/diff3-histogram.merged000064400000000000000000000001031046102023000157220ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/zdiff3-histogram.merged000064400000000000000000000001031046102023000161140ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/diff3-histogram.merged-reversed000064400000000000000000000001031046102023000175370ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/merge-ours.merged000064400000000000000000000001031046102023000150210ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/merge.merged000064400000000000000000000001031046102023000140330ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/merge-theirs.merged-reversed000064400000000000000000000001031046102023000171440ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/merge.merged-reversed000064400000000000000000000001031046102023000156500ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/theirs.blob000064400000000000000000000001031046102023000137050ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/zdiff3-histogram.merged-reversed000064400000000000000000000001031046102023000177310ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/zdiff3.merged000064400000000000000000000001031046102023000141210ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/merge-theirs.merged000064400000000000000000000001031046102023000153270ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-add/merge-union.merged-reversed000064400000000000000000000001031046102023000167760ustar 00000000000000 line 1 line in between line 2 line in between line 3 .git000075500000000000000000000000001046102023000077525ustar 00000000000000.git/refs000075500000000000000000000000001046102023000107115ustar 00000000000000.git/refs/tags000075500000000000000000000000001046102023000116475ustar 00000000000000.git/refs/heads000075500000000000000000000000001046102023000117755ustar 00000000000000.git/description000064400000000000000000000001111046102023000122700ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. .git/info000075500000000000000000000000001046102023000107055ustar 00000000000000.git/info/exclude000064400000000000000000000003601046102023000123370ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ .git/HEAD000064400000000000000000000000251046102023000104520ustar 00000000000000ref: refs/heads/main .git/objects000075500000000000000000000000001046102023000114035ustar 00000000000000.git/objects/info000075500000000000000000000000001046102023000123365ustar 00000000000000.git/objects/pack000075500000000000000000000000001046102023000123215ustar 00000000000000.git/config000064400000000000000000000002111046102023000112130ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true multi-change000075500000000000000000000000001046102023000114665ustar 00000000000000multi-change/merge-ours.merged-reversed000064400000000000000000000000241046102023000166300ustar 00000000000000T T T T T T T T T T multi-change/diff3.merged000064400000000000000000000002431046102023000137240ustar 00000000000000<<<<<<< multi-change/ours.blob 0 1 X X 4 5 Y Y 8 Z ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= T T T T T T T T T T >>>>>>> multi-change/theirs.blob multi-change/merge-union.merged000064400000000000000000000000501046102023000151520ustar 000000000000000 1 X X 4 5 Y Y 8 Z T T T T T T T T T T multi-change/ours.blob000064400000000000000000000000241046102023000133710ustar 000000000000000 1 X X 4 5 Y Y 8 Z multi-change/diff3.merged-reversed000064400000000000000000000002431046102023000155410ustar 00000000000000<<<<<<< multi-change/theirs.blob T T T T T T T T T T ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= 0 1 X X 4 5 Y Y 8 Z >>>>>>> multi-change/ours.blob multi-change/zdiff3.merged-reversed000064400000000000000000000002431046102023000157330ustar 00000000000000<<<<<<< multi-change/theirs.blob T T T T T T T T T T ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= 0 1 X X 4 5 Y Y 8 Z >>>>>>> multi-change/ours.blob multi-change/base.blob000064400000000000000000000000241046102023000133130ustar 000000000000000 1 2 3 4 5 6 7 8 9 multi-change/diff3-histogram.merged000064400000000000000000000002431046102023000157170ustar 00000000000000<<<<<<< multi-change/ours.blob 0 1 X X 4 5 Y Y 8 Z ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= T T T T T T T T T T >>>>>>> multi-change/theirs.blob multi-change/zdiff3-histogram.merged000064400000000000000000000002431046102023000161110ustar 00000000000000<<<<<<< multi-change/ours.blob 0 1 X X 4 5 Y Y 8 Z ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= T T T T T T T T T T >>>>>>> multi-change/theirs.blob multi-change/diff3-histogram.merged-reversed000064400000000000000000000002431046102023000175340ustar 00000000000000<<<<<<< multi-change/theirs.blob T T T T T T T T T T ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= 0 1 X X 4 5 Y Y 8 Z >>>>>>> multi-change/ours.blob multi-change/merge-ours.merged000064400000000000000000000000241046102023000150130ustar 000000000000000 1 X X 4 5 Y Y 8 Z multi-change/merge.merged000064400000000000000000000001601046102023000140260ustar 00000000000000<<<<<<< multi-change/ours.blob 0 1 X X 4 5 Y Y 8 Z ======= T T T T T T T T T T >>>>>>> multi-change/theirs.blob multi-change/merge-theirs.merged-reversed000064400000000000000000000000241046102023000171360ustar 000000000000000 1 X X 4 5 Y Y 8 Z multi-change/merge.merged-reversed000064400000000000000000000001601046102023000156430ustar 00000000000000<<<<<<< multi-change/theirs.blob T T T T T T T T T T ======= 0 1 X X 4 5 Y Y 8 Z >>>>>>> multi-change/ours.blob multi-change/theirs.blob000064400000000000000000000000241046102023000136770ustar 00000000000000T T T T T T T T T T multi-change/zdiff3-histogram.merged-reversed000064400000000000000000000002431046102023000177260ustar 00000000000000<<<<<<< multi-change/theirs.blob T T T T T T T T T T ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= 0 1 X X 4 5 Y Y 8 Z >>>>>>> multi-change/ours.blob multi-change/zdiff3.merged000064400000000000000000000002431046102023000141160ustar 00000000000000<<<<<<< multi-change/ours.blob 0 1 X X 4 5 Y Y 8 Z ||||||| multi-change/base.blob 0 1 2 3 4 5 6 7 8 9 ======= T T T T T T T T T T >>>>>>> multi-change/theirs.blob multi-change/merge-theirs.merged000064400000000000000000000000241046102023000153210ustar 00000000000000T T T T T T T T T T multi-change/merge-union.merged-reversed000064400000000000000000000000501046102023000167670ustar 00000000000000T T T T T T T T T T 0 1 X X 4 5 Y Y 8 Z baseline.cases000064400000000000000000001033021046102023000117710ustar 00000000000000simple/ours.blob simple/base.blob simple/theirs.blob simple/merge.merged simple/ours.blob simple/base.blob simple/theirs.blob simple/diff3.merged --diff3 simple/ours.blob simple/base.blob simple/theirs.blob simple/zdiff3.merged --zdiff3 simple/ours.blob simple/base.blob simple/theirs.blob simple/merge-ours.merged --ours simple/ours.blob simple/base.blob simple/theirs.blob simple/merge-theirs.merged --theirs simple/ours.blob simple/base.blob simple/theirs.blob simple/merge-union.merged --union simple/ours.blob simple/base.blob simple/theirs.blob simple/diff3-histogram.merged --diff3 simple/ours.blob simple/base.blob simple/theirs.blob simple/zdiff3-histogram.merged --zdiff3 multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/merge.merged multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/diff3.merged --diff3 multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/zdiff3.merged --zdiff3 multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/merge-ours.merged --ours multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/merge-theirs.merged --theirs multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/merge-union.merged --union multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/diff3-histogram.merged --diff3 multi-change/ours.blob multi-change/base.blob multi-change/theirs.blob multi-change/zdiff3-histogram.merged --zdiff3 clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/merge.merged clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/diff3.merged --diff3 clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/zdiff3.merged --zdiff3 clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/merge-ours.merged --ours clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/merge-theirs.merged --theirs clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/merge-union.merged --union clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/diff3-histogram.merged --diff3 clear-ours/ours.blob clear-ours/base.blob clear-ours/theirs.blob clear-ours/zdiff3-histogram.merged --zdiff3 clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/merge.merged clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/diff3.merged --diff3 clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/zdiff3.merged --zdiff3 clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/merge-ours.merged --ours clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/merge-theirs.merged --theirs clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/merge-union.merged --union clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/diff3-histogram.merged --diff3 clear-theirs/ours.blob clear-theirs/base.blob clear-theirs/theirs.blob clear-theirs/zdiff3-histogram.merged --zdiff3 ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/merge.merged ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/diff3.merged --diff3 ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/zdiff3.merged --zdiff3 ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/merge-ours.merged --ours ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/merge-theirs.merged --theirs ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/merge-union.merged --union ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/diff3-histogram.merged --diff3 ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/zdiff3-histogram.merged --zdiff3 partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/merge.merged partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/diff3.merged --diff3 partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/zdiff3.merged --zdiff3 partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/merge-ours.merged --ours partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/merge-theirs.merged --theirs partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/merge-union.merged --union partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/diff3-histogram.merged --diff3 partial-match/ours.blob partial-match/base.blob partial-match/theirs.blob partial-match/zdiff3-histogram.merged --zdiff3 unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/merge.merged unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/diff3.merged --diff3 unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/zdiff3.merged --zdiff3 unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/merge-ours.merged --ours unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/merge-theirs.merged --theirs unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/merge-union.merged --union unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/diff3-histogram.merged --diff3 unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/zdiff3-histogram.merged --zdiff3 zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/merge.merged zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/diff3.merged --diff3 zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/zdiff3.merged --zdiff3 zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/merge-ours.merged --ours zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/merge-theirs.merged --theirs zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/merge-union.merged --union zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/diff3-histogram.merged --diff3 zdiff3-basic/ours.blob zdiff3-basic/base.blob zdiff3-basic/theirs.blob zdiff3-basic/zdiff3-histogram.merged --zdiff3 zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/merge.merged zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/diff3.merged --diff3 zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/zdiff3.merged --zdiff3 zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/merge-ours.merged --ours zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/merge-theirs.merged --theirs zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/merge-union.merged --union zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/diff3-histogram.merged --diff3 zdiff3-middlecommon/ours.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/zdiff3-histogram.merged --zdiff3 zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/merge.merged zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/diff3.merged --diff3 zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/zdiff3.merged --zdiff3 zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/merge-ours.merged --ours zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/merge-theirs.merged --theirs zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/merge-union.merged --union zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/diff3-histogram.merged --diff3 zdiff3-interesting/ours.blob zdiff3-interesting/base.blob zdiff3-interesting/theirs.blob zdiff3-interesting/zdiff3-histogram.merged --zdiff3 zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/merge.merged zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/diff3.merged --diff3 zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/zdiff3.merged --zdiff3 zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/merge-ours.merged --ours zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/merge-theirs.merged --theirs zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/merge-union.merged --union zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/diff3-histogram.merged --diff3 zdiff3-evil/ours.blob zdiff3-evil/base.blob zdiff3-evil/theirs.blob zdiff3-evil/zdiff3-histogram.merged --zdiff3 no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/merge.merged no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/diff3.merged --diff3 no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/zdiff3.merged --zdiff3 no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/merge-ours.merged --ours no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/merge-theirs.merged --theirs no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/merge-union.merged --union no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/diff3-histogram.merged --diff3 no-change-add/ours.blob no-change-add/base.blob no-change-add/theirs.blob no-change-add/zdiff3-histogram.merged --zdiff3 no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/merge.merged no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/diff3.merged --diff3 no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/zdiff3.merged --zdiff3 no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/merge-ours.merged --ours no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/merge-theirs.merged --theirs no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/merge-union.merged --union no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/diff3-histogram.merged --diff3 no-change-remove/ours.blob no-change-remove/base.blob no-change-remove/theirs.blob no-change-remove/zdiff3-histogram.merged --zdiff3 line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/merge.merged line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/diff3.merged --diff3 line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/zdiff3.merged --zdiff3 line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/merge-ours.merged --ours line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/merge-theirs.merged --theirs line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/merge-union.merged --union line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/diff3-histogram.merged --diff3 line-ending-change/ours.blob line-ending-change/base.blob line-ending-change/theirs.blob line-ending-change/zdiff3-histogram.merged --zdiff3 complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/merge.merged complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/diff3.merged --diff3 complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/zdiff3.merged --zdiff3 complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/merge-ours.merged --ours complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/merge-theirs.merged --theirs complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/merge-union.merged --union complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/diff3-histogram.merged --diff3 complex/no-change/ours.blob complex/no-change/base.blob complex/no-change/theirs.blob complex/no-change/zdiff3-histogram.merged --zdiff3 complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/merge.merged complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/diff3.merged --diff3 complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/zdiff3.merged --zdiff3 complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/merge-ours.merged --ours complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/merge-theirs.merged --theirs complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/merge-union.merged --union complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/diff3-histogram.merged --diff3 complex/no-conflict/ours.blob complex/no-conflict/base.blob complex/no-conflict/theirs.blob complex/no-conflict/zdiff3-histogram.merged --zdiff3 complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/merge.merged complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/diff3.merged --diff3 complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/zdiff3.merged --zdiff3 complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/merge-ours.merged --ours complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/merge-theirs.merged --theirs complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/merge-union.merged --union complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/diff3-histogram.merged --diff3 complex/no-conflict-too/ours.blob complex/no-conflict-too/base.blob complex/no-conflict-too/theirs.blob complex/no-conflict-too/zdiff3-histogram.merged --zdiff3 complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/merge.merged complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/diff3.merged --diff3 complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/zdiff3.merged --zdiff3 complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/merge-ours.merged --ours complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/merge-theirs.merged --theirs complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/merge-union.merged --union complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/diff3-histogram.merged --diff3 complex/they-changed/ours.blob complex/they-changed/base.blob complex/they-changed/theirs.blob complex/they-changed/zdiff3-histogram.merged --zdiff3 complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/merge.merged complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/diff3.merged --diff3 complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/zdiff3.merged --zdiff3 complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/merge-ours.merged --ours complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/merge-theirs.merged --theirs complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/merge-union.merged --union complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/diff3-histogram.merged --diff3 complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/zdiff3-histogram.merged --zdiff3 complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/merge.merged complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/diff3.merged --diff3 complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/zdiff3.merged --zdiff3 complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/merge-ours.merged --ours complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/merge-theirs.merged --theirs complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/merge-union.merged --union complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/diff3-histogram.merged --diff3 complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/zdiff3-histogram.merged --zdiff3 complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/merge.merged complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/diff3.merged --diff3 complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/zdiff3.merged --zdiff3 complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/merge-ours.merged --ours complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/merge-theirs.merged --theirs complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/merge-union.merged --union complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/diff3-histogram.merged --diff3 complex/with-conflicts/ours.blob complex/with-conflicts/base.blob complex/with-conflicts/theirs.blob complex/with-conflicts/zdiff3-histogram.merged --zdiff3 complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/merge.merged complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/diff3.merged --diff3 complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/zdiff3.merged --zdiff3 complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/merge-ours.merged --ours complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/merge-theirs.merged --theirs complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/merge-union.merged --union complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/diff3-histogram.merged --diff3 complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/zdiff3-histogram.merged --zdiff3 complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/merge.merged complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/diff3.merged --diff3 complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/zdiff3.merged --zdiff3 complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/merge-ours.merged --ours complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/merge-theirs.merged --theirs complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/merge-union.merged --union complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/diff3-histogram.merged --diff3 complex/auto-simplification/ours.blob complex/auto-simplification/base.blob complex/auto-simplification/theirs.blob complex/auto-simplification/zdiff3-histogram.merged --zdiff3 complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/merge.merged complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/diff3.merged --diff3 complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/zdiff3.merged --zdiff3 complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/merge-ours.merged --ours complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/merge-theirs.merged --theirs complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/merge-union.merged --union complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/diff3-histogram.merged --diff3 complex/auto-simplification2/ours.blob complex/auto-simplification2/base.blob complex/auto-simplification2/theirs.blob complex/auto-simplification2/zdiff3-histogram.merged --zdiff3 complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/merge.merged complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/diff3.merged --diff3 complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/zdiff3.merged --zdiff3 complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/merge-ours.merged --ours complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/merge-theirs.merged --theirs complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/merge-union.merged --union complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/diff3-histogram.merged --diff3 complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/zdiff3-histogram.merged --zdiff3 complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/merge.merged complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/diff3.merged --diff3 complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/zdiff3.merged --zdiff3 complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/merge-ours.merged --ours complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/merge-theirs.merged --theirs complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/merge-union.merged --union complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/diff3-histogram.merged --diff3 complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/zdiff3-histogram.merged --zdiff3 complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/merge.merged complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/diff3.merged --diff3 complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/zdiff3.merged --zdiff3 complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/merge-ours.merged --ours complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/merge-theirs.merged --theirs complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/merge-union.merged --union complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/diff3-histogram.merged --diff3 complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/zdiff3-histogram.merged --zdiff3 complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/merge.merged complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/diff3.merged --diff3 complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/zdiff3.merged --zdiff3 complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/merge-ours.merged --ours complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/merge-theirs.merged --theirs complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/merge-union.merged --union complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/diff3-histogram.merged --diff3 complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/zdiff3-histogram.merged --zdiff3 complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/merge.merged complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/diff3.merged --diff3 complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/zdiff3.merged --zdiff3 complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/merge-ours.merged --ours complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/merge-theirs.merged --theirs complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/merge-union.merged --union complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/diff3-histogram.merged --diff3 complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/zdiff3-histogram.merged --zdiff3 unique-merge-base-with-insertion000075500000000000000000000000001046102023000154055ustar 00000000000000unique-merge-base-with-insertion/merge-ours.merged-reversed000064400000000000000000000000151046102023000225470ustar 000000000000001 2 3 4 5 sixunique-merge-base-with-insertion/diff3.merged000064400000000000000000000002631046102023000176450ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/ours.blob 7 ||||||| unique-merge-base-with-insertion/base.blob ======= six >>>>>>> unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/merge-union.merged000064400000000000000000000000171046102023000210740ustar 000000000000001 2 3 4 5 7 sixunique-merge-base-with-insertion/ours.blob000064400000000000000000000000131046102023000173060ustar 000000000000001 2 3 4 5 7unique-merge-base-with-insertion/diff3.merged-reversed000064400000000000000000000002631046102023000214620ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/theirs.blob six ||||||| unique-merge-base-with-insertion/base.blob ======= 7 >>>>>>> unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/zdiff3.merged-reversed000064400000000000000000000002631046102023000216540ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/theirs.blob six ||||||| unique-merge-base-with-insertion/base.blob ======= 7 >>>>>>> unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/base.blob000064400000000000000000000000121046102023000172270ustar 000000000000001 2 3 4 5 unique-merge-base-with-insertion/diff3-histogram.merged000064400000000000000000000002631046102023000216400ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/ours.blob 7 ||||||| unique-merge-base-with-insertion/base.blob ======= six >>>>>>> unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/zdiff3-histogram.merged000064400000000000000000000002631046102023000220320ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/ours.blob 7 ||||||| unique-merge-base-with-insertion/base.blob ======= six >>>>>>> unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/diff3-histogram.merged-reversed000064400000000000000000000002631046102023000234550ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/theirs.blob six ||||||| unique-merge-base-with-insertion/base.blob ======= 7 >>>>>>> unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/merge-ours.merged000064400000000000000000000000131046102023000207300ustar 000000000000001 2 3 4 5 7unique-merge-base-with-insertion/merge.merged000064400000000000000000000002001046102023000177400ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/ours.blob 7 ======= six >>>>>>> unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/merge-theirs.merged-reversed000064400000000000000000000000131046102023000230530ustar 000000000000001 2 3 4 5 7unique-merge-base-with-insertion/merge.merged-reversed000064400000000000000000000002001046102023000215550ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/theirs.blob six ======= 7 >>>>>>> unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/theirs.blob000064400000000000000000000000151046102023000176160ustar 000000000000001 2 3 4 5 sixunique-merge-base-with-insertion/zdiff3-histogram.merged-reversed000064400000000000000000000002631046102023000236470ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/theirs.blob six ||||||| unique-merge-base-with-insertion/base.blob ======= 7 >>>>>>> unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/zdiff3.merged000064400000000000000000000002631046102023000200370ustar 000000000000001 2 3 4 5 <<<<<<< unique-merge-base-with-insertion/ours.blob 7 ||||||| unique-merge-base-with-insertion/base.blob ======= six >>>>>>> unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/merge-theirs.merged000064400000000000000000000000151046102023000212400ustar 000000000000001 2 3 4 5 sixunique-merge-base-with-insertion/merge-union.merged-reversed000064400000000000000000000000171046102023000227110ustar 000000000000001 2 3 4 5 six 7ours-2-lines-theirs-1-line000075500000000000000000000000001046102023000137275ustar 00000000000000ours-2-lines-theirs-1-line/merge-ours.merged-reversed000064400000000000000000000000141046102023000210700ustar 000000000000000 1 Y 3 4 5 ours-2-lines-theirs-1-line/diff3.merged000064400000000000000000000002451046102023000161670ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/ours.blob X X ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= Y 3 >>>>>>> ours-2-lines-theirs-1-line/theirs.blob 4 5 ours-2-lines-theirs-1-line/merge-union.merged000064400000000000000000000000201046102023000174100ustar 000000000000000 1 X X Y 3 4 5 ours-2-lines-theirs-1-line/ours.blob000064400000000000000000000000141046102023000156310ustar 000000000000000 1 X X 4 5 ours-2-lines-theirs-1-line/diff3.merged-reversed000064400000000000000000000002451046102023000200040ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/theirs.blob Y 3 ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= X X >>>>>>> ours-2-lines-theirs-1-line/ours.blob 4 5 ours-2-lines-theirs-1-line/zdiff3.merged-reversed000064400000000000000000000002451046102023000201760ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/theirs.blob Y 3 ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= X X >>>>>>> ours-2-lines-theirs-1-line/ours.blob 4 5 ours-2-lines-theirs-1-line/base.blob000064400000000000000000000000141046102023000155530ustar 000000000000000 1 2 3 4 5 ours-2-lines-theirs-1-line/diff3-histogram.merged000064400000000000000000000002451046102023000201620ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/ours.blob X X ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= Y 3 >>>>>>> ours-2-lines-theirs-1-line/theirs.blob 4 5 ours-2-lines-theirs-1-line/zdiff3-histogram.merged000064400000000000000000000002451046102023000203540ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/ours.blob X X ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= Y 3 >>>>>>> ours-2-lines-theirs-1-line/theirs.blob 4 5 ours-2-lines-theirs-1-line/diff3-histogram.merged-reversed000064400000000000000000000002451046102023000217770ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/theirs.blob Y 3 ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= X X >>>>>>> ours-2-lines-theirs-1-line/ours.blob 4 5 ours-2-lines-theirs-1-line/merge-ours.merged000064400000000000000000000000141046102023000172530ustar 000000000000000 1 X X 4 5 ours-2-lines-theirs-1-line/merge.merged000064400000000000000000000001641046102023000162730ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/ours.blob X X ======= Y 3 >>>>>>> ours-2-lines-theirs-1-line/theirs.blob 4 5 ours-2-lines-theirs-1-line/merge-theirs.merged-reversed000064400000000000000000000000141046102023000213760ustar 000000000000000 1 X X 4 5 ours-2-lines-theirs-1-line/merge.merged-reversed000064400000000000000000000001641046102023000201100ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/theirs.blob Y 3 ======= X X >>>>>>> ours-2-lines-theirs-1-line/ours.blob 4 5 ours-2-lines-theirs-1-line/theirs.blob000064400000000000000000000000141046102023000161370ustar 000000000000000 1 Y 3 4 5 ours-2-lines-theirs-1-line/zdiff3-histogram.merged-reversed000064400000000000000000000002451046102023000221710ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/theirs.blob Y 3 ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= X X >>>>>>> ours-2-lines-theirs-1-line/ours.blob 4 5 ours-2-lines-theirs-1-line/zdiff3.merged000064400000000000000000000002451046102023000163610ustar 000000000000000 1 <<<<<<< ours-2-lines-theirs-1-line/ours.blob X X ||||||| ours-2-lines-theirs-1-line/base.blob 2 3 ======= Y 3 >>>>>>> ours-2-lines-theirs-1-line/theirs.blob 4 5 ours-2-lines-theirs-1-line/merge-theirs.merged000064400000000000000000000000141046102023000175610ustar 000000000000000 1 Y 3 4 5 ours-2-lines-theirs-1-line/merge-union.merged-reversed000064400000000000000000000000201046102023000212250ustar 000000000000000 1 Y 3 X X 4 5 simple000075500000000000000000000000001046102023000104025ustar 00000000000000simple/merge-ours.merged-reversed000064400000000000000000000000441046102023000155460ustar 00000000000000line1-changed-by-both line2-changed simple/diff3.merged000064400000000000000000000003531046102023000126420ustar 00000000000000<<<<<<< simple/ours.blob line1-changed-by-both line2-to-be-changed-in-incoming ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line1-changed-by-both line2-changed >>>>>>> simple/theirs.blob simple/merge-union.merged000064400000000000000000000001041046102023000140660ustar 00000000000000line1-changed-by-both line2-to-be-changed-in-incoming line2-changed simple/ours.blob000064400000000000000000000000661046102023000123130ustar 00000000000000line1-changed-by-both line2-to-be-changed-in-incoming simple/diff3.merged-reversed000064400000000000000000000003531046102023000144570ustar 00000000000000<<<<<<< simple/theirs.blob line1-changed-by-both line2-changed ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line1-changed-by-both line2-to-be-changed-in-incoming >>>>>>> simple/ours.blob simple/zdiff3.merged-reversed000064400000000000000000000003251046102023000146500ustar 00000000000000line1-changed-by-both <<<<<<< simple/theirs.blob line2-changed ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line2-to-be-changed-in-incoming >>>>>>> simple/ours.blob simple/base.blob000064400000000000000000000000741046102023000122340ustar 00000000000000line1-to-be-changed-by-both line2-to-be-changed-in-incoming simple/diff3-histogram.merged000064400000000000000000000003531046102023000146350ustar 00000000000000<<<<<<< simple/ours.blob line1-changed-by-both line2-to-be-changed-in-incoming ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line1-changed-by-both line2-changed >>>>>>> simple/theirs.blob simple/zdiff3-histogram.merged000064400000000000000000000003251046102023000150260ustar 00000000000000line1-changed-by-both <<<<<<< simple/ours.blob line2-to-be-changed-in-incoming ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line2-changed >>>>>>> simple/theirs.blob simple/diff3-histogram.merged-reversed000064400000000000000000000003531046102023000164520ustar 00000000000000<<<<<<< simple/theirs.blob line1-changed-by-both line2-changed ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line1-changed-by-both line2-to-be-changed-in-incoming >>>>>>> simple/ours.blob simple/merge-ours.merged000064400000000000000000000000661046102023000137350ustar 00000000000000line1-changed-by-both line2-to-be-changed-in-incoming simple/merge.merged000064400000000000000000000002001046102023000127350ustar 00000000000000line1-changed-by-both <<<<<<< simple/ours.blob line2-to-be-changed-in-incoming ======= line2-changed >>>>>>> simple/theirs.blob simple/merge-theirs.merged-reversed000064400000000000000000000000661046102023000160600ustar 00000000000000line1-changed-by-both line2-to-be-changed-in-incoming simple/merge.merged-reversed000064400000000000000000000002001046102023000145520ustar 00000000000000line1-changed-by-both <<<<<<< simple/theirs.blob line2-changed ======= line2-to-be-changed-in-incoming >>>>>>> simple/ours.blob simple/theirs.blob000064400000000000000000000000441046102023000126150ustar 00000000000000line1-changed-by-both line2-changed simple/zdiff3-histogram.merged-reversed000064400000000000000000000003251046102023000166430ustar 00000000000000line1-changed-by-both <<<<<<< simple/theirs.blob line2-changed ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line2-to-be-changed-in-incoming >>>>>>> simple/ours.blob simple/zdiff3.merged000064400000000000000000000003251046102023000130330ustar 00000000000000line1-changed-by-both <<<<<<< simple/ours.blob line2-to-be-changed-in-incoming ||||||| simple/base.blob line1-to-be-changed-by-both line2-to-be-changed-in-incoming ======= line2-changed >>>>>>> simple/theirs.blob simple/merge-theirs.merged000064400000000000000000000000441046102023000142370ustar 00000000000000line1-changed-by-both line2-changed simple/merge-union.merged-reversed000064400000000000000000000001041046102023000157030ustar 00000000000000line1-changed-by-both line2-changed line2-to-be-changed-in-incoming zdiff3-evil000075500000000000000000000000001046102023000112335ustar 00000000000000zdiff3-evil/merge-ours.merged-reversed000064400000000000000000000000321046102023000163740ustar 000000000000001 2 3 4 Y A B C B C 7 8 9 zdiff3-evil/diff3.merged000064400000000000000000000002121046102023000134650ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/ours.blob X A B C ||||||| zdiff3-evil/base.blob 5 6 ======= Y A B C B C >>>>>>> zdiff3-evil/theirs.blob 7 8 9 zdiff3-evil/merge-union.merged000064400000000000000000000000421046102023000147200ustar 000000000000001 2 3 4 X A B C Y A B C B C 7 8 9 zdiff3-evil/ours.blob000064400000000000000000000000261046102023000131400ustar 000000000000001 2 3 4 X A B C 7 8 9 zdiff3-evil/diff3.merged-reversed000064400000000000000000000002121046102023000153020ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/theirs.blob Y A B C B C ||||||| zdiff3-evil/base.blob 5 6 ======= X A B C >>>>>>> zdiff3-evil/ours.blob 7 8 9 zdiff3-evil/zdiff3.merged-reversed000064400000000000000000000002061046102023000154770ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/theirs.blob Y A B C ||||||| zdiff3-evil/base.blob 5 6 ======= X A >>>>>>> zdiff3-evil/ours.blob B C 7 8 9 zdiff3-evil/base.blob000064400000000000000000000000221046102023000130560ustar 000000000000001 2 3 4 5 6 7 8 9 zdiff3-evil/diff3-histogram.merged000064400000000000000000000002121046102023000154600ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/ours.blob X A B C ||||||| zdiff3-evil/base.blob 5 6 ======= Y A B C B C >>>>>>> zdiff3-evil/theirs.blob 7 8 9 zdiff3-evil/zdiff3-histogram.merged000064400000000000000000000002061046102023000156550ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/ours.blob X A ||||||| zdiff3-evil/base.blob 5 6 ======= Y A B C >>>>>>> zdiff3-evil/theirs.blob B C 7 8 9 zdiff3-evil/diff3-histogram.merged-reversed000064400000000000000000000002121046102023000172750ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/theirs.blob Y A B C B C ||||||| zdiff3-evil/base.blob 5 6 ======= X A B C >>>>>>> zdiff3-evil/ours.blob 7 8 9 zdiff3-evil/merge-ours.merged000064400000000000000000000000261046102023000145620ustar 000000000000001 2 3 4 X A B C 7 8 9 zdiff3-evil/merge.merged000064400000000000000000000001501046102023000135720ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/ours.blob X A B C ======= Y A B C B C >>>>>>> zdiff3-evil/theirs.blob 7 8 9 zdiff3-evil/merge-theirs.merged-reversed000064400000000000000000000000261046102023000167050ustar 000000000000001 2 3 4 X A B C 7 8 9 zdiff3-evil/merge.merged-reversed000064400000000000000000000001501046102023000154070ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/theirs.blob Y A B C B C ======= X A B C >>>>>>> zdiff3-evil/ours.blob 7 8 9 zdiff3-evil/theirs.blob000064400000000000000000000000321046102023000134430ustar 000000000000001 2 3 4 Y A B C B C 7 8 9 zdiff3-evil/zdiff3-histogram.merged-reversed000064400000000000000000000002061046102023000174720ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/theirs.blob Y A B C ||||||| zdiff3-evil/base.blob 5 6 ======= X A >>>>>>> zdiff3-evil/ours.blob B C 7 8 9 zdiff3-evil/zdiff3.merged000064400000000000000000000002061046102023000136620ustar 000000000000001 2 3 4 <<<<<<< zdiff3-evil/ours.blob X A ||||||| zdiff3-evil/base.blob 5 6 ======= Y A B C >>>>>>> zdiff3-evil/theirs.blob B C 7 8 9 zdiff3-evil/merge-theirs.merged000064400000000000000000000000321046102023000150650ustar 000000000000001 2 3 4 Y A B C B C 7 8 9 zdiff3-evil/merge-union.merged-reversed000064400000000000000000000000421046102023000165350ustar 000000000000001 2 3 4 Y A B C B C X A B C 7 8 9 no-change-remove000075500000000000000000000000001046102023000122435ustar 00000000000000no-change-remove/merge-ours.merged-reversed000064400000000000000000000000231046102023000174040ustar 00000000000000 line 1 line 2 no-change-remove/diff3.merged000064400000000000000000000000231046102023000144750ustar 00000000000000 line 1 line 2 no-change-remove/merge-union.merged000064400000000000000000000000231046102023000157270ustar 00000000000000 line 1 line 2 no-change-remove/ours.blob000064400000000000000000000000231046102023000141450ustar 00000000000000 line 1 line 2 no-change-remove/diff3.merged-reversed000064400000000000000000000000231046102023000163120ustar 00000000000000 line 1 line 2 no-change-remove/zdiff3.merged-reversed000064400000000000000000000000231046102023000165040ustar 00000000000000 line 1 line 2 no-change-remove/base.blob000064400000000000000000000001031046102023000140660ustar 00000000000000 line 1 line in between line 2 line in between line 3 no-change-remove/diff3-histogram.merged000064400000000000000000000000231046102023000164700ustar 00000000000000 line 1 line 2 no-change-remove/zdiff3-histogram.merged000064400000000000000000000000231046102023000166620ustar 00000000000000 line 1 line 2 no-change-remove/diff3-histogram.merged-reversed000064400000000000000000000000231046102023000203050ustar 00000000000000 line 1 line 2 no-change-remove/merge-ours.merged000064400000000000000000000000231046102023000155670ustar 00000000000000 line 1 line 2 no-change-remove/merge.merged000064400000000000000000000000231046102023000146010ustar 00000000000000 line 1 line 2 no-change-remove/merge-theirs.merged-reversed000064400000000000000000000000231046102023000177120ustar 00000000000000 line 1 line 2 no-change-remove/merge.merged-reversed000064400000000000000000000000231046102023000164160ustar 00000000000000 line 1 line 2 no-change-remove/theirs.blob000064400000000000000000000000231046102023000144530ustar 00000000000000 line 1 line 2 no-change-remove/zdiff3-histogram.merged-reversed000064400000000000000000000000231046102023000204770ustar 00000000000000 line 1 line 2 no-change-remove/zdiff3.merged000064400000000000000000000000231046102023000146670ustar 00000000000000 line 1 line 2 no-change-remove/merge-theirs.merged000064400000000000000000000000231046102023000160750ustar 00000000000000 line 1 line 2 no-change-remove/merge-union.merged-reversed000064400000000000000000000000231046102023000175440ustar 00000000000000 line 1 line 2 zdiff3-basic000075500000000000000000000000001046102023000113555ustar 00000000000000zdiff3-basic/merge-ours.merged-reversed000064400000000000000000000000301046102023000165140ustar 000000000000001 2 3 4 A X C Y E 7 8 9 zdiff3-basic/diff3.merged000064400000000000000000000002151046102023000136120ustar 000000000000001 2 3 4 <<<<<<< zdiff3-basic/ours.blob A B C D E ||||||| zdiff3-basic/base.blob 5 6 ======= A X C Y E >>>>>>> zdiff3-basic/theirs.blob 7 8 9 zdiff3-basic/merge-union.merged000064400000000000000000000000361046102023000150450ustar 000000000000001 2 3 4 A B C D X C Y E 7 8 9 zdiff3-basic/ours.blob000064400000000000000000000000301046102023000132550ustar 000000000000001 2 3 4 A B C D E 7 8 9 zdiff3-basic/diff3.merged-reversed000064400000000000000000000002151046102023000154270ustar 000000000000001 2 3 4 <<<<<<< zdiff3-basic/theirs.blob A X C Y E ||||||| zdiff3-basic/base.blob 5 6 ======= A B C D E >>>>>>> zdiff3-basic/ours.blob 7 8 9 zdiff3-basic/zdiff3.merged-reversed000064400000000000000000000002111046102023000156150ustar 000000000000001 2 3 4 A <<<<<<< zdiff3-basic/theirs.blob X C Y ||||||| zdiff3-basic/base.blob 5 6 ======= B C D >>>>>>> zdiff3-basic/ours.blob E 7 8 9 zdiff3-basic/base.blob000064400000000000000000000000221046102023000132000ustar 000000000000001 2 3 4 5 6 7 8 9 zdiff3-basic/diff3-histogram.merged000064400000000000000000000002151046102023000156050ustar 000000000000001 2 3 4 <<<<<<< zdiff3-basic/ours.blob A B C D E ||||||| zdiff3-basic/base.blob 5 6 ======= A X C Y E >>>>>>> zdiff3-basic/theirs.blob 7 8 9 zdiff3-basic/zdiff3-histogram.merged000064400000000000000000000002111046102023000157730ustar 000000000000001 2 3 4 A <<<<<<< zdiff3-basic/ours.blob B C D ||||||| zdiff3-basic/base.blob 5 6 ======= X C Y >>>>>>> zdiff3-basic/theirs.blob E 7 8 9 zdiff3-basic/diff3-histogram.merged-reversed000064400000000000000000000002151046102023000174220ustar 000000000000001 2 3 4 <<<<<<< zdiff3-basic/theirs.blob A X C Y E ||||||| zdiff3-basic/base.blob 5 6 ======= A B C D E >>>>>>> zdiff3-basic/ours.blob 7 8 9 zdiff3-basic/merge-ours.merged000064400000000000000000000000301046102023000146770ustar 000000000000001 2 3 4 A B C D E 7 8 9 zdiff3-basic/merge.merged000064400000000000000000000001461046102023000137210ustar 000000000000001 2 3 4 A <<<<<<< zdiff3-basic/ours.blob B C D ======= X C Y >>>>>>> zdiff3-basic/theirs.blob E 7 8 9 zdiff3-basic/merge-theirs.merged-reversed000064400000000000000000000000301046102023000170220ustar 000000000000001 2 3 4 A B C D E 7 8 9 zdiff3-basic/merge.merged-reversed000064400000000000000000000001461046102023000155360ustar 000000000000001 2 3 4 A <<<<<<< zdiff3-basic/theirs.blob X C Y ======= B C D >>>>>>> zdiff3-basic/ours.blob E 7 8 9 zdiff3-basic/theirs.blob000064400000000000000000000000301046102023000135630ustar 000000000000001 2 3 4 A X C Y E 7 8 9 zdiff3-basic/zdiff3-histogram.merged-reversed000064400000000000000000000002111046102023000176100ustar 000000000000001 2 3 4 A <<<<<<< zdiff3-basic/theirs.blob X C Y ||||||| zdiff3-basic/base.blob 5 6 ======= B C D >>>>>>> zdiff3-basic/ours.blob E 7 8 9 zdiff3-basic/zdiff3.merged000064400000000000000000000002111046102023000140000ustar 000000000000001 2 3 4 A <<<<<<< zdiff3-basic/ours.blob B C D ||||||| zdiff3-basic/base.blob 5 6 ======= X C Y >>>>>>> zdiff3-basic/theirs.blob E 7 8 9 zdiff3-basic/merge-theirs.merged000064400000000000000000000000301046102023000152050ustar 000000000000001 2 3 4 A X C Y E 7 8 9 zdiff3-basic/merge-union.merged-reversed000064400000000000000000000000361046102023000166620ustar 000000000000001 2 3 4 A X C Y B C D E 7 8 9 clear-theirs000075500000000000000000000000001046102023000114735ustar 00000000000000clear-theirs/merge-ours.merged-reversed000064400000000000000000000000001046102023000166270ustar 00000000000000clear-theirs/diff3.merged000064400000000000000000000001751046102023000137350ustar 00000000000000<<<<<<< clear-theirs/ours.blob O O O O O ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-theirs/theirs.blob clear-theirs/merge-union.merged000064400000000000000000000000121046102023000151550ustar 00000000000000O O O O O clear-theirs/ours.blob000064400000000000000000000000121046102023000133730ustar 00000000000000O O O O O clear-theirs/diff3.merged-reversed000064400000000000000000000001751046102023000155520ustar 00000000000000<<<<<<< clear-theirs/theirs.blob ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= O O O O O >>>>>>> clear-theirs/ours.blob clear-theirs/zdiff3.merged-reversed000064400000000000000000000001751046102023000157440ustar 00000000000000<<<<<<< clear-theirs/theirs.blob ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= O O O O O >>>>>>> clear-theirs/ours.blob clear-theirs/base.blob000064400000000000000000000000141046102023000133170ustar 000000000000000 1 2 3 4 5 clear-theirs/diff3-histogram.merged000064400000000000000000000001751046102023000157300ustar 00000000000000<<<<<<< clear-theirs/ours.blob O O O O O ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-theirs/theirs.blob clear-theirs/zdiff3-histogram.merged000064400000000000000000000001751046102023000161220ustar 00000000000000<<<<<<< clear-theirs/ours.blob O O O O O ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-theirs/theirs.blob clear-theirs/diff3-histogram.merged-reversed000064400000000000000000000001751046102023000175450ustar 00000000000000<<<<<<< clear-theirs/theirs.blob ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= O O O O O >>>>>>> clear-theirs/ours.blob clear-theirs/merge-ours.merged000064400000000000000000000000121046102023000150150ustar 00000000000000O O O O O clear-theirs/merge.merged000064400000000000000000000001221046102023000140310ustar 00000000000000<<<<<<< clear-theirs/ours.blob O O O O O ======= >>>>>>> clear-theirs/theirs.blob clear-theirs/merge-theirs.merged-reversed000064400000000000000000000000121046102023000171400ustar 00000000000000O O O O O clear-theirs/merge.merged-reversed000064400000000000000000000001221046102023000156460ustar 00000000000000<<<<<<< clear-theirs/theirs.blob ======= O O O O O >>>>>>> clear-theirs/ours.blob clear-theirs/theirs.blob000064400000000000000000000000001046102023000136760ustar 00000000000000clear-theirs/zdiff3-histogram.merged-reversed000064400000000000000000000001751046102023000177370ustar 00000000000000<<<<<<< clear-theirs/theirs.blob ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= O O O O O >>>>>>> clear-theirs/ours.blob clear-theirs/zdiff3.merged000064400000000000000000000001751046102023000141270ustar 00000000000000<<<<<<< clear-theirs/ours.blob O O O O O ||||||| clear-theirs/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-theirs/theirs.blob clear-theirs/merge-theirs.merged000064400000000000000000000000001046102023000153200ustar 00000000000000clear-theirs/merge-union.merged-reversed000064400000000000000000000000121046102023000167720ustar 00000000000000O O O O O complex000075500000000000000000000000001046102023000105605ustar 00000000000000complex/with-conflicts000075500000000000000000000000001046102023000135155ustar 00000000000000complex/with-conflicts/merge-ours.merged-reversed000064400000000000000000000005031046102023000206610ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/diff3.merged000064400000000000000000000005031046102023000157520ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/merge-union.merged000064400000000000000000000005031046102023000172040ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/ours.blob000064400000000000000000000005031046102023000154220ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/diff3.merged-reversed000064400000000000000000000005031046102023000175670ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/zdiff3.merged-reversed000064400000000000000000000005031046102023000177610ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/base.blob000064400000000000000000000002761046102023000153530ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/with-conflicts/diff3-histogram.merged000064400000000000000000000005031046102023000177450ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/zdiff3-histogram.merged000064400000000000000000000005031046102023000201370ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/diff3-histogram.merged-reversed000064400000000000000000000005031046102023000215620ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/merge-ours.merged000064400000000000000000000005031046102023000170440ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/merge.merged000064400000000000000000000005031046102023000160560ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/merge-theirs.merged-reversed000064400000000000000000000005031046102023000211670ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/merge.merged-reversed000064400000000000000000000005031046102023000176730ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/theirs.blob000064400000000000000000000002761046102023000157370ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/with-conflicts/zdiff3-histogram.merged-reversed000064400000000000000000000005031046102023000217540ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/zdiff3.merged000064400000000000000000000005031046102023000161440ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/merge-theirs.merged000064400000000000000000000005031046102023000173520ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts/merge-union.merged-reversed000064400000000000000000000005031046102023000210210ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/new1.blob000064400000000000000000000005031046102023000123470ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/missing-LF-at-EOF000075500000000000000000000000001046102023000135415ustar 00000000000000complex/missing-LF-at-EOF/merge-ours.merged-reversed000064400000000000000000000002751046102023000207130ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF/diff3.merged000064400000000000000000000007711046102023000160050ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/ours.blob propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. >>>>>>> complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/merge-union.merged000064400000000000000000000005261046102023000172350ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. propter nomen suum.complex/missing-LF-at-EOF/ours.blob000064400000000000000000000005031046102023000154460ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/missing-LF-at-EOF/diff3.merged-reversed000064400000000000000000000007711046102023000176220ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/theirs.blob propter nomen suum. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/zdiff3.merged-reversed000064400000000000000000000007711046102023000200140ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/theirs.blob propter nomen suum. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/base.blob000064400000000000000000000002761046102023000153770ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/missing-LF-at-EOF/diff3-histogram.merged000064400000000000000000000007711046102023000200000ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/ours.blob propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. >>>>>>> complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/zdiff3-histogram.merged000064400000000000000000000007711046102023000201720ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/ours.blob propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. >>>>>>> complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/diff3-histogram.merged-reversed000064400000000000000000000007711046102023000216150ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/theirs.blob propter nomen suum. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/merge-ours.merged000064400000000000000000000005031046102023000170700ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/missing-LF-at-EOF/merge.merged000064400000000000000000000006711046102023000161100ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/ours.blob propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= propter nomen suum. >>>>>>> complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/merge-theirs.merged-reversed000064400000000000000000000005031046102023000212130ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/missing-LF-at-EOF/merge.merged-reversed000064400000000000000000000006711046102023000177250ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/theirs.blob propter nomen suum. ======= propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/theirs.blob000064400000000000000000000002751046102023000157620ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF/zdiff3-histogram.merged-reversed000064400000000000000000000007711046102023000220070ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/theirs.blob propter nomen suum. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/zdiff3.merged000064400000000000000000000007711046102023000161770ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, <<<<<<< complex/missing-LF-at-EOF/ours.blob propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/missing-LF-at-EOF/base.blob propter nomen suum. ======= propter nomen suum. >>>>>>> complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/merge-theirs.merged000064400000000000000000000002751046102023000174040ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF/merge-union.merged-reversed000064400000000000000000000005271046102023000210530ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict-too000075500000000000000000000000001046102023000135725ustar 00000000000000complex/no-conflict-too/merge-ours.merged-reversed000064400000000000000000000002761046102023000207450ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/diff3.merged000064400000000000000000000002761046102023000160360ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/merge-union.merged000064400000000000000000000002761046102023000172700ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/ours.blob000064400000000000000000000002761046102023000155060ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/diff3.merged-reversed000064400000000000000000000002761046102023000176530ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/zdiff3.merged-reversed000064400000000000000000000002761046102023000200450ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/base.blob000064400000000000000000000002761046102023000154300ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/diff3-histogram.merged000064400000000000000000000002761046102023000200310ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/zdiff3-histogram.merged000064400000000000000000000002761046102023000202230ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/diff3-histogram.merged-reversed000064400000000000000000000002761046102023000216460ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/merge-ours.merged000064400000000000000000000002761046102023000171300ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/merge.merged000064400000000000000000000002761046102023000161420ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/merge-theirs.merged-reversed000064400000000000000000000002761046102023000212530ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/merge.merged-reversed000064400000000000000000000002761046102023000177570ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/theirs.blob000064400000000000000000000002761046102023000160140ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/zdiff3-histogram.merged-reversed000064400000000000000000000002761046102023000220400ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/zdiff3.merged000064400000000000000000000002761046102023000162300ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/merge-theirs.merged000064400000000000000000000002761046102023000174360ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict-too/merge-union.merged-reversed000064400000000000000000000002761046102023000211050ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed000075500000000000000000000000001046102023000131205ustar 00000000000000complex/they-changed/merge-ours.merged-reversed000064400000000000000000000002761046102023000202730ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/diff3.merged000064400000000000000000000002761046102023000153640ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/merge-union.merged000064400000000000000000000002761046102023000166160ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/ours.blob000064400000000000000000000000001046102023000150150ustar 00000000000000complex/they-changed/diff3.merged-reversed000064400000000000000000000002761046102023000172010ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/zdiff3.merged-reversed000064400000000000000000000002761046102023000173730ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/base.blob000064400000000000000000000000001046102023000147370ustar 00000000000000complex/they-changed/diff3-histogram.merged000064400000000000000000000002761046102023000173570ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/zdiff3-histogram.merged000064400000000000000000000002761046102023000175510ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/diff3-histogram.merged-reversed000064400000000000000000000002761046102023000211740ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/merge-ours.merged000064400000000000000000000002761046102023000164560ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/merge.merged000064400000000000000000000002761046102023000154700ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/merge-theirs.merged-reversed000064400000000000000000000002761046102023000206010ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/merge.merged-reversed000064400000000000000000000002761046102023000173050ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/theirs.blob000064400000000000000000000002761046102023000153420ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/zdiff3-histogram.merged-reversed000064400000000000000000000002761046102023000213660ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/zdiff3.merged000064400000000000000000000002761046102023000155560ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/merge-theirs.merged000064400000000000000000000002761046102023000167640ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/they-changed/merge-union.merged-reversed000064400000000000000000000002761046102023000204330ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/with-conflicts-in-removed-tail000075500000000000000000000000001046102023000165075ustar 00000000000000complex/with-conflicts-in-removed-tail/merge-ours.merged-reversed000064400000000000000000000005031046102023000236530ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts-in-removed-tail/diff3.merged000064400000000000000000000011751046102023000207520ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/ours.blob ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/merge-union.merged000064400000000000000000000005031046102023000221760ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts-in-removed-tail/ours.blob000064400000000000000000000002761046102023000204230ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/with-conflicts-in-removed-tail/diff3.merged-reversed000064400000000000000000000011751046102023000225670ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/theirs.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= >>>>>>> complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/zdiff3.merged-reversed000064400000000000000000000011751046102023000227610ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/theirs.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= >>>>>>> complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/base.blob000064400000000000000000000005031046102023000203360ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts-in-removed-tail/diff3-histogram.merged000064400000000000000000000011751046102023000227450ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/ours.blob ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/zdiff3-histogram.merged000064400000000000000000000011751046102023000231370ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/ours.blob ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/diff3-histogram.merged-reversed000064400000000000000000000011751046102023000245620ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/theirs.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= >>>>>>> complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/merge-ours.merged000064400000000000000000000002761046102023000220450ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/with-conflicts-in-removed-tail/merge.merged000064400000000000000000000006771046102023000210640ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/ours.blob ======= Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/merge-theirs.merged-reversed000064400000000000000000000002761046102023000241700ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/with-conflicts-in-removed-tail/merge.merged-reversed000064400000000000000000000006771046102023000227010ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/theirs.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= >>>>>>> complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/theirs.blob000064400000000000000000000005031046102023000207220ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts-in-removed-tail/zdiff3-histogram.merged-reversed000064400000000000000000000011751046102023000247540ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/theirs.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= >>>>>>> complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/zdiff3.merged000064400000000000000000000011751046102023000211440ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. <<<<<<< complex/with-conflicts-in-removed-tail/ours.blob ||||||| complex/with-conflicts-in-removed-tail/base.blob Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. ======= Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. >>>>>>> complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/merge-theirs.merged000064400000000000000000000005031046102023000223440ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/with-conflicts-in-removed-tail/merge-union.merged-reversed000064400000000000000000000005031046102023000240130ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-change000075500000000000000000000000001046102023000124175ustar 00000000000000complex/no-change/merge-ours.merged-reversed000064400000000000000000000002761046102023000175720ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/diff3.merged000064400000000000000000000002761046102023000146630ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/merge-union.merged000064400000000000000000000002761046102023000161150ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/ours.blob000064400000000000000000000002761046102023000143330ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/diff3.merged-reversed000064400000000000000000000002761046102023000165000ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/zdiff3.merged-reversed000064400000000000000000000002761046102023000166720ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/base.blob000064400000000000000000000002761046102023000142550ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/diff3-histogram.merged000064400000000000000000000002761046102023000166560ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/zdiff3-histogram.merged000064400000000000000000000002761046102023000170500ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/diff3-histogram.merged-reversed000064400000000000000000000002761046102023000204730ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/merge-ours.merged000064400000000000000000000002761046102023000157550ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/merge.merged000064400000000000000000000002761046102023000147670ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/merge-theirs.merged-reversed000064400000000000000000000002761046102023000201000ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/merge.merged-reversed000064400000000000000000000002761046102023000166040ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/theirs.blob000064400000000000000000000002761046102023000146410ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/zdiff3-histogram.merged-reversed000064400000000000000000000002761046102023000206650ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/zdiff3.merged000064400000000000000000000002761046102023000150550ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/merge-theirs.merged000064400000000000000000000002761046102023000162630ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-change/merge-union.merged-reversed000064400000000000000000000002761046102023000177320ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict000075500000000000000000000000001046102023000127735ustar 00000000000000complex/no-conflict/merge-ours.merged-reversed000064400000000000000000000005031046102023000201370ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/diff3.merged000064400000000000000000000005031046102023000152300ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/merge-union.merged000064400000000000000000000005031046102023000164620ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/ours.blob000064400000000000000000000005031046102023000147000ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/diff3.merged-reversed000064400000000000000000000005031046102023000170450ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/zdiff3.merged-reversed000064400000000000000000000005031046102023000172370ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/base.blob000064400000000000000000000002761046102023000146310ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict/diff3-histogram.merged000064400000000000000000000005031046102023000172230ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/zdiff3-histogram.merged000064400000000000000000000005031046102023000174150ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/diff3-histogram.merged-reversed000064400000000000000000000005031046102023000210400ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/merge-ours.merged000064400000000000000000000005031046102023000163220ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/merge.merged000064400000000000000000000005031046102023000153340ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/merge-theirs.merged-reversed000064400000000000000000000005031046102023000204450ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/merge.merged-reversed000064400000000000000000000005031046102023000171510ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/theirs.blob000064400000000000000000000002761046102023000152150ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/no-conflict/zdiff3-histogram.merged-reversed000064400000000000000000000005031046102023000212320ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/zdiff3.merged000064400000000000000000000005031046102023000154220ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/merge-theirs.merged000064400000000000000000000005031046102023000166300ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/no-conflict/merge-union.merged-reversed000064400000000000000000000005031046102023000202770ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/base.blob000064400000000000000000000002761046102023000124160ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/theirs.c000064400000000000000000000002131046102023000122750ustar 00000000000000int f(int x, int y) { if (x == 0) { return y; } return x; } int g(size_t u) { while (u > 34) { u--; } return u; } complex/spurious-c-conflicts000075500000000000000000000000001046102023000146535ustar 00000000000000complex/spurious-c-conflicts/merge-ours.merged-reversed000064400000000000000000000002201046102023000220130ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { while (u > 34) { u--; } return y; } complex/spurious-c-conflicts/diff3.merged000064400000000000000000000007641046102023000171210ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/ours.blob if (z == 0) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= while (u > 34) >>>>>>> complex/spurious-c-conflicts/theirs.blob { <<<<<<< complex/spurious-c-conflicts/ours.blob return x; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= u--; >>>>>>> complex/spurious-c-conflicts/theirs.blob } return y; } complex/spurious-c-conflicts/merge-union.merged000064400000000000000000000002601046102023000203420ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { if (z == 0) { return x; while (u > 34) { u--; } return y; } complex/spurious-c-conflicts/ours.blob000064400000000000000000000002221046102023000165560ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { if (z == 0) { return x; } return y; } complex/spurious-c-conflicts/diff3.merged-reversed000064400000000000000000000007641046102023000207360ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/theirs.blob while (u > 34) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= if (z == 0) >>>>>>> complex/spurious-c-conflicts/ours.blob { <<<<<<< complex/spurious-c-conflicts/theirs.blob u--; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= return x; >>>>>>> complex/spurious-c-conflicts/ours.blob } return y; } complex/spurious-c-conflicts/zdiff3.merged-reversed000064400000000000000000000007641046102023000211300ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/theirs.blob while (u > 34) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= if (z == 0) >>>>>>> complex/spurious-c-conflicts/ours.blob { <<<<<<< complex/spurious-c-conflicts/theirs.blob u--; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= return x; >>>>>>> complex/spurious-c-conflicts/ours.blob } return y; } complex/spurious-c-conflicts/base.blob000064400000000000000000000002131046102023000165000ustar 00000000000000int f(int x, int y) { if (x == 0) { return y; } return x; } int g(size_t u) { while (u < 30) { u++; } return u; } complex/spurious-c-conflicts/diff3-histogram.merged000064400000000000000000000007641046102023000211140ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/ours.blob if (z == 0) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= while (u > 34) >>>>>>> complex/spurious-c-conflicts/theirs.blob { <<<<<<< complex/spurious-c-conflicts/ours.blob return x; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= u--; >>>>>>> complex/spurious-c-conflicts/theirs.blob } return y; } complex/spurious-c-conflicts/zdiff3-histogram.merged000064400000000000000000000007641046102023000213060ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/ours.blob if (z == 0) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= while (u > 34) >>>>>>> complex/spurious-c-conflicts/theirs.blob { <<<<<<< complex/spurious-c-conflicts/ours.blob return x; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= u--; >>>>>>> complex/spurious-c-conflicts/theirs.blob } return y; } complex/spurious-c-conflicts/diff3-histogram.merged-reversed000064400000000000000000000007641046102023000227310ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/theirs.blob while (u > 34) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= if (z == 0) >>>>>>> complex/spurious-c-conflicts/ours.blob { <<<<<<< complex/spurious-c-conflicts/theirs.blob u--; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= return x; >>>>>>> complex/spurious-c-conflicts/ours.blob } return y; } complex/spurious-c-conflicts/merge-ours.merged000064400000000000000000000002221046102023000202000ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { if (z == 0) { return x; } return y; } complex/spurious-c-conflicts/merge.merged000064400000000000000000000004301046102023000172130ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/ours.blob if (z == 0) { return x; ======= while (u > 34) { u--; >>>>>>> complex/spurious-c-conflicts/theirs.blob } return y; } complex/spurious-c-conflicts/merge-theirs.merged-reversed000064400000000000000000000002221046102023000223230ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { if (z == 0) { return x; } return y; } complex/spurious-c-conflicts/merge.merged-reversed000064400000000000000000000004301046102023000210300ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/theirs.blob while (u > 34) { u--; ======= if (z == 0) { return x; >>>>>>> complex/spurious-c-conflicts/ours.blob } return y; } complex/spurious-c-conflicts/theirs.blob000064400000000000000000000002131046102023000170640ustar 00000000000000int f(int x, int y) { if (x == 0) { return y; } return x; } int g(size_t u) { while (u > 34) { u--; } return u; } complex/spurious-c-conflicts/zdiff3-histogram.merged-reversed000064400000000000000000000007641046102023000231230ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/theirs.blob while (u > 34) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= if (z == 0) >>>>>>> complex/spurious-c-conflicts/ours.blob { <<<<<<< complex/spurious-c-conflicts/theirs.blob u--; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= return x; >>>>>>> complex/spurious-c-conflicts/ours.blob } return y; } complex/spurious-c-conflicts/zdiff3.merged000064400000000000000000000007641046102023000173130ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { <<<<<<< complex/spurious-c-conflicts/ours.blob if (z == 0) ||||||| complex/spurious-c-conflicts/base.blob while (u < 30) ======= while (u > 34) >>>>>>> complex/spurious-c-conflicts/theirs.blob { <<<<<<< complex/spurious-c-conflicts/ours.blob return x; ||||||| complex/spurious-c-conflicts/base.blob u++; ======= u--; >>>>>>> complex/spurious-c-conflicts/theirs.blob } return y; } complex/spurious-c-conflicts/merge-theirs.merged000064400000000000000000000002201046102023000205040ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { while (u > 34) { u--; } return y; } complex/spurious-c-conflicts/merge-union.merged-reversed000064400000000000000000000002601046102023000221570ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { while (u > 34) { u--; if (z == 0) { return x; } return y; } complex/marker-newline-handling-lf2000075500000000000000000000000001046102023000157435ustar 00000000000000complex/marker-newline-handling-lf2/merge-ours.merged-reversed000064400000000000000000000000061046102023000231050ustar 000000000000001 2 5complex/marker-newline-handling-lf2/diff3.merged000064400000000000000000000003031046102023000201760ustar 000000000000001 <<<<<<< complex/marker-newline-handling-lf2/ours.blob 2 4 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 2 5 >>>>>>> complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/merge-union.merged000064400000000000000000000000101046102023000214230ustar 000000000000001 2 4 5complex/marker-newline-handling-lf2/ours.blob000064400000000000000000000000061046102023000176460ustar 000000000000001 2 4complex/marker-newline-handling-lf2/diff3.merged-reversed000064400000000000000000000003031046102023000220130ustar 000000000000001 <<<<<<< complex/marker-newline-handling-lf2/theirs.blob 2 5 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 2 4 >>>>>>> complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/zdiff3.merged-reversed000064400000000000000000000002721046102023000222120ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf2/theirs.blob 5 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 4 >>>>>>> complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/base.blob000064400000000000000000000000071046102023000175710ustar 000000000000001 2 3complex/marker-newline-handling-lf2/diff3-histogram.merged000064400000000000000000000003031046102023000221710ustar 000000000000001 <<<<<<< complex/marker-newline-handling-lf2/ours.blob 2 4 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 2 5 >>>>>>> complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/zdiff3-histogram.merged000064400000000000000000000002721046102023000223700ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf2/ours.blob 4 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 5 >>>>>>> complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/diff3-histogram.merged-reversed000064400000000000000000000003031046102023000240060ustar 000000000000001 <<<<<<< complex/marker-newline-handling-lf2/theirs.blob 2 5 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 2 4 >>>>>>> complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/merge-ours.merged000064400000000000000000000000061046102023000212700ustar 000000000000001 2 4complex/marker-newline-handling-lf2/merge.merged000064400000000000000000000001771046102023000203130ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf2/ours.blob 4 ======= 5 >>>>>>> complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/merge-theirs.merged-reversed000064400000000000000000000000061046102023000234130ustar 000000000000001 2 4complex/marker-newline-handling-lf2/merge.merged-reversed000064400000000000000000000001771046102023000221300ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf2/theirs.blob 5 ======= 4 >>>>>>> complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/theirs.blob000064400000000000000000000000061046102023000201540ustar 000000000000001 2 5complex/marker-newline-handling-lf2/zdiff3-histogram.merged-reversed000064400000000000000000000002721046102023000242050ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf2/theirs.blob 5 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 4 >>>>>>> complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/zdiff3.merged000064400000000000000000000002721046102023000203750ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf2/ours.blob 4 ||||||| complex/marker-newline-handling-lf2/base.blob 2 3 ======= 5 >>>>>>> complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/merge-theirs.merged000064400000000000000000000000061046102023000215760ustar 000000000000001 2 5complex/marker-newline-handling-lf2/merge-union.merged-reversed000064400000000000000000000000101046102023000232400ustar 000000000000001 2 5 4complex/marker-newline-handling-crlf000075500000000000000000000000001046102023000162065ustar 00000000000000complex/marker-newline-handling-crlf/merge-ours.merged-reversed000064400000000000000000000000071046102023000233510ustar 000000000000001 2 5complex/marker-newline-handling-crlf/diff3.merged000064400000000000000000000003021046102023000204400ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/ours.blob 4 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/merge-union.merged000064400000000000000000000000121046102023000216700ustar 000000000000001 2 4 5complex/marker-newline-handling-crlf/ours.blob000064400000000000000000000000071046102023000201120ustar 000000000000001 2 4complex/marker-newline-handling-crlf/diff3.merged-reversed000064400000000000000000000003021046102023000222550ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/theirs.blob 5 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/zdiff3.merged-reversed000064400000000000000000000003021046102023000224470ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/theirs.blob 5 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/base.blob000064400000000000000000000000071046102023000200340ustar 000000000000001 2 3complex/marker-newline-handling-crlf/diff3-histogram.merged000064400000000000000000000003021046102023000224330ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/ours.blob 4 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/zdiff3-histogram.merged000064400000000000000000000003021046102023000226250ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/ours.blob 4 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/diff3-histogram.merged-reversed000064400000000000000000000003021046102023000242500ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/theirs.blob 5 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/merge-ours.merged000064400000000000000000000000071046102023000215340ustar 000000000000001 2 4complex/marker-newline-handling-crlf/merge.merged000064400000000000000000000002071046102023000205500ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/ours.blob 4 ======= 5 >>>>>>> complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/merge-theirs.merged-reversed000064400000000000000000000000071046102023000236570ustar 000000000000001 2 4complex/marker-newline-handling-crlf/merge.merged-reversed000064400000000000000000000002071046102023000223650ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/theirs.blob 5 ======= 4 >>>>>>> complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/theirs.blob000064400000000000000000000000071046102023000204200ustar 000000000000001 2 5complex/marker-newline-handling-crlf/zdiff3-histogram.merged-reversed000064400000000000000000000003021046102023000244420ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/theirs.blob 5 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/zdiff3.merged000064400000000000000000000003021046102023000206320ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-crlf/ours.blob 4 ||||||| complex/marker-newline-handling-crlf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/merge-theirs.merged000064400000000000000000000000071046102023000220420ustar 000000000000001 2 5complex/marker-newline-handling-crlf/merge-union.merged-reversed000064400000000000000000000000121046102023000235050ustar 000000000000001 2 5 4complex/missing-LF-at-EOF-no-conflict000075500000000000000000000000001046102023000157525ustar 00000000000000complex/missing-LF-at-EOF-no-conflict/merge-ours.merged-reversed000064400000000000000000000002751046102023000231240ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/diff3.merged000064400000000000000000000002751046102023000202150ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/merge-union.merged000064400000000000000000000002751046102023000214470ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/ours.blob000064400000000000000000000002751046102023000176650ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/diff3.merged-reversed000064400000000000000000000002751046102023000220320ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/zdiff3.merged-reversed000064400000000000000000000002751046102023000222240ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/base.blob000064400000000000000000000002761046102023000176100ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/missing-LF-at-EOF-no-conflict/diff3-histogram.merged000064400000000000000000000002751046102023000222100ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/zdiff3-histogram.merged000064400000000000000000000002751046102023000224020ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/diff3-histogram.merged-reversed000064400000000000000000000002751046102023000240250ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/merge-ours.merged000064400000000000000000000002751046102023000213070ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/merge.merged000064400000000000000000000002751046102023000203210ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/merge-theirs.merged-reversed000064400000000000000000000002751046102023000234320ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/merge.merged-reversed000064400000000000000000000002751046102023000221360ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/theirs.blob000064400000000000000000000002761046102023000201740ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/missing-LF-at-EOF-no-conflict/zdiff3-histogram.merged-reversed000064400000000000000000000002751046102023000242170ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/zdiff3.merged000064400000000000000000000002751046102023000204070ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/merge-theirs.merged000064400000000000000000000002751046102023000216150ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/missing-LF-at-EOF-no-conflict/merge-union.merged-reversed000064400000000000000000000002751046102023000232640ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/auto-simplification000075500000000000000000000000001046102023000145405ustar 00000000000000complex/auto-simplification/merge-ours.merged-reversed000064400000000000000000000005031046102023000217040ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit, super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/diff3.merged000064400000000000000000000013411046102023000167760ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/ours.blob et nihil mihi deerit; ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit, >>>>>>> complex/auto-simplification/theirs.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/ours.blob super aquam refectionis educavit me. ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me, >>>>>>> complex/auto-simplification/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/merge-union.merged000064400000000000000000000006411046102023000202320ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit, super aquam refectionis educavit me. et nihil mihi deerit, In loco pascuae ibi me collocavit, super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/ours.blob000064400000000000000000000005031046102023000164450ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit, super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/diff3.merged-reversed000064400000000000000000000013411046102023000206130ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/theirs.blob et nihil mihi deerit, ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit; >>>>>>> complex/auto-simplification/ours.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/theirs.blob super aquam refectionis educavit me, ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me. >>>>>>> complex/auto-simplification/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/zdiff3.merged-reversed000064400000000000000000000013411046102023000210050ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/theirs.blob et nihil mihi deerit, ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit; >>>>>>> complex/auto-simplification/ours.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/theirs.blob super aquam refectionis educavit me, ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me. >>>>>>> complex/auto-simplification/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/base.blob000064400000000000000000000005031046102023000163670ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/diff3-histogram.merged000064400000000000000000000013411046102023000207710ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/ours.blob et nihil mihi deerit; ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit, >>>>>>> complex/auto-simplification/theirs.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/ours.blob super aquam refectionis educavit me. ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me, >>>>>>> complex/auto-simplification/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/zdiff3-histogram.merged000064400000000000000000000013411046102023000211630ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/ours.blob et nihil mihi deerit; ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit, >>>>>>> complex/auto-simplification/theirs.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/ours.blob super aquam refectionis educavit me. ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me, >>>>>>> complex/auto-simplification/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/diff3-histogram.merged-reversed000064400000000000000000000013411046102023000226060ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/theirs.blob et nihil mihi deerit, ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit; >>>>>>> complex/auto-simplification/ours.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/theirs.blob super aquam refectionis educavit me, ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me. >>>>>>> complex/auto-simplification/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/merge-ours.merged000064400000000000000000000005031046102023000200670ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit, super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/merge.merged000064400000000000000000000010071046102023000171010ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/ours.blob et nihil mihi deerit; In loco pascuae ibi me collocavit, super aquam refectionis educavit me. ======= et nihil mihi deerit, In loco pascuae ibi me collocavit, super aquam refectionis educavit me, >>>>>>> complex/auto-simplification/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/merge-theirs.merged-reversed000064400000000000000000000005031046102023000222120ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit, super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/merge.merged-reversed000064400000000000000000000010071046102023000207160ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/theirs.blob et nihil mihi deerit, In loco pascuae ibi me collocavit, super aquam refectionis educavit me, ======= et nihil mihi deerit; In loco pascuae ibi me collocavit, super aquam refectionis educavit me. >>>>>>> complex/auto-simplification/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/theirs.blob000064400000000000000000000005031046102023000167530ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit, super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/zdiff3-histogram.merged-reversed000064400000000000000000000013411046102023000230000ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/theirs.blob et nihil mihi deerit, ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit; >>>>>>> complex/auto-simplification/ours.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/theirs.blob super aquam refectionis educavit me, ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me. >>>>>>> complex/auto-simplification/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/zdiff3.merged000064400000000000000000000013411046102023000171700ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification/ours.blob et nihil mihi deerit; ||||||| complex/auto-simplification/base.blob et nihil mihi deerit. ======= et nihil mihi deerit, >>>>>>> complex/auto-simplification/theirs.blob In loco pascuae ibi me collocavit, <<<<<<< complex/auto-simplification/ours.blob super aquam refectionis educavit me. ||||||| complex/auto-simplification/base.blob super aquam refectionis educavit me; ======= super aquam refectionis educavit me, >>>>>>> complex/auto-simplification/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/merge-theirs.merged000064400000000000000000000005031046102023000203750ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit, super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification/merge-union.merged-reversed000064400000000000000000000006411046102023000220470ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit, super aquam refectionis educavit me, et nihil mihi deerit; In loco pascuae ibi me collocavit, super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/new5.blob000064400000000000000000000005031046102023000123530ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/base.c000064400000000000000000000002131046102023000117110ustar 00000000000000int f(int x, int y) { if (x == 0) { return y; } return x; } int g(size_t u) { while (u < 30) { u++; } return u; } complex/ours.c000064400000000000000000000002221046102023000117670ustar 00000000000000int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { if (z == 0) { return x; } return y; } complex/new4.blob000064400000000000000000000002751046102023000123600ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum.complex/auto-simplification2000075500000000000000000000000001046102023000146225ustar 00000000000000complex/auto-simplification2/merge-ours.merged-reversed000064400000000000000000000005111046102023000217650ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/diff3.merged000064400000000000000000000012401046102023000170560ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/ours.blob et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, >>>>>>> complex/auto-simplification2/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/merge-union.merged000064400000000000000000000006531046102023000203170ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/ours.blob000064400000000000000000000005071046102023000165330ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/diff3.merged-reversed000064400000000000000000000012401046102023000206730ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/theirs.blob et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. >>>>>>> complex/auto-simplification2/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/zdiff3.merged-reversed000064400000000000000000000012401046102023000210650ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/theirs.blob et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. >>>>>>> complex/auto-simplification2/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/base.blob000064400000000000000000000005031046102023000164510ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/diff3-histogram.merged000064400000000000000000000012401046102023000210510ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/ours.blob et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, >>>>>>> complex/auto-simplification2/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/zdiff3-histogram.merged000064400000000000000000000012401046102023000212430ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/ours.blob et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, >>>>>>> complex/auto-simplification2/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/diff3-histogram.merged-reversed000064400000000000000000000012401046102023000226660ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/theirs.blob et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. >>>>>>> complex/auto-simplification2/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/merge-ours.merged000064400000000000000000000005071046102023000201550ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/merge.merged000064400000000000000000000010231046102023000171610ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/ours.blob et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. ======= et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, >>>>>>> complex/auto-simplification2/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/merge-theirs.merged-reversed000064400000000000000000000005071046102023000223000ustar 00000000000000Dominus regit me, et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/merge.merged-reversed000064400000000000000000000010231046102023000207760ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/theirs.blob et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, ======= et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. >>>>>>> complex/auto-simplification2/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/theirs.blob000064400000000000000000000005111046102023000170340ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/zdiff3-histogram.merged-reversed000064400000000000000000000012401046102023000230600ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/theirs.blob et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. >>>>>>> complex/auto-simplification2/ours.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/zdiff3.merged000064400000000000000000000012401046102023000172500ustar 00000000000000Dominus regit me, <<<<<<< complex/auto-simplification2/ours.blob et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. ||||||| complex/auto-simplification2/base.blob et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; ======= et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, >>>>>>> complex/auto-simplification2/theirs.blob animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/merge-theirs.merged000064400000000000000000000005111046102023000204560ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/auto-simplification2/merge-union.merged-reversed000064400000000000000000000006531046102023000221340ustar 00000000000000Dominus regit me, et nihil mihi deerit, In loco pascuae ibi me collocavit -- super aquam refectionis educavit me, et nihil mihi deerit; In loco pascuae ibi me collocavit; super aquam refectionis educavit me. animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. complex/new3.blob000064400000000000000000000002761046102023000123600ustar 00000000000000DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/new2.blob000064400000000000000000000002761046102023000123570ustar 00000000000000Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. complex/marker-newline-handling-lf000075500000000000000000000000001046102023000156615ustar 00000000000000complex/marker-newline-handling-lf/merge-ours.merged-reversed000064400000000000000000000000061046102023000230230ustar 000000000000001 2 5complex/marker-newline-handling-lf/diff3.merged000064400000000000000000000002641046102023000201220ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/ours.blob 4 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/merge-union.merged000064400000000000000000000000101046102023000213410ustar 000000000000001 2 4 5complex/marker-newline-handling-lf/ours.blob000064400000000000000000000000061046102023000175640ustar 000000000000001 2 4complex/marker-newline-handling-lf/diff3.merged-reversed000064400000000000000000000002641046102023000217370ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/theirs.blob 5 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/zdiff3.merged-reversed000064400000000000000000000002641046102023000221310ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/theirs.blob 5 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/base.blob000064400000000000000000000000061046102023000175060ustar 000000000000001 2 3complex/marker-newline-handling-lf/diff3-histogram.merged000064400000000000000000000002641046102023000221150ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/ours.blob 4 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/zdiff3-histogram.merged000064400000000000000000000002641046102023000223070ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/ours.blob 4 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/diff3-histogram.merged-reversed000064400000000000000000000002641046102023000237320ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/theirs.blob 5 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/merge-ours.merged000064400000000000000000000000061046102023000212060ustar 000000000000001 2 4complex/marker-newline-handling-lf/merge.merged000064400000000000000000000001751046102023000202270ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/ours.blob 4 ======= 5 >>>>>>> complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/merge-theirs.merged-reversed000064400000000000000000000000061046102023000233310ustar 000000000000001 2 4complex/marker-newline-handling-lf/merge.merged-reversed000064400000000000000000000001751046102023000220440ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/theirs.blob 5 ======= 4 >>>>>>> complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/theirs.blob000064400000000000000000000000061046102023000200720ustar 000000000000001 2 5complex/marker-newline-handling-lf/zdiff3-histogram.merged-reversed000064400000000000000000000002641046102023000241240ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/theirs.blob 5 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 4 >>>>>>> complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/zdiff3.merged000064400000000000000000000002641046102023000203140ustar 000000000000001 2 <<<<<<< complex/marker-newline-handling-lf/ours.blob 4 ||||||| complex/marker-newline-handling-lf/base.blob 3 ======= 5 >>>>>>> complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/merge-theirs.merged000064400000000000000000000000061046102023000215140ustar 000000000000001 2 5complex/marker-newline-handling-lf/merge-union.merged-reversed000064400000000000000000000000101046102023000231560ustar 000000000000001 2 5 4complex/conflict-without-LF000075500000000000000000000000001046102023000143615ustar 00000000000000complex/conflict-without-LF/merge-ours.merged-reversed000064400000000000000000000000221046102023000215210ustar 00000000000000line1 line2 line3ycomplex/conflict-without-LF/diff3.merged000064400000000000000000000002641046102023000166220ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/ours.blob line3x ||||||| complex/conflict-without-LF/base.blob line3 ======= line3y >>>>>>> complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/merge-union.merged000064400000000000000000000000311046102023000200440ustar 00000000000000line1 line2 line3x line3ycomplex/conflict-without-LF/ours.blob000064400000000000000000000000221046102023000162620ustar 00000000000000line1 line2 line3xcomplex/conflict-without-LF/diff3.merged-reversed000064400000000000000000000002641046102023000204370ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/theirs.blob line3y ||||||| complex/conflict-without-LF/base.blob line3 ======= line3x >>>>>>> complex/conflict-without-LF/ours.blob complex/conflict-without-LF/zdiff3.merged-reversed000064400000000000000000000002641046102023000206310ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/theirs.blob line3y ||||||| complex/conflict-without-LF/base.blob line3 ======= line3x >>>>>>> complex/conflict-without-LF/ours.blob complex/conflict-without-LF/base.blob000064400000000000000000000000211046102023000162030ustar 00000000000000line1 line2 line3complex/conflict-without-LF/diff3-histogram.merged000064400000000000000000000002641046102023000206150ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/ours.blob line3x ||||||| complex/conflict-without-LF/base.blob line3 ======= line3y >>>>>>> complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/zdiff3-histogram.merged000064400000000000000000000002641046102023000210070ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/ours.blob line3x ||||||| complex/conflict-without-LF/base.blob line3 ======= line3y >>>>>>> complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/diff3-histogram.merged-reversed000064400000000000000000000002641046102023000224320ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/theirs.blob line3y ||||||| complex/conflict-without-LF/base.blob line3 ======= line3x >>>>>>> complex/conflict-without-LF/ours.blob complex/conflict-without-LF/merge-ours.merged000064400000000000000000000000221046102023000177040ustar 00000000000000line1 line2 line3xcomplex/conflict-without-LF/merge.merged000064400000000000000000000002001046102023000167140ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/ours.blob line3x ======= line3y >>>>>>> complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/merge-theirs.merged-reversed000064400000000000000000000000221046102023000220270ustar 00000000000000line1 line2 line3xcomplex/conflict-without-LF/merge.merged-reversed000064400000000000000000000002001046102023000205310ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/theirs.blob line3y ======= line3x >>>>>>> complex/conflict-without-LF/ours.blob complex/conflict-without-LF/theirs.blob000064400000000000000000000000221046102023000165700ustar 00000000000000line1 line2 line3ycomplex/conflict-without-LF/zdiff3-histogram.merged-reversed000064400000000000000000000002641046102023000226240ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/theirs.blob line3y ||||||| complex/conflict-without-LF/base.blob line3 ======= line3x >>>>>>> complex/conflict-without-LF/ours.blob complex/conflict-without-LF/zdiff3.merged000064400000000000000000000002641046102023000170140ustar 00000000000000line1 line2 <<<<<<< complex/conflict-without-LF/ours.blob line3x ||||||| complex/conflict-without-LF/base.blob line3 ======= line3y >>>>>>> complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/merge-theirs.merged000064400000000000000000000000221046102023000202120ustar 00000000000000line1 line2 line3ycomplex/conflict-without-LF/merge-union.merged-reversed000064400000000000000000000000311046102023000216610ustar 00000000000000line1 line2 line3y line3xclear-ours000075500000000000000000000000001046102023000111655ustar 00000000000000clear-ours/merge-ours.merged-reversed000064400000000000000000000000121046102023000163240ustar 00000000000000T T T T T clear-ours/diff3.merged000064400000000000000000000001671046102023000134300ustar 00000000000000<<<<<<< clear-ours/ours.blob ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= T T T T T >>>>>>> clear-ours/theirs.blob clear-ours/merge-union.merged000064400000000000000000000000121046102023000146470ustar 00000000000000T T T T T clear-ours/ours.blob000064400000000000000000000000001046102023000130620ustar 00000000000000clear-ours/diff3.merged-reversed000064400000000000000000000001671046102023000152450ustar 00000000000000<<<<<<< clear-ours/theirs.blob T T T T T ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-ours/ours.blob clear-ours/zdiff3.merged-reversed000064400000000000000000000001671046102023000154370ustar 00000000000000<<<<<<< clear-ours/theirs.blob T T T T T ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-ours/ours.blob clear-ours/base.blob000064400000000000000000000000141046102023000130110ustar 000000000000000 1 2 3 4 5 clear-ours/diff3-histogram.merged000064400000000000000000000001671046102023000154230ustar 00000000000000<<<<<<< clear-ours/ours.blob ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= T T T T T >>>>>>> clear-ours/theirs.blob clear-ours/zdiff3-histogram.merged000064400000000000000000000001671046102023000156150ustar 00000000000000<<<<<<< clear-ours/ours.blob ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= T T T T T >>>>>>> clear-ours/theirs.blob clear-ours/diff3-histogram.merged-reversed000064400000000000000000000001671046102023000172400ustar 00000000000000<<<<<<< clear-ours/theirs.blob T T T T T ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-ours/ours.blob clear-ours/merge-ours.merged000064400000000000000000000000001046102023000145040ustar 00000000000000clear-ours/merge.merged000064400000000000000000000001161046102023000135260ustar 00000000000000<<<<<<< clear-ours/ours.blob ======= T T T T T >>>>>>> clear-ours/theirs.blob clear-ours/merge-theirs.merged-reversed000064400000000000000000000000001046102023000166270ustar 00000000000000clear-ours/merge.merged-reversed000064400000000000000000000001161046102023000153430ustar 00000000000000<<<<<<< clear-ours/theirs.blob T T T T T ======= >>>>>>> clear-ours/ours.blob clear-ours/theirs.blob000064400000000000000000000000121046102023000133730ustar 00000000000000T T T T T clear-ours/zdiff3-histogram.merged-reversed000064400000000000000000000001671046102023000174320ustar 00000000000000<<<<<<< clear-ours/theirs.blob T T T T T ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= >>>>>>> clear-ours/ours.blob clear-ours/zdiff3.merged000064400000000000000000000001671046102023000136220ustar 00000000000000<<<<<<< clear-ours/ours.blob ||||||| clear-ours/base.blob 0 1 2 3 4 5 ======= T T T T T >>>>>>> clear-ours/theirs.blob clear-ours/merge-theirs.merged000064400000000000000000000000121046102023000150150ustar 00000000000000T T T T T clear-ours/merge-union.merged-reversed000064400000000000000000000000121046102023000164640ustar 00000000000000T T T T T baseline-reversed.cases000064400000000000000000001073521046102023000136170ustar 00000000000000simple/theirs.blob simple/base.blob simple/ours.blob simple/merge.merged-reversed simple/theirs.blob simple/base.blob simple/ours.blob simple/diff3.merged-reversed --diff3 simple/theirs.blob simple/base.blob simple/ours.blob simple/zdiff3.merged-reversed --zdiff3 simple/theirs.blob simple/base.blob simple/ours.blob simple/merge-ours.merged-reversed --ours simple/theirs.blob simple/base.blob simple/ours.blob simple/merge-theirs.merged-reversed --theirs simple/theirs.blob simple/base.blob simple/ours.blob simple/merge-union.merged-reversed --union simple/theirs.blob simple/base.blob simple/ours.blob simple/diff3-histogram.merged-reversed --diff3 simple/theirs.blob simple/base.blob simple/ours.blob simple/zdiff3-histogram.merged-reversed --zdiff3 multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/merge.merged-reversed multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/diff3.merged-reversed --diff3 multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/zdiff3.merged-reversed --zdiff3 multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/merge-ours.merged-reversed --ours multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/merge-theirs.merged-reversed --theirs multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/merge-union.merged-reversed --union multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/diff3-histogram.merged-reversed --diff3 multi-change/theirs.blob multi-change/base.blob multi-change/ours.blob multi-change/zdiff3-histogram.merged-reversed --zdiff3 clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/merge.merged-reversed clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/diff3.merged-reversed --diff3 clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/zdiff3.merged-reversed --zdiff3 clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/merge-ours.merged-reversed --ours clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/merge-theirs.merged-reversed --theirs clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/merge-union.merged-reversed --union clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/diff3-histogram.merged-reversed --diff3 clear-ours/theirs.blob clear-ours/base.blob clear-ours/ours.blob clear-ours/zdiff3-histogram.merged-reversed --zdiff3 clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/merge.merged-reversed clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/diff3.merged-reversed --diff3 clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/zdiff3.merged-reversed --zdiff3 clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/merge-ours.merged-reversed --ours clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/merge-theirs.merged-reversed --theirs clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/merge-union.merged-reversed --union clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/diff3-histogram.merged-reversed --diff3 clear-theirs/theirs.blob clear-theirs/base.blob clear-theirs/ours.blob clear-theirs/zdiff3-histogram.merged-reversed --zdiff3 ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/merge.merged-reversed ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/diff3.merged-reversed --diff3 ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/zdiff3.merged-reversed --zdiff3 ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/merge-ours.merged-reversed --ours ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/merge-theirs.merged-reversed --theirs ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/merge-union.merged-reversed --union ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/diff3-histogram.merged-reversed --diff3 ours-2-lines-theirs-1-line/theirs.blob ours-2-lines-theirs-1-line/base.blob ours-2-lines-theirs-1-line/ours.blob ours-2-lines-theirs-1-line/zdiff3-histogram.merged-reversed --zdiff3 partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/merge.merged-reversed partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/diff3.merged-reversed --diff3 partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/zdiff3.merged-reversed --zdiff3 partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/merge-ours.merged-reversed --ours partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/merge-theirs.merged-reversed --theirs partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/merge-union.merged-reversed --union partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/diff3-histogram.merged-reversed --diff3 partial-match/theirs.blob partial-match/base.blob partial-match/ours.blob partial-match/zdiff3-histogram.merged-reversed --zdiff3 unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/merge.merged-reversed unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/diff3.merged-reversed --diff3 unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/zdiff3.merged-reversed --zdiff3 unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/merge-ours.merged-reversed --ours unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/merge-theirs.merged-reversed --theirs unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/merge-union.merged-reversed --union unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/diff3-histogram.merged-reversed --diff3 unique-merge-base-with-insertion/theirs.blob unique-merge-base-with-insertion/base.blob unique-merge-base-with-insertion/ours.blob unique-merge-base-with-insertion/zdiff3-histogram.merged-reversed --zdiff3 zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/merge.merged-reversed zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/diff3.merged-reversed --diff3 zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/zdiff3.merged-reversed --zdiff3 zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/merge-ours.merged-reversed --ours zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/merge-theirs.merged-reversed --theirs zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/merge-union.merged-reversed --union zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/diff3-histogram.merged-reversed --diff3 zdiff3-basic/theirs.blob zdiff3-basic/base.blob zdiff3-basic/ours.blob zdiff3-basic/zdiff3-histogram.merged-reversed --zdiff3 zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/merge.merged-reversed zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/diff3.merged-reversed --diff3 zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/zdiff3.merged-reversed --zdiff3 zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/merge-ours.merged-reversed --ours zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/merge-theirs.merged-reversed --theirs zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/merge-union.merged-reversed --union zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/diff3-histogram.merged-reversed --diff3 zdiff3-middlecommon/theirs.blob zdiff3-middlecommon/base.blob zdiff3-middlecommon/ours.blob zdiff3-middlecommon/zdiff3-histogram.merged-reversed --zdiff3 zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/merge.merged-reversed zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/diff3.merged-reversed --diff3 zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/zdiff3.merged-reversed --zdiff3 zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/merge-ours.merged-reversed --ours zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/merge-theirs.merged-reversed --theirs zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/merge-union.merged-reversed --union zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/diff3-histogram.merged-reversed --diff3 zdiff3-interesting/theirs.blob zdiff3-interesting/base.blob zdiff3-interesting/ours.blob zdiff3-interesting/zdiff3-histogram.merged-reversed --zdiff3 zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/merge.merged-reversed zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/diff3.merged-reversed --diff3 zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/zdiff3.merged-reversed --zdiff3 zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/merge-ours.merged-reversed --ours zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/merge-theirs.merged-reversed --theirs zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/merge-union.merged-reversed --union zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/diff3-histogram.merged-reversed --diff3 zdiff3-evil/theirs.blob zdiff3-evil/base.blob zdiff3-evil/ours.blob zdiff3-evil/zdiff3-histogram.merged-reversed --zdiff3 no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/merge.merged-reversed no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/diff3.merged-reversed --diff3 no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/zdiff3.merged-reversed --zdiff3 no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/merge-ours.merged-reversed --ours no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/merge-theirs.merged-reversed --theirs no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/merge-union.merged-reversed --union no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/diff3-histogram.merged-reversed --diff3 no-change-add/theirs.blob no-change-add/base.blob no-change-add/ours.blob no-change-add/zdiff3-histogram.merged-reversed --zdiff3 no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/merge.merged-reversed no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/diff3.merged-reversed --diff3 no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/zdiff3.merged-reversed --zdiff3 no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/merge-ours.merged-reversed --ours no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/merge-theirs.merged-reversed --theirs no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/merge-union.merged-reversed --union no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/diff3-histogram.merged-reversed --diff3 no-change-remove/theirs.blob no-change-remove/base.blob no-change-remove/ours.blob no-change-remove/zdiff3-histogram.merged-reversed --zdiff3 line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/merge.merged-reversed line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/diff3.merged-reversed --diff3 line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/zdiff3.merged-reversed --zdiff3 line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/merge-ours.merged-reversed --ours line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/merge-theirs.merged-reversed --theirs line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/merge-union.merged-reversed --union line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/diff3-histogram.merged-reversed --diff3 line-ending-change/theirs.blob line-ending-change/base.blob line-ending-change/ours.blob line-ending-change/zdiff3-histogram.merged-reversed --zdiff3 complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/merge.merged-reversed complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/diff3.merged-reversed --diff3 complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/zdiff3.merged-reversed --zdiff3 complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/merge-ours.merged-reversed --ours complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/merge-theirs.merged-reversed --theirs complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/merge-union.merged-reversed --union complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/diff3-histogram.merged-reversed --diff3 complex/no-change/theirs.blob complex/no-change/base.blob complex/no-change/ours.blob complex/no-change/zdiff3-histogram.merged-reversed --zdiff3 complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/merge.merged-reversed complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/diff3.merged-reversed --diff3 complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/zdiff3.merged-reversed --zdiff3 complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/merge-ours.merged-reversed --ours complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/merge-theirs.merged-reversed --theirs complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/merge-union.merged-reversed --union complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/diff3-histogram.merged-reversed --diff3 complex/no-conflict/theirs.blob complex/no-conflict/base.blob complex/no-conflict/ours.blob complex/no-conflict/zdiff3-histogram.merged-reversed --zdiff3 complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/merge.merged-reversed complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/diff3.merged-reversed --diff3 complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/zdiff3.merged-reversed --zdiff3 complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/merge-ours.merged-reversed --ours complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/merge-theirs.merged-reversed --theirs complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/merge-union.merged-reversed --union complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/diff3-histogram.merged-reversed --diff3 complex/no-conflict-too/theirs.blob complex/no-conflict-too/base.blob complex/no-conflict-too/ours.blob complex/no-conflict-too/zdiff3-histogram.merged-reversed --zdiff3 complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/merge.merged-reversed complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/diff3.merged-reversed --diff3 complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/zdiff3.merged-reversed --zdiff3 complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/merge-ours.merged-reversed --ours complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/merge-theirs.merged-reversed --theirs complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/merge-union.merged-reversed --union complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/diff3-histogram.merged-reversed --diff3 complex/they-changed/theirs.blob complex/they-changed/base.blob complex/they-changed/ours.blob complex/they-changed/zdiff3-histogram.merged-reversed --zdiff3 complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/merge.merged-reversed complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/diff3.merged-reversed --diff3 complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/zdiff3.merged-reversed --zdiff3 complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/merge-ours.merged-reversed --ours complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/merge-theirs.merged-reversed --theirs complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/merge-union.merged-reversed --union complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/diff3-histogram.merged-reversed --diff3 complex/missing-LF-at-EOF/theirs.blob complex/missing-LF-at-EOF/base.blob complex/missing-LF-at-EOF/ours.blob complex/missing-LF-at-EOF/zdiff3-histogram.merged-reversed --zdiff3 complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/merge.merged-reversed complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/diff3.merged-reversed --diff3 complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/zdiff3.merged-reversed --zdiff3 complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/merge-ours.merged-reversed --ours complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/merge-theirs.merged-reversed --theirs complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/merge-union.merged-reversed --union complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/diff3-histogram.merged-reversed --diff3 complex/missing-LF-at-EOF-no-conflict/theirs.blob complex/missing-LF-at-EOF-no-conflict/base.blob complex/missing-LF-at-EOF-no-conflict/ours.blob complex/missing-LF-at-EOF-no-conflict/zdiff3-histogram.merged-reversed --zdiff3 complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/merge.merged-reversed complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/diff3.merged-reversed --diff3 complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/zdiff3.merged-reversed --zdiff3 complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/merge-ours.merged-reversed --ours complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/merge-theirs.merged-reversed --theirs complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/merge-union.merged-reversed --union complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/diff3-histogram.merged-reversed --diff3 complex/with-conflicts/theirs.blob complex/with-conflicts/base.blob complex/with-conflicts/ours.blob complex/with-conflicts/zdiff3-histogram.merged-reversed --zdiff3 complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/merge.merged-reversed complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/diff3.merged-reversed --diff3 complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/zdiff3.merged-reversed --zdiff3 complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/merge-ours.merged-reversed --ours complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/merge-theirs.merged-reversed --theirs complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/merge-union.merged-reversed --union complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/diff3-histogram.merged-reversed --diff3 complex/with-conflicts-in-removed-tail/theirs.blob complex/with-conflicts-in-removed-tail/base.blob complex/with-conflicts-in-removed-tail/ours.blob complex/with-conflicts-in-removed-tail/zdiff3-histogram.merged-reversed --zdiff3 complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/merge.merged-reversed complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/diff3.merged-reversed --diff3 complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/zdiff3.merged-reversed --zdiff3 complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/merge-ours.merged-reversed --ours complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/merge-theirs.merged-reversed --theirs complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/merge-union.merged-reversed --union complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/diff3-histogram.merged-reversed --diff3 complex/auto-simplification/theirs.blob complex/auto-simplification/base.blob complex/auto-simplification/ours.blob complex/auto-simplification/zdiff3-histogram.merged-reversed --zdiff3 complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/merge.merged-reversed complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/diff3.merged-reversed --diff3 complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/zdiff3.merged-reversed --zdiff3 complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/merge-ours.merged-reversed --ours complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/merge-theirs.merged-reversed --theirs complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/merge-union.merged-reversed --union complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/diff3-histogram.merged-reversed --diff3 complex/auto-simplification2/theirs.blob complex/auto-simplification2/base.blob complex/auto-simplification2/ours.blob complex/auto-simplification2/zdiff3-histogram.merged-reversed --zdiff3 complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/merge.merged-reversed complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/diff3.merged-reversed --diff3 complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/zdiff3.merged-reversed --zdiff3 complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/merge-ours.merged-reversed --ours complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/merge-theirs.merged-reversed --theirs complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/merge-union.merged-reversed --union complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/diff3-histogram.merged-reversed --diff3 complex/conflict-without-LF/theirs.blob complex/conflict-without-LF/base.blob complex/conflict-without-LF/ours.blob complex/conflict-without-LF/zdiff3-histogram.merged-reversed --zdiff3 complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/merge.merged-reversed complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/diff3.merged-reversed --diff3 complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/zdiff3.merged-reversed --zdiff3 complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/merge-ours.merged-reversed --ours complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/merge-theirs.merged-reversed --theirs complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/merge-union.merged-reversed --union complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/diff3-histogram.merged-reversed --diff3 complex/marker-newline-handling-crlf/theirs.blob complex/marker-newline-handling-crlf/base.blob complex/marker-newline-handling-crlf/ours.blob complex/marker-newline-handling-crlf/zdiff3-histogram.merged-reversed --zdiff3 complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/merge.merged-reversed complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/diff3.merged-reversed --diff3 complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/zdiff3.merged-reversed --zdiff3 complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/merge-ours.merged-reversed --ours complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/merge-theirs.merged-reversed --theirs complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/merge-union.merged-reversed --union complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/diff3-histogram.merged-reversed --diff3 complex/marker-newline-handling-lf/theirs.blob complex/marker-newline-handling-lf/base.blob complex/marker-newline-handling-lf/ours.blob complex/marker-newline-handling-lf/zdiff3-histogram.merged-reversed --zdiff3 complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/merge.merged-reversed complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/diff3.merged-reversed --diff3 complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/zdiff3.merged-reversed --zdiff3 complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/merge-ours.merged-reversed --ours complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/merge-theirs.merged-reversed --theirs complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/merge-union.merged-reversed --union complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/diff3-histogram.merged-reversed --diff3 complex/marker-newline-handling-lf2/theirs.blob complex/marker-newline-handling-lf2/base.blob complex/marker-newline-handling-lf2/ours.blob complex/marker-newline-handling-lf2/zdiff3-histogram.merged-reversed --zdiff3 complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/merge.merged-reversed complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/diff3.merged-reversed --diff3 complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/zdiff3.merged-reversed --zdiff3 complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/merge-ours.merged-reversed --ours complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/merge-theirs.merged-reversed --theirs complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/merge-union.merged-reversed --union complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/diff3-histogram.merged-reversed --diff3 complex/spurious-c-conflicts/theirs.blob complex/spurious-c-conflicts/base.blob complex/spurious-c-conflicts/ours.blob complex/spurious-c-conflicts/zdiff3-histogram.merged-reversed --zdiff3 line-ending-change000075500000000000000000000000001046102023000125255ustar 00000000000000line-ending-change/merge-ours.merged-reversed000064400000000000000000000000041046102023000176650ustar 00000000000000a line-ending-change/diff3.merged000064400000000000000000000000041046102023000147560ustar 00000000000000a line-ending-change/merge-union.merged000064400000000000000000000000041046102023000162100ustar 00000000000000a line-ending-change/ours.blob000064400000000000000000000000041046102023000144260ustar 00000000000000a line-ending-change/diff3.merged-reversed000064400000000000000000000000041046102023000165730ustar 00000000000000a line-ending-change/zdiff3.merged-reversed000064400000000000000000000000041046102023000167650ustar 00000000000000a line-ending-change/base.blob000064400000000000000000000000031046102023000143470ustar 00000000000000a line-ending-change/diff3-histogram.merged000064400000000000000000000000041046102023000167510ustar 00000000000000a line-ending-change/zdiff3-histogram.merged000064400000000000000000000000041046102023000171430ustar 00000000000000a line-ending-change/diff3-histogram.merged-reversed000064400000000000000000000000041046102023000205660ustar 00000000000000a line-ending-change/merge-ours.merged000064400000000000000000000000041046102023000160500ustar 00000000000000a line-ending-change/merge.merged000064400000000000000000000000041046102023000150620ustar 00000000000000a line-ending-change/merge-theirs.merged-reversed000064400000000000000000000000041046102023000201730ustar 00000000000000a line-ending-change/merge.merged-reversed000064400000000000000000000000041046102023000166770ustar 00000000000000a line-ending-change/theirs.blob000064400000000000000000000000031046102023000147330ustar 00000000000000a line-ending-change/zdiff3-histogram.merged-reversed000064400000000000000000000000041046102023000207600ustar 00000000000000a line-ending-change/zdiff3.merged000064400000000000000000000000041046102023000151500ustar 00000000000000a line-ending-change/merge-theirs.merged000064400000000000000000000000041046102023000163560ustar 00000000000000a line-ending-change/merge-union.merged-reversed000064400000000000000000000000041046102023000200250ustar 00000000000000a zdiff3-middlecommon000075500000000000000000000000001046102023000127435ustar 00000000000000zdiff3-middlecommon/merge-ours.merged-reversed000064400000000000000000000000261046102023000201070ustar 000000000000001 2 3 EE 4 5 FF 6 7 8 zdiff3-middlecommon/diff3.merged000064400000000000000000000004321046102023000152010ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/ours.blob CC ||||||| zdiff3-middlecommon/base.blob AA ======= EE >>>>>>> zdiff3-middlecommon/theirs.blob 4 5 <<<<<<< zdiff3-middlecommon/ours.blob DD ||||||| zdiff3-middlecommon/base.blob BB ======= FF >>>>>>> zdiff3-middlecommon/theirs.blob 6 7 8 zdiff3-middlecommon/merge-union.merged000064400000000000000000000000401046102023000164260ustar 000000000000001 2 3 CC 4 5 DD EE 4 5 FF 6 7 8 zdiff3-middlecommon/ours.blob000064400000000000000000000000261046102023000146500ustar 000000000000001 2 3 CC 4 5 DD 6 7 8 zdiff3-middlecommon/diff3.merged-reversed000064400000000000000000000004321046102023000170160ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/theirs.blob EE ||||||| zdiff3-middlecommon/base.blob AA ======= CC >>>>>>> zdiff3-middlecommon/ours.blob 4 5 <<<<<<< zdiff3-middlecommon/theirs.blob FF ||||||| zdiff3-middlecommon/base.blob BB ======= DD >>>>>>> zdiff3-middlecommon/ours.blob 6 7 8 zdiff3-middlecommon/zdiff3.merged-reversed000064400000000000000000000004321046102023000172100ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/theirs.blob EE ||||||| zdiff3-middlecommon/base.blob AA ======= CC >>>>>>> zdiff3-middlecommon/ours.blob 4 5 <<<<<<< zdiff3-middlecommon/theirs.blob FF ||||||| zdiff3-middlecommon/base.blob BB ======= DD >>>>>>> zdiff3-middlecommon/ours.blob 6 7 8 zdiff3-middlecommon/base.blob000064400000000000000000000000261046102023000145720ustar 000000000000001 2 3 AA 4 5 BB 6 7 8 zdiff3-middlecommon/diff3-histogram.merged000064400000000000000000000004321046102023000171740ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/ours.blob CC ||||||| zdiff3-middlecommon/base.blob AA ======= EE >>>>>>> zdiff3-middlecommon/theirs.blob 4 5 <<<<<<< zdiff3-middlecommon/ours.blob DD ||||||| zdiff3-middlecommon/base.blob BB ======= FF >>>>>>> zdiff3-middlecommon/theirs.blob 6 7 8 zdiff3-middlecommon/zdiff3-histogram.merged000064400000000000000000000004321046102023000173660ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/ours.blob CC ||||||| zdiff3-middlecommon/base.blob AA ======= EE >>>>>>> zdiff3-middlecommon/theirs.blob 4 5 <<<<<<< zdiff3-middlecommon/ours.blob DD ||||||| zdiff3-middlecommon/base.blob BB ======= FF >>>>>>> zdiff3-middlecommon/theirs.blob 6 7 8 zdiff3-middlecommon/diff3-histogram.merged-reversed000064400000000000000000000004321046102023000210110ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/theirs.blob EE ||||||| zdiff3-middlecommon/base.blob AA ======= CC >>>>>>> zdiff3-middlecommon/ours.blob 4 5 <<<<<<< zdiff3-middlecommon/theirs.blob FF ||||||| zdiff3-middlecommon/base.blob BB ======= DD >>>>>>> zdiff3-middlecommon/ours.blob 6 7 8 zdiff3-middlecommon/merge-ours.merged000064400000000000000000000000261046102023000162720ustar 000000000000001 2 3 CC 4 5 DD 6 7 8 zdiff3-middlecommon/merge.merged000064400000000000000000000001661046102023000153110ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/ours.blob CC 4 5 DD ======= EE 4 5 FF >>>>>>> zdiff3-middlecommon/theirs.blob 6 7 8 zdiff3-middlecommon/merge-theirs.merged-reversed000064400000000000000000000000261046102023000204150ustar 000000000000001 2 3 CC 4 5 DD 6 7 8 zdiff3-middlecommon/merge.merged-reversed000064400000000000000000000001661046102023000171260ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/theirs.blob EE 4 5 FF ======= CC 4 5 DD >>>>>>> zdiff3-middlecommon/ours.blob 6 7 8 zdiff3-middlecommon/theirs.blob000064400000000000000000000000261046102023000151560ustar 000000000000001 2 3 EE 4 5 FF 6 7 8 zdiff3-middlecommon/zdiff3-histogram.merged-reversed000064400000000000000000000004321046102023000212030ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/theirs.blob EE ||||||| zdiff3-middlecommon/base.blob AA ======= CC >>>>>>> zdiff3-middlecommon/ours.blob 4 5 <<<<<<< zdiff3-middlecommon/theirs.blob FF ||||||| zdiff3-middlecommon/base.blob BB ======= DD >>>>>>> zdiff3-middlecommon/ours.blob 6 7 8 zdiff3-middlecommon/zdiff3.merged000064400000000000000000000004321046102023000153730ustar 000000000000001 2 3 <<<<<<< zdiff3-middlecommon/ours.blob CC ||||||| zdiff3-middlecommon/base.blob AA ======= EE >>>>>>> zdiff3-middlecommon/theirs.blob 4 5 <<<<<<< zdiff3-middlecommon/ours.blob DD ||||||| zdiff3-middlecommon/base.blob BB ======= FF >>>>>>> zdiff3-middlecommon/theirs.blob 6 7 8 zdiff3-middlecommon/merge-theirs.merged000064400000000000000000000000261046102023000166000ustar 000000000000001 2 3 EE 4 5 FF 6 7 8 zdiff3-middlecommon/merge-union.merged-reversed000064400000000000000000000000401046102023000202430ustar 000000000000001 2 3 EE 4 5 FF CC 4 5 DD 6 7 8 __gitoxide_meta__000075500000000000000000000000001046102023000125275ustar 00000000000000__gitoxide_meta__/identity000064400000000000000000000000171046102023000143600ustar 000000000000002576445459-unix__gitoxide_meta__/git-version000064400000000000000000000000431046102023000147740ustar 00000000000000git version 2.39.5 (Apple Git-154) gix-merge-0.2.0/tests/fixtures/generated-archives/tree-baseline.tar000064400000000000000000147250001046102023000235220ustar 00000000000000./000075500000000000000000000000001046102023000073255ustar 00000000000000rename-rename-plus-content000075500000000000000000000000001046102023000142565ustar 00000000000000rename-rename-plus-content/A-B.merge-info000064400000000000000000000005341046102023000166500ustar 000000000000002edb2e193206ba15c0ffc40040e31231d6b95bf1100644 b3b7e96453e640c018ef2d2e984cd0a3641a7d93 2 bar100644 b3b7e96453e640c018ef2d2e984cd0a3641a7d93 3 baz100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 foo1fooAuto-mergingAuto-merging foo 3foobarbazCONFLICT (rename/rename)CONFLICT (rename/rename): foo renamed to bar in A and to baz in B. rename-rename-plus-content/A-B-reversed.merge-info000064400000000000000000000005341046102023000204650ustar 00000000000000261d12f383bd5bad525f4afda75769d08a02ab49100644 6896ef655a7b52d82ad29ab59c9cfb4ec86f4fc0 3 bar100644 6896ef655a7b52d82ad29ab59c9cfb4ec86f4fc0 2 baz100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 foo1fooAuto-mergingAuto-merging foo 3foobazbarCONFLICT (rename/rename)CONFLICT (rename/rename): foo renamed to baz in B and to bar in A. rename-rename-plus-content/.git000075500000000000000000000000001046102023000151175ustar 00000000000000rename-rename-plus-content/.git/COMMIT_EDITMSG000064400000000000000000000000331046102023000172610ustar 00000000000000Modify foo + rename to baz rename-rename-plus-content/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000226540ustar 0000000000000067380625f9728d1617ac8928e5c41b47633e639e rename-rename-plus-content/.git/index000064400000000000000000000002111046102023000162220ustar 00000000000000DIRC JX+pbazTREE1 0 SCxN#0rk𘴉иelz$O8xrename-rename-plus-content/.git/refs000075500000000000000000000000001046102023000160565ustar 00000000000000rename-rename-plus-content/.git/refs/tags000075500000000000000000000000001046102023000170145ustar 00000000000000rename-rename-plus-content/.git/refs/heads000075500000000000000000000000001046102023000171425ustar 00000000000000rename-rename-plus-content/.git/refs/heads/B000064400000000000000000000000511046102023000173210ustar 00000000000000c19ff48eacbb961cdb9e0e824ac99736631648da rename-rename-plus-content/.git/refs/heads/main000064400000000000000000000000511046102023000200640ustar 00000000000000c682d8778dfff5684a3e6c12e310ec4599d76278 rename-rename-plus-content/.git/refs/heads/A000064400000000000000000000000511046102023000173200ustar 000000000000003535b23e27606131d40a1784c588106a71ae717d rename-rename-plus-content/.git/hooks000075500000000000000000000000001046102023000162425ustar 00000000000000rename-rename-plus-content/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000227410ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-rename-plus-content/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000213000ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-rename-plus-content/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000224610ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-rename-plus-content/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000227000ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-rename-plus-content/.git/hooks/post-update.sample000075500000000000000000000002751046102023000220000ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-rename-plus-content/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000232440ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-rename-plus-content/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000217300ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-rename-plus-content/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000233540ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-rename-plus-content/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000224660ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-rename-plus-content/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000216050ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-rename-plus-content/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000215560ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-rename-plus-content/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000216000ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-rename-plus-content/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000220260ustar 00000000000000a45343784e2330727fc1de6bf3ff12f098b489fc rename-rename-plus-content/.git/description000064400000000000000000000001111046102023000174350ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-rename-plus-content/.git/logs000075500000000000000000000000001046102023000160635ustar 00000000000000rename-rename-plus-content/.git/logs/refs000075500000000000000000000000001046102023000170225ustar 00000000000000rename-rename-plus-content/.git/logs/refs/heads000075500000000000000000000000001046102023000201065ustar 00000000000000rename-rename-plus-content/.git/logs/refs/heads/B000064400000000000000000000005051046102023000202710ustar 000000000000000000000000000000000000000000000000000000 c682d8778dfff5684a3e6c12e310ec4599d76278 committer 946771200 +0000 branch: Created from main c682d8778dfff5684a3e6c12e310ec4599d76278 c19ff48eacbb961cdb9e0e824ac99736631648da committer 946771200 +0000 commit: Modify foo + rename to baz rename-rename-plus-content/.git/logs/refs/heads/main000064400000000000000000000002371046102023000210360ustar 000000000000000000000000000000000000000000000000000000 c682d8778dfff5684a3e6c12e310ec4599d76278 committer 946771200 +0000 commit (initial): original rename-rename-plus-content/.git/logs/refs/heads/A000064400000000000000000000005051046102023000202700ustar 000000000000000000000000000000000000000000000000000000 c682d8778dfff5684a3e6c12e310ec4599d76278 committer 946771200 +0000 branch: Created from main c682d8778dfff5684a3e6c12e310ec4599d76278 3535b23e27606131d40a1784c588106a71ae717d committer 946771200 +0000 commit: Modify foo + rename to bar rename-rename-plus-content/.git/logs/HEAD000064400000000000000000000014621046102023000165710ustar 000000000000000000000000000000000000000000000000000000 c682d8778dfff5684a3e6c12e310ec4599d76278 committer 946771200 +0000 commit (initial): original c682d8778dfff5684a3e6c12e310ec4599d76278 c682d8778dfff5684a3e6c12e310ec4599d76278 committer 946771200 +0000 checkout: moving from main to A c682d8778dfff5684a3e6c12e310ec4599d76278 3535b23e27606131d40a1784c588106a71ae717d committer 946771200 +0000 commit: Modify foo + rename to bar 3535b23e27606131d40a1784c588106a71ae717d c682d8778dfff5684a3e6c12e310ec4599d76278 committer 946771200 +0000 checkout: moving from A to B c682d8778dfff5684a3e6c12e310ec4599d76278 c19ff48eacbb961cdb9e0e824ac99736631648da committer 946771200 +0000 commit: Modify foo + rename to baz rename-rename-plus-content/.git/info000075500000000000000000000000001046102023000160525ustar 00000000000000rename-rename-plus-content/.git/info/exclude000064400000000000000000000003601046102023000175040ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-rename-plus-content/.git/HEAD000064400000000000000000000000221046102023000156140ustar 00000000000000ref: refs/heads/B rename-rename-plus-content/.git/objects000075500000000000000000000000001046102023000165505ustar 00000000000000rename-rename-plus-content/.git/objects/8b000075500000000000000000000000001046102023000170615ustar 00000000000000rename-rename-plus-content/.git/objects/8b/c166e2d6e7cfaa20bc69e0590dfb615b3ddf58000064400000000000000000000001051046102023000245670ustar 00000000000000xKOR07c02222岁'*.3(PH60J0J粅 .;(Ppj)krename-rename-plus-content/.git/objects/2e000075500000000000000000000000001046102023000170565ustar 00000000000000rename-rename-plus-content/.git/objects/2e/db2e193206ba15c0ffc40040e31231d6b95bf1000064400000000000000000000000651046102023000242270ustar 00000000000000x+)JMU03b040031QHJ,bؼeJ3uf\X"U;.]Urename-rename-plus-content/.git/objects/aa000075500000000000000000000000001046102023000171315ustar 00000000000000rename-rename-plus-content/.git/objects/aa/1bc688da9bc97740a00a45cc13438ef6f52e60000064400000000000000000000001051046102023000243350ustar 00000000000000xKOR07c02222岁G" (PH60J0J粅.3.;(Ppj@rename-rename-plus-content/.git/objects/info000075500000000000000000000000001046102023000175035ustar 00000000000000rename-rename-plus-content/.git/objects/9a000075500000000000000000000000001046102023000170615ustar 00000000000000rename-rename-plus-content/.git/objects/9a/f493253e0f0d5dc22b2205bc26fe3618f134ba000064400000000000000000000000651046102023000242500ustar 00000000000000x+)JMU03b040031QHJ,b>d>m{?.]UМIrename-rename-plus-content/.git/objects/26000075500000000000000000000000001046102023000167775ustar 00000000000000rename-rename-plus-content/.git/objects/26/1d12f383bd5bad525f4afda75769d08a02ab49000064400000000000000000000000651046102023000243420ustar 00000000000000x+)JMU03b040031QHJ,bȘ>5:֥Y[w"\ 4rename-rename-plus-content/.git/objects/8a000075500000000000000000000000001046102023000170605ustar 00000000000000rename-rename-plus-content/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000242160ustar 00000000000000xKOR04`02222(-Rrename-rename-plus-content/.git/objects/pack000075500000000000000000000000001046102023000174665ustar 00000000000000rename-rename-plus-content/.git/objects/c6000075500000000000000000000000001046102023000170605ustar 00000000000000rename-rename-plus-content/.git/objects/c6/82d8778dfff5684a3e6c12e310ec4599d76278000064400000000000000000000002001046102023000241650ustar 00000000000000xeK 1D]$ ^%V3߀2.+ j)A&H5Š8X)ys *>6b$XE#ȞQc_]ڼ?U[~E`6orename-rename-plus-content/.git/objects/c1000075500000000000000000000000001046102023000170535ustar 00000000000000rename-rename-plus-content/.git/objects/c1/9ff48eacbb961cdb9e0e824ac99736631648da000064400000000000000000000002521046102023000244520ustar 00000000000000xeM B1]3/!G]M ɭSܪ/̐C|KmOr>rhR$Ā[t_{8WZ r0WX7fKrename-rename-plus-content/.git/objects/68000075500000000000000000000000001046102023000170055ustar 00000000000000rename-rename-plus-content/.git/objects/68/96ef655a7b52d82ad29ab59c9cfb4ec86f4fc0000064400000000000000000000000651046102023000245450ustar 00000000000000xKOR05e02222岁'*.3.[(*άಃGl*xrename-rename-plus-content/.git/config000064400000000000000000000002111046102023000163600ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-rename-plus-content/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000226540ustar 0000000000000067380625f9728d1617ac8928e5c41b47633e639e rename-rename-plus-content/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000220260ustar 00000000000000d6f191adf9ca3895da66f1390ab44a2d1fc0cd38 rename-rename-plus-content/baz000064400000000000000000000000141046102023000150270ustar 000000000000001 2 3 4 5 6 rename-rename-plus-content/A-B-diff3.merge-info000064400000000000000000000005341046102023000176410ustar 0000000000000002f9b28b4b2e48beeee426c4588d1473e8464da6100644 aa1bc688da9bc97740a00a45cc13438ef6f52e60 2 bar100644 aa1bc688da9bc97740a00a45cc13438ef6f52e60 3 baz100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 foo1fooAuto-mergingAuto-merging foo 3foobarbazCONFLICT (rename/rename)CONFLICT (rename/rename): foo renamed to bar in A and to baz in B. rename-rename-plus-content/A-B-diff3-reversed.merge-info000064400000000000000000000005341046102023000214560ustar 000000000000009af493253e0f0d5dc22b2205bc26fe3618f134ba100644 8bc166e2d6e7cfaa20bc69e0590dfb615b3ddf58 3 bar100644 8bc166e2d6e7cfaa20bc69e0590dfb615b3ddf58 2 baz100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 foo1fooAuto-mergingAuto-merging foo 3foobazbarCONFLICT (rename/rename)CONFLICT (rename/rename): foo renamed to baz in B and to bar in A. symlink-modification000075500000000000000000000000001046102023000132425ustar 00000000000000symlink-modification/b000064400000000000000000000000001046102023000134530ustar 00000000000000symlink-modification/A-B.merge-info000064400000000000000000000004261046102023000156340ustar 00000000000000f531befc73d00603108a4bafe091ffc6819187db120000 883ad6e8ef9a7392b45f6fc9e7d53c88f502388b 1 link120000 2e65efe2a145dda7ee51d1741299f848e5bf752e 2 link120000 63d8dbd40c23542e740659a7168a0ce3138ea748 3 link1linkCONFLICT (contents)CONFLICT (content): Merge conflict in link symlink-modification/A-B-reversed.merge-info000064400000000000000000000004261046102023000174510ustar 00000000000000f886cbd3a6d12b14f1475c5871e4fe65c910cf46120000 883ad6e8ef9a7392b45f6fc9e7d53c88f502388b 1 link120000 63d8dbd40c23542e740659a7168a0ce3138ea748 2 link120000 2e65efe2a145dda7ee51d1741299f848e5bf752e 3 link1linkCONFLICT (contents)CONFLICT (content): Merge conflict in link symlink-modification/.git000075500000000000000000000000001046102023000141035ustar 00000000000000symlink-modification/.git/COMMIT_EDITMSG000064400000000000000000000000311046102023000162430ustar 00000000000000set link to point to 'b' symlink-modification/.git/index000064400000000000000000000005111046102023000152110ustar 00000000000000DIRCgUAgUA ?i⛲CK)wZSagUɜgUɜ ?j⛲CK)wZSbgUgU ?c #T.tY HlinkgU WgU W ?k⛲CK)wZSoTREE4 0 Ӧ+G\XqeFpKFUIt}2wjsymlink-modification/.git/refs000075500000000000000000000000001046102023000150425ustar 00000000000000symlink-modification/.git/refs/tags000075500000000000000000000000001046102023000160005ustar 00000000000000symlink-modification/.git/refs/heads000075500000000000000000000000001046102023000161265ustar 00000000000000symlink-modification/.git/refs/heads/B000064400000000000000000000000511046102023000163050ustar 000000000000007f9b55f7f743d0ea403d39344cbfe7e67a8fdfc2 symlink-modification/.git/refs/heads/main000064400000000000000000000000511046102023000170500ustar 00000000000000723ae325d298311a140afc87f883316e5405bf9b symlink-modification/.git/refs/heads/A000064400000000000000000000000511046102023000163040ustar 00000000000000075928004cd260e27002d305cb9975ff0ba0aff3 symlink-modification/.git/hooks000075500000000000000000000000001046102023000152265ustar 00000000000000symlink-modification/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000217250ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 symlink-modification/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000202640ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 symlink-modification/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000214450ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : symlink-modification/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000216640ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : symlink-modification/.git/hooks/post-update.sample000075500000000000000000000002751046102023000207640ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info symlink-modification/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000222300ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi symlink-modification/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000207140ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi symlink-modification/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000223400ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } symlink-modification/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000214520ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : symlink-modification/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000205710ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- symlink-modification/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000205420ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END symlink-modification/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000205640ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } symlink-modification/.git/description000064400000000000000000000001111046102023000164210ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. symlink-modification/.git/logs000075500000000000000000000000001046102023000150475ustar 00000000000000symlink-modification/.git/logs/refs000075500000000000000000000000001046102023000160065ustar 00000000000000symlink-modification/.git/logs/refs/heads000075500000000000000000000000001046102023000170725ustar 00000000000000symlink-modification/.git/logs/refs/heads/B000064400000000000000000000005031046102023000172530ustar 000000000000000000000000000000000000000000000000000000 723ae325d298311a140afc87f883316e5405bf9b committer 946771200 +0000 branch: Created from main 723ae325d298311a140afc87f883316e5405bf9b 7f9b55f7f743d0ea403d39344cbfe7e67a8fdfc2 committer 946771200 +0000 commit: set link to point to 'b' symlink-modification/.git/logs/refs/heads/main000064400000000000000000000002371046102023000200220ustar 000000000000000000000000000000000000000000000000000000 723ae325d298311a140afc87f883316e5405bf9b committer 946771200 +0000 commit (initial): original symlink-modification/.git/logs/refs/heads/A000064400000000000000000000005031046102023000172520ustar 000000000000000000000000000000000000000000000000000000 723ae325d298311a140afc87f883316e5405bf9b committer 946771200 +0000 branch: Created from main 723ae325d298311a140afc87f883316e5405bf9b 075928004cd260e27002d305cb9975ff0ba0aff3 committer 946771200 +0000 commit: set link to point to 'a' symlink-modification/.git/logs/HEAD000064400000000000000000000014561046102023000155600ustar 000000000000000000000000000000000000000000000000000000 723ae325d298311a140afc87f883316e5405bf9b committer 946771200 +0000 commit (initial): original 723ae325d298311a140afc87f883316e5405bf9b 723ae325d298311a140afc87f883316e5405bf9b committer 946771200 +0000 checkout: moving from main to A 723ae325d298311a140afc87f883316e5405bf9b 075928004cd260e27002d305cb9975ff0ba0aff3 committer 946771200 +0000 commit: set link to point to 'a' 075928004cd260e27002d305cb9975ff0ba0aff3 723ae325d298311a140afc87f883316e5405bf9b committer 946771200 +0000 checkout: moving from A to B 723ae325d298311a140afc87f883316e5405bf9b 7f9b55f7f743d0ea403d39344cbfe7e67a8fdfc2 committer 946771200 +0000 commit: set link to point to 'b' symlink-modification/.git/info000075500000000000000000000000001046102023000150365ustar 00000000000000symlink-modification/.git/info/exclude000064400000000000000000000003601046102023000164700ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ symlink-modification/.git/HEAD000064400000000000000000000000221046102023000146000ustar 00000000000000ref: refs/heads/B symlink-modification/.git/objects000075500000000000000000000000001046102023000155345ustar 00000000000000symlink-modification/.git/objects/7f000075500000000000000000000000001046102023000160505ustar 00000000000000symlink-modification/.git/objects/7f/9b55f7f743d0ea403d39344cbfe7e67a8fdfc2000064400000000000000000000002511046102023000235200ustar 00000000000000xe 0=)փ *IbkJP ʺ CD3)N2 EDQYH*#OYJV@RIx'*rrH:fYxkzu[zqqGzؿ5qǿ(.{Peߠܯv[Imsymlink-modification/.git/objects/2e000075500000000000000000000000001046102023000160425ustar 00000000000000symlink-modification/.git/objects/2e/65efe2a145dda7ee51d1741299f848e5bf752e000064400000000000000000000000201046102023000233470ustar 00000000000000xKOR0dH Rsymlink-modification/.git/objects/f8000075500000000000000000000000001046102023000160515ustar 00000000000000symlink-modification/.git/objects/f8/86cbd3a6d12b14f1475c5871e4fe65c910cf46000064400000000000000000000001301046102023000232610ustar 00000000000000x+)JMU04d040031QHdx6M9{wk+qIODdvI# PfHq r^ [r.}=jA6symlink-modification/.git/objects/e6000075500000000000000000000000001046102023000160465ustar 00000000000000symlink-modification/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000233520ustar 00000000000000xKOR0` symlink-modification/.git/objects/63000075500000000000000000000000001046102023000157645ustar 00000000000000symlink-modification/.git/objects/63/d8dbd40c23542e740659a7168a0ce3138ea748000064400000000000000000000000201046102023000230260ustar 00000000000000xKOR0dH Ssymlink-modification/.git/objects/info000075500000000000000000000000001046102023000164675ustar 00000000000000symlink-modification/.git/objects/07000075500000000000000000000000001046102023000157625ustar 00000000000000symlink-modification/.git/objects/07/5928004cd260e27002d305cb9975ff0ba0aff3000064400000000000000000000002541046102023000230750ustar 00000000000000xej1 D{WC Hז!ll\В2u`}](k-͈!RZS"s6zuvmbG$QjX)הK_~COH>G1ߺo痾mc$ښv.o Cr0OoIsymlink-modification/.git/objects/88000075500000000000000000000000001046102023000157735ustar 00000000000000symlink-modification/.git/objects/88/3ad6e8ef9a7392b45f6fc9e7d53c88f502388b000064400000000000000000000000201046102023000233170ustar 00000000000000xKOR0d `symlink-modification/.git/objects/72000075500000000000000000000000001046102023000157645ustar 00000000000000symlink-modification/.git/objects/72/3ae325d298311a140afc87f883316e5405bf9b000064400000000000000000000002001046102023000230240ustar 00000000000000xeQ !{W{jvK83ĠP\7 LѮ7f9-bd-%Lѣf ~ ?+ʇTNcO^k!5չ͛uUmaUoxX7symlink-modification/.git/objects/74000075500000000000000000000000001046102023000157665ustar 00000000000000symlink-modification/.git/objects/74/660fdd2527e8c1fe27f275cb85f1ee5b15b6f3000064400000000000000000000001301046102023000233450ustar 00000000000000x+)JMU04d040031QHdx6M9{wk+qIODdvI# Pf谺I[O>jɢ9fɸ:'symlink-modification/.git/objects/pack000075500000000000000000000000001046102023000164525ustar 00000000000000symlink-modification/.git/objects/f5000075500000000000000000000000001046102023000160465ustar 00000000000000symlink-modification/.git/objects/f5/31befc73d00603108a4bafe091ffc6819187db000064400000000000000000000001301046102023000233170ustar 00000000000000x+)JMU04d040031QHdx6M9{wk+qIODdvI# PfK}h/tTs>Vq:symlink-modification/.git/config000064400000000000000000000002111046102023000153440ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true symlink-modification/link000075500000000000000000000000001046102023000143362bustar 00000000000000symlink-modification/o000064400000000000000000000000001046102023000134700ustar 00000000000000symlink-modification/a000064400000000000000000000000001046102023000134520ustar 00000000000000tree-to-non-tree-with-rename000075500000000000000000000000001046102023000144335ustar 00000000000000tree-to-non-tree-with-rename/A-B.merge-info000064400000000000000000000007301046102023000170230ustar 00000000000000b44e5ae1d2fa3b30241ceeb6a5dba2288e16d8e0100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/b100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a/sub/b100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 3 a~B1a/sub/bCONFLICT (modify/delete)CONFLICT (modify/delete): a/sub/b deleted in B and modified in A. Version A of a/sub/b left in tree. 2a~BaCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of a from B; moving it to a~B instead. tree-to-non-tree-with-rename/A-B-reversed.merge-info000064400000000000000000000007301046102023000206400ustar 00000000000000b44e5ae1d2fa3b30241ceeb6a5dba2288e16d8e0100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/b100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/sub/b100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 a~B1a/sub/bCONFLICT (modify/delete)CONFLICT (modify/delete): a/sub/b deleted in B and modified in A. Version A of a/sub/b left in tree. 2a~BaCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of a from B; moving it to a~B instead. tree-to-non-tree-with-rename/.git000075500000000000000000000000001046102023000152745ustar 00000000000000tree-to-non-tree-with-rename/.git/COMMIT_EDITMSG000064400000000000000000000001171046102023000174410ustar 00000000000000rm -Rf a/ && add empty 'a' (which is like a rename from an empty deleted file) tree-to-non-tree-with-rename/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000230310ustar 000000000000009a41ba54e914316dee2a65475f1d0e0890f9ddfb tree-to-non-tree-with-rename/.git/index000064400000000000000000000002011046102023000163760ustar 00000000000000DIRC⛲CK)wZSaTREE1 0 Imd(ϒIRkH 3 Bztree-to-non-tree-with-rename/.git/refs000075500000000000000000000000001046102023000162335ustar 00000000000000tree-to-non-tree-with-rename/.git/refs/tags000075500000000000000000000000001046102023000171715ustar 00000000000000tree-to-non-tree-with-rename/.git/refs/heads000075500000000000000000000000001046102023000173175ustar 00000000000000tree-to-non-tree-with-rename/.git/refs/heads/B000064400000000000000000000000511046102023000174760ustar 000000000000007abf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e tree-to-non-tree-with-rename/.git/refs/heads/expected-reversed000064400000000000000000000000511046102023000227330ustar 000000000000007abf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e tree-to-non-tree-with-rename/.git/refs/heads/main000064400000000000000000000000511046102023000202410ustar 000000000000009fa918ebcb4e71d65111bf426d3bb20463c8a9a6 tree-to-non-tree-with-rename/.git/refs/heads/A000064400000000000000000000000511046102023000174750ustar 000000000000004b223685fb54ccf8e390739440ddd65f69ead854 tree-to-non-tree-with-rename/.git/hooks000075500000000000000000000000001046102023000164175ustar 00000000000000tree-to-non-tree-with-rename/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000231160ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 tree-to-non-tree-with-rename/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000214550ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 tree-to-non-tree-with-rename/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000226360ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : tree-to-non-tree-with-rename/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000230550ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : tree-to-non-tree-with-rename/.git/hooks/post-update.sample000075500000000000000000000002751046102023000221550ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info tree-to-non-tree-with-rename/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000234210ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi tree-to-non-tree-with-rename/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000221050ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi tree-to-non-tree-with-rename/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000235310ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } tree-to-non-tree-with-rename/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000226430ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : tree-to-non-tree-with-rename/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000217620ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- tree-to-non-tree-with-rename/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000217330ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END tree-to-non-tree-with-rename/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000217550ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } tree-to-non-tree-with-rename/.git/tree-to-non-tree-with-rename-A-B.index000064400000000000000000000003701046102023000242630ustar 00000000000000DIRCDRCgG!8?هa/sub/b JX+p a/sub/b⛲CK)wZS0a~BQyɍR4HEUGtree-to-non-tree-with-rename/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000222030ustar 00000000000000496d6428b9cf92981dc9495211e6e1120fb6f2ba tree-to-non-tree-with-rename/.git/description000064400000000000000000000001111046102023000176120ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. tree-to-non-tree-with-rename/.git/logs000075500000000000000000000000001046102023000162405ustar 00000000000000tree-to-non-tree-with-rename/.git/logs/refs000075500000000000000000000000001046102023000171775ustar 00000000000000tree-to-non-tree-with-rename/.git/logs/refs/heads000075500000000000000000000000001046102023000202635ustar 00000000000000tree-to-non-tree-with-rename/.git/logs/refs/heads/B000064400000000000000000000005711046102023000204510ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 branch: Created from main 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 7abf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e committer 946771200 +0000 commit: rm -Rf a/ && add empty 'a' (which is like a rename from an empty deleted file) tree-to-non-tree-with-rename/.git/logs/refs/heads/expected-reversed000064400000000000000000000002331046102023000237010ustar 000000000000000000000000000000000000000000000000000000 7abf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e committer 946771200 +0000 branch: Created from B tree-to-non-tree-with-rename/.git/logs/refs/heads/main000064400000000000000000000002331046102023000212070ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 commit (initial): init tree-to-non-tree-with-rename/.git/logs/refs/heads/A000064400000000000000000000005001046102023000204400ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 branch: Created from main 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 4b223685fb54ccf8e390739440ddd65f69ead854 committer 946771200 +0000 commit: 'A' changes 'a/sub/b' tree-to-non-tree-with-rename/.git/logs/HEAD000064400000000000000000000015351046102023000167470ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 commit (initial): init 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 checkout: moving from main to A 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 4b223685fb54ccf8e390739440ddd65f69ead854 committer 946771200 +0000 commit: 'A' changes 'a/sub/b' 4b223685fb54ccf8e390739440ddd65f69ead854 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 checkout: moving from A to B 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 7abf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e committer 946771200 +0000 commit: rm -Rf a/ && add empty 'a' (which is like a rename from an empty deleted file) tree-to-non-tree-with-rename/.git/info000075500000000000000000000000001046102023000162275ustar 00000000000000tree-to-non-tree-with-rename/.git/info/exclude000064400000000000000000000003601046102023000176610ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ tree-to-non-tree-with-rename/.git/HEAD000064400000000000000000000000221046102023000157710ustar 00000000000000ref: refs/heads/B tree-to-non-tree-with-rename/.git/objects000075500000000000000000000000001046102023000167255ustar 00000000000000tree-to-non-tree-with-rename/.git/objects/7a000075500000000000000000000000001046102023000172345ustar 00000000000000tree-to-non-tree-with-rename/.git/objects/7a/bf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e000064400000000000000000000003211046102023000253200ustar 00000000000000xeON!W10lie{5hs A6W:}3P>2Y:PBVJMQ iԌsT Hmtree-to-non-tree-with-rename/.git/objects/fb000075500000000000000000000000001046102023000173145ustar 00000000000000tree-to-non-tree-with-rename/.git/objects/fb/8347d2649a3d93079ae7906bc24a3b85d04576000064400000000000000000000000551046102023000242440ustar 00000000000000x+)JMU06`01$QWTQ }s٢eIVtree-to-non-tree-with-rename/.git/objects/a2000075500000000000000000000000001046102023000172275ustar 00000000000000tree-to-non-tree-with-rename/.git/objects/a2/1cbd21058106b06371ae02d7258eb20c015dec000064400000000000000000000001201046102023000243050ustar 00000000000000x+)JMU`040031QHax6M9{wk+qIODd*VI P(.MbX寤βdɏMc ]=(Ttree-to-non-tree-with-rename/.git/objects/b4000075500000000000000000000000001046102023000172325ustar 00000000000000tree-to-non-tree-with-rename/.git/objects/b4/4e5ae1d2fa3b30241ceeb6a5dba2288e16d8e0000064400000000000000000000001141046102023000247130ustar 00000000000000x+)JMU0d01DRfNf|B!/ ef&& uN >5gnuQ7= Tpktree-to-non-tree-with-rename/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000241270ustar 00000000000000xKOR04b022222/ctree-to-non-tree-with-rename/.git/objects/5f000075500000000000000000000000001046102023000172375ustar 00000000000000tree-to-non-tree-with-rename/.git/objects/5f/6dd75af7ab507972ec2252fbd9bb36a2977662000064400000000000000000000000561046102023000244670ustar 00000000000000x+)JMU0d040031QHb""St/-.i Y tree-to-non-tree-with-rename/.git/objects/60000075500000000000000000000000001046102023000171525ustar 00000000000000tree-to-non-tree-with-rename/.git/objects/60/2c8b837694ec0eb26afe65e98e5e9747464dde000064400000000000000000000000531046102023000245060ustar 00000000000000x+)JMU0`01D)p~)s}Ft [tree-to-non-tree-with-rename/.git/tree-to-non-tree-with-rename-A-B-reversed.index000064400000000000000000000003701046102023000261000ustar 00000000000000DIRCDRCgG!8?هa/sub/b JX+p0a/sub/b⛲CK)wZS a~BfBՁR\@rڴ"tree-to-non-tree-with-rename/.git/config000064400000000000000000000002111046102023000165350ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true tree-to-non-tree-with-rename/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000230310ustar 000000000000009a41ba54e914316dee2a65475f1d0e0890f9ddfb tree-to-non-tree-with-rename/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000222030ustar 00000000000000c4d29f3ba5ef7a7eb8e13c756b98ca8e208b8543 tree-to-non-tree-with-rename/a000064400000000000000000000000001046102023000146430ustar 00000000000000conflicting-rename-complex000075500000000000000000000000001046102023000143225ustar 00000000000000conflicting-rename-complex/A-B.merge-info000064400000000000000000000024711046102023000167160ustar 00000000000000b512329a38290019c6493bbb536d08c1932949f0100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-renamed/sub/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a-renamed/x.f100644 8a1218a1024a212bb3db30becd860315f9f3ac52 2 a-renamed/x.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-renamed/y.f100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 3 a-renamed/z100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f2a-renamed/x.fa/x.fCONFLICT (rename/delete)CONFLICT (rename/delete): a/x.f renamed to a-renamed/x.f in A, but deleted in B. 1a-renamed/x.fCONFLICT (modify/delete)CONFLICT (modify/delete): a-renamed/x.f deleted in B and modified in A. Version A of a-renamed/x.f left in tree. 2a-renamed/y.fa/y.fCONFLICT (directory rename suggested)CONFLICT (file location): a/sub/y.f renamed to a/y.f in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to a-renamed/y.f. 2a-renamed/za/zCONFLICT (directory rename suggested)CONFLICT (file location): a/z added in B inside a directory that was renamed in A, suggesting it should perhaps be moved to a-renamed/z. 1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa-renamed/sub/y.fa-renamed/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a-renamed/sub/y.f in A and to a-renamed/y.f in B. conflicting-rename-complex/A-B-reversed.merge-info000064400000000000000000000024711046102023000205330ustar 00000000000000b512329a38290019c6493bbb536d08c1932949f0100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-renamed/sub/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a-renamed/x.f100644 8a1218a1024a212bb3db30becd860315f9f3ac52 3 a-renamed/x.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-renamed/y.f100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 a-renamed/z100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f2a-renamed/x.fa/x.fCONFLICT (rename/delete)CONFLICT (rename/delete): a/x.f renamed to a-renamed/x.f in A, but deleted in B. 1a-renamed/x.fCONFLICT (modify/delete)CONFLICT (modify/delete): a-renamed/x.f deleted in B and modified in A. Version A of a-renamed/x.f left in tree. 2a-renamed/y.fa/y.fCONFLICT (directory rename suggested)CONFLICT (file location): a/sub/y.f renamed to a/y.f in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to a-renamed/y.f. 2a-renamed/za/zCONFLICT (directory rename suggested)CONFLICT (file location): a/z added in B inside a directory that was renamed in A, suggesting it should perhaps be moved to a-renamed/z. 1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa-renamed/y.fa-renamed/sub/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a-renamed/y.f in B and to a-renamed/sub/y.f in A. conflicting-rename-complex/.git000075500000000000000000000000001046102023000151635ustar 00000000000000conflicting-rename-complex/.git/COMMIT_EDITMSG000064400000000000000000000002151046102023000173270ustar 00000000000000Close to what Git has, but different due to rename tracking. This is why content ends up in a different place, which is the only difference. conflicting-rename-complex/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000227200ustar 00000000000000e37d7c2a915a5a3e780b63a462dc2cc6139f0ab9 conflicting-rename-complex/.git/index000064400000000000000000000004031046102023000162710ustar 00000000000000DIRC JX+p a-renamed/y.f⛲CK)wZS a-renamed/zTREE;2 1 3d@4ϸiwa-renamed2 0 v=ynpzYck>ޠV'conflicting-rename-complex/.git/refs000075500000000000000000000000001046102023000161225ustar 00000000000000conflicting-rename-complex/.git/refs/tags000075500000000000000000000000001046102023000170605ustar 00000000000000conflicting-rename-complex/.git/refs/heads000075500000000000000000000000001046102023000172065ustar 00000000000000conflicting-rename-complex/.git/refs/heads/B000064400000000000000000000000511046102023000173650ustar 000000000000008a653419bf3dedd8a42f156ea96bc5ae3c359f1b conflicting-rename-complex/.git/refs/heads/main000064400000000000000000000000511046102023000201300ustar 0000000000000081a81b561f72d779aefb47ab475c363fbb8bb6bc conflicting-rename-complex/.git/refs/heads/A000064400000000000000000000000511046102023000173640ustar 00000000000000beb102ac2dffaede3cb6e968466fe50a7cb4d7aa conflicting-rename-complex/.git/refs/heads/expected000064400000000000000000000000511046102023000210050ustar 0000000000000036c97f9d1c8abfca07fea8ef7ce1cc3f60674ab4 conflicting-rename-complex/.git/conflicting-rename-complex-A-B-reversed.index000064400000000000000000000012201046102023000256510ustar 00000000000000DIRCJ!+0͆R0a-renamed/sub/y.f⛲CK)wZS0a-renamed/sub/z⛲CK)wZS0 a-renamed/w JX+p0 a-renamed/x.f JX+p a-renamed/y.f⛲CK)wZS a-renamed/zDRCgG!8?هa/x.f JX+p a/y.fh?$) Ы#conflicting-rename-complex/.git/hooks000075500000000000000000000000001046102023000163065ustar 00000000000000conflicting-rename-complex/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000230050ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 conflicting-rename-complex/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000213440ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 conflicting-rename-complex/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000225250ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : conflicting-rename-complex/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000227440ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : conflicting-rename-complex/.git/hooks/post-update.sample000075500000000000000000000002751046102023000220440ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info conflicting-rename-complex/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000233100ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi conflicting-rename-complex/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000217740ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi conflicting-rename-complex/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000234200ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } conflicting-rename-complex/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000225320ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : conflicting-rename-complex/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000216510ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- conflicting-rename-complex/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000216220ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END conflicting-rename-complex/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000216440ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } conflicting-rename-complex/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000220720ustar 0000000000000088e4ec336440348ed3cfb86906dfd313c377069f conflicting-rename-complex/.git/description000064400000000000000000000001111046102023000175010ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. conflicting-rename-complex/.git/logs000075500000000000000000000000001046102023000161275ustar 00000000000000conflicting-rename-complex/.git/logs/refs000075500000000000000000000000001046102023000170665ustar 00000000000000conflicting-rename-complex/.git/logs/refs/heads000075500000000000000000000000001046102023000201525ustar 00000000000000conflicting-rename-complex/.git/logs/refs/heads/B000064400000000000000000000005671046102023000203450ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 8a653419bf3dedd8a42f156ea96bc5ae3c359f1b committer 946771200 +0000 commit: change something in subdirectory, then overwrite directory with subdirectory conflicting-rename-complex/.git/logs/refs/heads/main000064400000000000000000000002371046102023000211020ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original conflicting-rename-complex/.git/logs/refs/heads/A000064400000000000000000000005261046102023000203370ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc beb102ac2dffaede3cb6e968466fe50a7cb4d7aa committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed conflicting-rename-complex/.git/logs/refs/heads/expected000064400000000000000000000006671046102023000217660ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 36c97f9d1c8abfca07fea8ef7ce1cc3f60674ab4 committer 946771200 +0000 commit: Close to what Git has, but different due to rename tracking. This is why content ends up in a different place, which is the only difference. conflicting-rename-complex/.git/logs/HEAD000064400000000000000000000024661046102023000166420ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original 81a81b561f72d779aefb47ab475c363fbb8bb6bc 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from main to A 81a81b561f72d779aefb47ab475c363fbb8bb6bc beb102ac2dffaede3cb6e968466fe50a7cb4d7aa committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed beb102ac2dffaede3cb6e968466fe50a7cb4d7aa 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from A to B 81a81b561f72d779aefb47ab475c363fbb8bb6bc 8a653419bf3dedd8a42f156ea96bc5ae3c359f1b committer 946771200 +0000 commit: change something in subdirectory, then overwrite directory with subdirectory 8a653419bf3dedd8a42f156ea96bc5ae3c359f1b 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from B to expected 81a81b561f72d779aefb47ab475c363fbb8bb6bc 36c97f9d1c8abfca07fea8ef7ce1cc3f60674ab4 committer 946771200 +0000 commit: Close to what Git has, but different due to rename tracking. This is why content ends up in a different place, which is the only difference. conflicting-rename-complex/.git/info000075500000000000000000000000001046102023000161165ustar 00000000000000conflicting-rename-complex/.git/info/exclude000064400000000000000000000003601046102023000175500ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ conflicting-rename-complex/.git/HEAD000064400000000000000000000000311046102023000156600ustar 00000000000000ref: refs/heads/expected conflicting-rename-complex/.git/objects000075500000000000000000000000001046102023000166145ustar 00000000000000conflicting-rename-complex/.git/objects/8e000075500000000000000000000000001046102023000171305ustar 00000000000000conflicting-rename-complex/.git/objects/8e/5b5c26ab5f2a824c123846adceaf811f538231000064400000000000000000000001111046102023000243150ustar 00000000000000x+)JMU03`040031QKcX䥨m̢?? JW1Bnkϭon2440031Q(gx6M9{wk+qIODd^Ƨ{IDlpI[*]U/W36conflicting-rename-complex/.git/objects/e6000075500000000000000000000000001046102023000171265ustar 00000000000000conflicting-rename-complex/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000244320ustar 00000000000000xKOR0` conflicting-rename-complex/.git/objects/ba000075500000000000000000000000001046102023000171765ustar 00000000000000conflicting-rename-complex/.git/objects/ba/185e921f848f2b5db2cad1312950f1283b8e34000064400000000000000000000000531046102023000242440ustar 00000000000000x+)JMU0`01DUх%S$h&x?5 conflicting-rename-complex/.git/objects/08000075500000000000000000000000001046102023000170435ustar 00000000000000conflicting-rename-complex/.git/objects/08/c56681eceec443b14ad503fa7ebf1c46652c50000064400000000000000000000000561046102023000244040ustar 00000000000000x+)JMU0d040031Qbx6M9{wk+qIOD  conflicting-rename-complex/.git/objects/info000075500000000000000000000000001046102023000175475ustar 00000000000000conflicting-rename-complex/.git/objects/36000075500000000000000000000000001046102023000170445ustar 00000000000000conflicting-rename-complex/.git/objects/36/c97f9d1c8abfca07fea8ef7ce1cc3f60674ab4000064400000000000000000000003571046102023000250140ustar 00000000000000xeO[j0 wN._ ,Џ^m6M8lnKZAa<\臲wVqtt'6ܛK%}J:{XKZ (cK+e F hjVh_v>?]x)o%%`cf/twI8W齅7y ׺;ۧ1LhTц!6_twconflicting-rename-complex/.git/objects/88000075500000000000000000000000001046102023000170535ustar 00000000000000conflicting-rename-complex/.git/objects/88/5a3f5ae53969da9b4d9a44a1e83e1c8a2fc69a000064400000000000000000000002071046102023000245160ustar 00000000000000x+)JMU045`01$?ޓ*b{ce󂏆f&& >5gnuQ7= KcX䥨m̢?? JW5>0K"b˅KP*FFARconflicting-rename-complex/.git/objects/88/e4ec336440348ed3cfb86906dfd313c377069f000064400000000000000000000000631046102023000242210ustar 00000000000000x+)JMU06c01DݢԼ?ޓ*b{ceG9conflicting-rename-complex/.git/objects/44000075500000000000000000000000001046102023000170435ustar 00000000000000conflicting-rename-complex/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000240740ustar 00000000000000xKOR0d/LK22222pSconflicting-rename-complex/.git/objects/81000075500000000000000000000000001046102023000170445ustar 00000000000000conflicting-rename-complex/.git/objects/81/a81b561f72d779aefb47ab475c363fbb8bb6bc000064400000000000000000000002001046102023000245530ustar 00000000000000xe B![z%\3ĠO(nf 3Zep00:&r^#Zd@'#Xx[ B}ltJW!QLίAܲۿ{^6BE7;conflicting-rename-complex/.git/objects/19000075500000000000000000000000001046102023000170455ustar 00000000000000conflicting-rename-complex/.git/objects/19/2f286cc1b77b16935a43b1bffe1084c93cb087000064400000000000000000000001461046102023000242560ustar 00000000000000x+)JMU4`01$ZM>Bnkϭon2440031Q(gx6M9{wk+qIODd^CB&/Eͷ mcyM%Lconflicting-rename-complex/.git/objects/8a000075500000000000000000000000001046102023000171245ustar 00000000000000conflicting-rename-complex/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000242620ustar 00000000000000xKOR04`02222(-Rconflicting-rename-complex/.git/objects/8a/653419bf3dedd8a42f156ea96bc5ae3c359f1b000064400000000000000000000003041046102023000245600ustar 00000000000000xeJ1 S^ig*mn ]YWeD s8GkA'X^{dvFQb kveIgxIdFf>P j\͚ct1"ܸ ?rWF8 ee{7 tR:q S<p}V&8.p\/` conflicting-rename-complex/.git/objects/7c000075500000000000000000000000001046102023000171255ustar 00000000000000conflicting-rename-complex/.git/objects/7c/99591d1f8656dbc1cda3f8e5027e5f12c6952f000064400000000000000000000000541046102023000243620ustar 00000000000000x+)JMU0`01DF7[XNG4vqconflicting-rename-complex/.git/objects/pack000075500000000000000000000000001046102023000175325ustar 00000000000000conflicting-rename-complex/.git/objects/ec000075500000000000000000000000001046102023000172035ustar 00000000000000conflicting-rename-complex/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000242600ustar 00000000000000xKOR02d/LK222222}conflicting-rename-complex/.git/objects/e3000075500000000000000000000000001046102023000171235ustar 00000000000000conflicting-rename-complex/.git/objects/e3/7d7c2a915a5a3e780b63a462dc2cc6139f0ab9000064400000000000000000000001131046102023000244000ustar 00000000000000x+)JMU03a01DݢԼioquW~TUх%S$h&x?econflicting-rename-complex/.git/objects/fc000075500000000000000000000000001046102023000172045ustar 00000000000000conflicting-rename-complex/.git/objects/fc/0f90c085de1b1a769f843ddffc01796ee770f1000064400000000000000000000001111046102023000245030ustar 00000000000000x+)JMU03`040031QKc""St/-.i @}4{kݚʣnz< conflicting-rename-complex/.git/objects/e5000075500000000000000000000000001046102023000171255ustar 00000000000000conflicting-rename-complex/.git/objects/e5/fcfa8380466dbf3f664f73229b8eb14933271f000064400000000000000000000000631046102023000242770ustar 00000000000000x+)JMU06c01DݢԼI}۫&G9oO͆v0 conflicting-rename-complex/.git/objects/e5/b7a53417a647ab8ca09fd7837c813a162f8dea000064400000000000000000000001571046102023000244250ustar 00000000000000x+)JMU045`01$ZM>Bnkϭon2440031Q(gx6M9{wk+qIODd^Ƨ{IDlpI[*]_ |>2conflicting-rename-complex/.git/objects/ae000075500000000000000000000000001046102023000172015ustar 00000000000000conflicting-rename-complex/.git/objects/ae/d5be04fe0ac035ef0f12a21affa55fdcf80541000064400000000000000000000000641046102023000247420ustar 00000000000000x+)JMU06c01DݢԼ';$^wA9N]Wconflicting-rename-complex/.git/objects/b4000075500000000000000000000000001046102023000171215ustar 00000000000000conflicting-rename-complex/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000240160ustar 00000000000000xKOR04b022222/cconflicting-rename-complex/.git/objects/be000075500000000000000000000000001046102023000172025ustar 00000000000000conflicting-rename-complex/.git/objects/be/b102ac2dffaede3cb6e968466fe50a7cb4d7aa000064400000000000000000000002611046102023000251240ustar 00000000000000xe 0 S_%m >E/ sr/ϥ*No IL.i@$/YSb2wF#j `2#1B>b.( :[|s9A^&nZ*sǯh췫 Sm;hX^!OϩǻQ0conflicting-rename-complex/.git/objects/b5000075500000000000000000000000001046102023000171225ustar 00000000000000conflicting-rename-complex/.git/objects/b5/12329a38290019c6493bbb536d08c1932949f0000064400000000000000000000000631046102023000236730ustar 00000000000000x+)JMU06c01DݢԼ(frYNK,<Vconflicting-rename-complex/.git/objects/9c000075500000000000000000000000001046102023000171275ustar 00000000000000conflicting-rename-complex/.git/objects/9c/48b30d5e977c4991e9ba3894817253b0adc876000064400000000000000000000001111046102023000241430ustar 00000000000000x+)JMU03`040031QKcpa j1{5y+Zl bx6M9{wk+qIODUconflicting-rename-complex/.git/objects/5f000075500000000000000000000000001046102023000171265ustar 00000000000000conflicting-rename-complex/.git/objects/5f/648142ecb5c4c8ad6fe1dbcf60ed42c42932b9000064400000000000000000000001111046102023000245470ustar 00000000000000x+)JMU03`040031QKcxÒƆ'EƼ_$O];y*]lٛ.^s\WuГl2conflicting-rename-complex/.git/objects/3d000075500000000000000000000000001046102023000171225ustar 00000000000000conflicting-rename-complex/.git/objects/3d/c63ad95d52e0a30a7b3fb8244e0ff035645b9f000064400000000000000000000000631046102023000244050ustar 00000000000000x+)JMU06c01DݢԼۗ/s_ݳ`F+1WIKconflicting-rename-complex/.git/objects/3b000075500000000000000000000000001046102023000171205ustar 00000000000000conflicting-rename-complex/.git/objects/3b/76aa085b717495c060282da9b61b5d61df5a37000064400000000000000000000001471046102023000241720ustar 00000000000000x+)JMU4`01$9yxN|bJcQ' LL}4{kݚʣnz<*Yck.=IwWlG)Jconflicting-rename-complex/.git/conflicting-rename-complex-A-B.index000064400000000000000000000012201046102023000240340ustar 00000000000000DIRCJ!+0͆R a-renamed/sub/y.f⛲CK)wZS a-renamed/sub/z⛲CK)wZS a-renamed/w JX+p a-renamed/x.f JX+p a-renamed/y.f⛲CK)wZS a-renamed/zDRCgG!8?هa/x.f JX+p0a/y.f~,ty@ -kconflicting-rename-complex/.git/config000064400000000000000000000002111046102023000164240ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true conflicting-rename-complex/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000227200ustar 00000000000000e37d7c2a915a5a3e780b63a462dc2cc6139f0ab9 conflicting-rename-complex/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000220720ustar 00000000000000aed5be04fe0ac035ef0f12a21affa55fdcf80541 conflicting-rename-complex/a-renamed000075500000000000000000000000001046102023000161535ustar 00000000000000conflicting-rename-complex/a-renamed/w000064400000000000000000000000001046102023000164110ustar 00000000000000conflicting-rename-complex/a-renamed/x.f000064400000000000000000000000141046102023000166430ustar 000000000000001 2 3 4 5 6 conflicting-rename-complex/a-renamed/sub000075500000000000000000000000001046102023000167445ustar 00000000000000conflicting-rename-complex/a-renamed/sub/z000064400000000000000000000000001046102023000172050ustar 00000000000000conflicting-rename-complex/a-renamed/sub/y.f000064400000000000000000000000121046102023000174330ustar 000000000000001 2 3 4 5 conflicting-rename-complex/a-renamed/z000064400000000000000000000000001046102023000164140ustar 00000000000000conflicting-rename-complex/a-renamed/y.f000064400000000000000000000000141046102023000166440ustar 000000000000001 2 3 4 5 6 added-file-changed-content-and-mode000075500000000000000000000000001046102023000156105ustar 00000000000000added-file-changed-content-and-mode/A-B.merge-info000064400000000000000000000004001046102023000201720ustar 00000000000000c1e9671c82eb99ced21959842aba12daae74b904100644 8a1218a1024a212bb3db30becd860315f9f3ac52 2 new100755 ec046db5d8b05470e472330d75f419c81ed6c9d3 3 new1newAuto-mergingAuto-merging new 1newCONFLICT (contents)CONFLICT (add/add): Merge conflict in new added-file-changed-content-and-mode/A-B-reversed.merge-info000064400000000000000000000004001046102023000220070ustar 000000000000000003e6fa225562c5363fba49197018bca4ceab39100755 ec046db5d8b05470e472330d75f419c81ed6c9d3 2 new100644 8a1218a1024a212bb3db30becd860315f9f3ac52 3 new1newAuto-mergingAuto-merging new 1newCONFLICT (contents)CONFLICT (add/add): Merge conflict in new added-file-changed-content-and-mode/.git000075500000000000000000000000001046102023000164515ustar 00000000000000added-file-changed-content-and-mode/.git/COMMIT_EDITMSG000064400000000000000000000001651046102023000206210ustar 00000000000000Git has a better merge here, but that's due to better hunk handling/hunk splitting. We, however, consistently use +x added-file-changed-content-and-mode/.git/index000064400000000000000000000003531046102023000175630ustar 00000000000000DIRCgU*¿gU*¿ :DRCgG!8?هa/x.fgU3|gU3`L :[;R>P! # newTREE32 1 ȍ84!&>q:a1 0 &i,JTyqRXd s~4t~̕added-file-changed-content-and-mode/.git/refs000075500000000000000000000000001046102023000174105ustar 00000000000000added-file-changed-content-and-mode/.git/refs/tags000075500000000000000000000000001046102023000203465ustar 00000000000000added-file-changed-content-and-mode/.git/refs/heads000075500000000000000000000000001046102023000204745ustar 00000000000000added-file-changed-content-and-mode/.git/refs/heads/B000064400000000000000000000000511046102023000206530ustar 00000000000000607487b8a4b55faa02852cee5dee30f4cd1ea354 added-file-changed-content-and-mode/.git/refs/heads/main000064400000000000000000000000511046102023000214160ustar 00000000000000a80891d88650998268c93a07b48dff45fc8fbcfd added-file-changed-content-and-mode/.git/refs/heads/A000064400000000000000000000000511046102023000206520ustar 000000000000009f77009f1d1f98c3e624f3909aaa02e589cf1eef added-file-changed-content-and-mode/.git/refs/heads/expected000064400000000000000000000000511046102023000222730ustar 0000000000000002d71cbeecffd41e050512003ad5df816e2b3591 added-file-changed-content-and-mode/.git/hooks000075500000000000000000000000001046102023000175745ustar 00000000000000added-file-changed-content-and-mode/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000242730ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 added-file-changed-content-and-mode/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000226320ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 added-file-changed-content-and-mode/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000240130ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : added-file-changed-content-and-mode/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000242320ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : added-file-changed-content-and-mode/.git/hooks/post-update.sample000075500000000000000000000002751046102023000233320ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info added-file-changed-content-and-mode/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000245760ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi added-file-changed-content-and-mode/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000232620ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi added-file-changed-content-and-mode/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000247060ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } added-file-changed-content-and-mode/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000240200ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : added-file-changed-content-and-mode/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000231370ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- added-file-changed-content-and-mode/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000231100ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END added-file-changed-content-and-mode/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000231320ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } added-file-changed-content-and-mode/.git/description000064400000000000000000000001111046102023000207670ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. added-file-changed-content-and-mode/.git/logs000075500000000000000000000000001046102023000174155ustar 00000000000000added-file-changed-content-and-mode/.git/logs/refs000075500000000000000000000000001046102023000203545ustar 00000000000000added-file-changed-content-and-mode/.git/logs/refs/heads000075500000000000000000000000001046102023000214405ustar 00000000000000added-file-changed-content-and-mode/.git/logs/refs/heads/B000064400000000000000000000005101046102023000216170ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 branch: Created from main a80891d88650998268c93a07b48dff45fc8fbcfd 607487b8a4b55faa02852cee5dee30f4cd1ea354 committer 946771200 +0000 commit: add new with content B and +x added-file-changed-content-and-mode/.git/logs/refs/heads/main000064400000000000000000000002371046102023000223700ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 commit (initial): original added-file-changed-content-and-mode/.git/logs/refs/heads/A000064400000000000000000000005031046102023000216200ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 branch: Created from main a80891d88650998268c93a07b48dff45fc8fbcfd 9f77009f1d1f98c3e624f3909aaa02e589cf1eef committer 946771200 +0000 commit: add 'new' with content A added-file-changed-content-and-mode/.git/logs/refs/heads/expected000064400000000000000000000006371046102023000232510ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 branch: Created from main a80891d88650998268c93a07b48dff45fc8fbcfd 02d71cbeecffd41e050512003ad5df816e2b3591 committer 946771200 +0000 commit: Git has a better merge here, but that's due to better hunk handling/hunk splitting. We, however, consistently use +x added-file-changed-content-and-mode/.git/logs/HEAD000064400000000000000000000023341046102023000201220ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 commit (initial): original a80891d88650998268c93a07b48dff45fc8fbcfd a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 checkout: moving from main to A a80891d88650998268c93a07b48dff45fc8fbcfd 9f77009f1d1f98c3e624f3909aaa02e589cf1eef committer 946771200 +0000 commit: add 'new' with content A 9f77009f1d1f98c3e624f3909aaa02e589cf1eef a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 checkout: moving from A to B a80891d88650998268c93a07b48dff45fc8fbcfd 607487b8a4b55faa02852cee5dee30f4cd1ea354 committer 946771200 +0000 commit: add new with content B and +x 607487b8a4b55faa02852cee5dee30f4cd1ea354 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 checkout: moving from B to expected a80891d88650998268c93a07b48dff45fc8fbcfd 02d71cbeecffd41e050512003ad5df816e2b3591 committer 946771200 +0000 commit: Git has a better merge here, but that's due to better hunk handling/hunk splitting. We, however, consistently use +x added-file-changed-content-and-mode/.git/info000075500000000000000000000000001046102023000174045ustar 00000000000000added-file-changed-content-and-mode/.git/info/exclude000064400000000000000000000003601046102023000210360ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ added-file-changed-content-and-mode/.git/HEAD000064400000000000000000000000311046102023000171460ustar 00000000000000ref: refs/heads/expected added-file-changed-content-and-mode/.git/objects000075500000000000000000000000001046102023000201025ustar 00000000000000added-file-changed-content-and-mode/.git/objects/c3000075500000000000000000000000001046102023000204075ustar 00000000000000added-file-changed-content-and-mode/.git/objects/c3/e610fae452b6be3edc5012ae210923f4c6d40d000064400000000000000000000000641046102023000257270ustar 00000000000000xKOR0dG.C.#.c..S.[/LKA2㲃'.Vadded-file-changed-content-and-mode/.git/objects/a8000075500000000000000000000000001046102023000204125ustar 00000000000000added-file-changed-content-and-mode/.git/objects/a8/0891d88650998268c93a07b48dff45fc8fbcfd000064400000000000000000000002011046102023000256630ustar 00000000000000xe 0D=+.H6.WHPa`KΩkUc EY&4 8HAȳJ/X0|!'kaoLV ?7nۏkJMtռ*7#added-file-changed-content-and-mode/.git/objects/b8000075500000000000000000000000001046102023000204135ustar 00000000000000added-file-changed-content-and-mode/.git/objects/b8/d395f5d92352c84e179bca726bde3bc9de139c000064400000000000000000000000661046102023000260060ustar 00000000000000xKOR07gG.[/LKᲃ'.C.#.c..S.LfH`added-file-changed-content-and-mode/.git/objects/0a000075500000000000000000000000001046102023000204025ustar 00000000000000added-file-changed-content-and-mode/.git/objects/0a/44dc4c2f606e4fac20b6bf94b50041cfff6802000064400000000000000000000000661046102023000257420ustar 00000000000000xKOR07g'̼.[ಃG.C.#.c..S.r3,kXadded-file-changed-content-and-mode/.git/objects/91000075500000000000000000000000001046102023000203335ustar 00000000000000added-file-changed-content-and-mode/.git/objects/91/771b1aa7d21439ea8b961e85106ed29a78f5e9000064400000000000000000000000531046102023000255020ustar 00000000000000x+)JMU0`01Dj3%NFp6ga2M RC-)Au&JBP>d!QxR+"mT\J)s&m 2zq)%=iZ N[9#ob-lj*sn}/e#ts:nul s}2J added-file-changed-content-and-mode/.git/objects/44000075500000000000000000000000001046102023000203315ustar 00000000000000added-file-changed-content-and-mode/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000253620ustar 00000000000000xKOR0d/LK22222pSadded-file-changed-content-and-mode/.git/objects/8a000075500000000000000000000000001046102023000204125ustar 00000000000000added-file-changed-content-and-mode/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000255500ustar 00000000000000xKOR04`02222(-Radded-file-changed-content-and-mode/.git/objects/pack000075500000000000000000000000001046102023000210205ustar 00000000000000added-file-changed-content-and-mode/.git/objects/ec000075500000000000000000000000001046102023000204715ustar 00000000000000added-file-changed-content-and-mode/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000255460ustar 00000000000000xKOR02d/LK222222}added-file-changed-content-and-mode/.git/objects/c1000075500000000000000000000000001046102023000204055ustar 00000000000000added-file-changed-content-and-mode/.git/objects/c1/e9671c82eb99ced21959842aba12daae74b904000064400000000000000000000001141046102023000257040ustar 00000000000000x+)JMU0d01Dj3%N߲.kQ\pMQWX1 f^Lgadded-file-changed-content-and-mode/.git/objects/58000075500000000000000000000000001046102023000203365ustar 00000000000000added-file-changed-content-and-mode/.git/objects/58/0b6695d2a81ea8d13bcf1281ba36038b1dc45a000064400000000000000000000001131046102023000255760ustar 00000000000000x+)JMU0d01Dj3%N>>>>>> B added-file-changed-content-and-mode/a000075500000000000000000000000001046102023000160305ustar 00000000000000added-file-changed-content-and-mode/a/x.f000064400000000000000000000000231046102023000165200ustar 00000000000000original 1 2 3 4 5 change-and-delete000075500000000000000000000000001046102023000123365ustar 00000000000000change-and-delete/A-B.merge-info000064400000000000000000000010151046102023000147230ustar 00000000000000dd0a2246b5f0a4597d643b36fb24dcac53a8e163100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/x.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a/x.f120000 e29fa63dae4ccf0788897a7025da868083178fdf 1 link100644 f89a08d1e226b9a319210641b63b07dcf0bd705f 2 link1a/x.fCONFLICT (modify/delete)CONFLICT (modify/delete): a/x.f deleted in B and modified in A. Version A of a/x.f left in tree. 1linkCONFLICT (modify/delete)CONFLICT (modify/delete): link deleted in B and modified in A. Version A of link left in tree. change-and-delete/A-B-reversed.merge-info000064400000000000000000000010151046102023000165400ustar 00000000000000dd0a2246b5f0a4597d643b36fb24dcac53a8e163100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/x.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/x.f120000 e29fa63dae4ccf0788897a7025da868083178fdf 1 link100644 f89a08d1e226b9a319210641b63b07dcf0bd705f 3 link1a/x.fCONFLICT (modify/delete)CONFLICT (modify/delete): a/x.f deleted in B and modified in A. Version A of a/x.f left in tree. 1linkCONFLICT (modify/delete)CONFLICT (modify/delete): link deleted in B and modified in A. Version A of link left in tree. change-and-delete/.git000075500000000000000000000000001046102023000131775ustar 00000000000000change-and-delete/.git/COMMIT_EDITMSG000064400000000000000000000000221046102023000153370ustar 00000000000000delete everything change-and-delete/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000207340ustar 00000000000000c65fa907e7a6916330491f23945d9f32dacf842d change-and-delete/.git/index000064400000000000000000000001011046102023000143000ustar 00000000000000DIRCTREE0 0 K]Bn`K֒Ir?x}2Z76Fchange-and-delete/.git/refs000075500000000000000000000000001046102023000141365ustar 00000000000000change-and-delete/.git/refs/tags000075500000000000000000000000001046102023000150745ustar 00000000000000change-and-delete/.git/refs/heads000075500000000000000000000000001046102023000152225ustar 00000000000000change-and-delete/.git/refs/heads/B000064400000000000000000000000511046102023000154010ustar 00000000000000fc2b838c73b0fe7960dcc1b8cb8925c68724f973 change-and-delete/.git/refs/heads/main000064400000000000000000000000511046102023000161440ustar 00000000000000e11ce6b1f4da042deca2cdfe8b19ab7f7799079f change-and-delete/.git/refs/heads/A000064400000000000000000000000511046102023000154000ustar 000000000000002fa0983019dc93dfb1b395e8b0d540584106e98f change-and-delete/.git/hooks000075500000000000000000000000001046102023000143225ustar 00000000000000change-and-delete/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000210210ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 change-and-delete/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000173600ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 change-and-delete/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000205410ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : change-and-delete/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000207600ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : change-and-delete/.git/hooks/post-update.sample000075500000000000000000000002751046102023000200600ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info change-and-delete/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000213240ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi change-and-delete/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000200100ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi change-and-delete/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000214340ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } change-and-delete/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000205460ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : change-and-delete/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000176650ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- change-and-delete/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000176360ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END change-and-delete/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000176600ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } change-and-delete/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000201060ustar 000000000000004b825dc642cb6eb9a060e54bf8d69288fbee4904 change-and-delete/.git/description000064400000000000000000000001111046102023000155150ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. change-and-delete/.git/logs000075500000000000000000000000001046102023000141435ustar 00000000000000change-and-delete/.git/logs/refs000075500000000000000000000000001046102023000151025ustar 00000000000000change-and-delete/.git/logs/refs/heads000075500000000000000000000000001046102023000161665ustar 00000000000000change-and-delete/.git/logs/refs/heads/B000064400000000000000000000004741046102023000163560ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 branch: Created from main e11ce6b1f4da042deca2cdfe8b19ab7f7799079f fc2b838c73b0fe7960dcc1b8cb8925c68724f973 committer 946771200 +0000 commit: delete everything change-and-delete/.git/logs/refs/heads/main000064400000000000000000000002371046102023000171160ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 commit (initial): original change-and-delete/.git/logs/refs/heads/A000064400000000000000000000005121046102023000163460ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 branch: Created from main e11ce6b1f4da042deca2cdfe8b19ab7f7799079f 2fa0983019dc93dfb1b395e8b0d540584106e98f committer 946771200 +0000 commit: link type-changed, file changed change-and-delete/.git/logs/HEAD000064400000000000000000000014561046102023000146540ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 commit (initial): original e11ce6b1f4da042deca2cdfe8b19ab7f7799079f e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 checkout: moving from main to A e11ce6b1f4da042deca2cdfe8b19ab7f7799079f 2fa0983019dc93dfb1b395e8b0d540584106e98f committer 946771200 +0000 commit: link type-changed, file changed 2fa0983019dc93dfb1b395e8b0d540584106e98f e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 checkout: moving from A to B e11ce6b1f4da042deca2cdfe8b19ab7f7799079f fc2b838c73b0fe7960dcc1b8cb8925c68724f973 committer 946771200 +0000 commit: delete everything change-and-delete/.git/info000075500000000000000000000000001046102023000141325ustar 00000000000000change-and-delete/.git/info/exclude000064400000000000000000000003601046102023000155640ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ change-and-delete/.git/HEAD000064400000000000000000000000221046102023000136740ustar 00000000000000ref: refs/heads/B change-and-delete/.git/objects000075500000000000000000000000001046102023000146305ustar 00000000000000change-and-delete/.git/objects/f8000075500000000000000000000000001046102023000151455ustar 00000000000000change-and-delete/.git/objects/f8/9a08d1e226b9a319210641b63b07dcf0bd705f000064400000000000000000000000301046102023000222450ustar 00000000000000xKORd/,/change-and-delete/.git/objects/e1000075500000000000000000000000001046102023000151355ustar 00000000000000change-and-delete/.git/objects/e1/1ce6b1f4da042deca2cdfe8b19ab7f7799079f000064400000000000000000000002001046102023000227300ustar 00000000000000xeK 1D]$I0Wi&FBo@2@9[2ɡrH*kvINs: z[_Tbg@\AJ815ï{sWzwEZ7*7"change-and-delete/.git/objects/dd000075500000000000000000000000001046102023000152175ustar 00000000000000change-and-delete/.git/objects/dd/0a2246b5f0a4597d643b36fb24dcac53a8e163000064400000000000000000000001151046102023000224100ustar 00000000000000x+)JMU03`01D㞦w9\ezs93ǖsf&& 9y ?fq\|s"6k;Q:change-and-delete/.git/objects/info000075500000000000000000000000001046102023000155635ustar 00000000000000change-and-delete/.git/objects/2f000075500000000000000000000000001046102023000151375ustar 00000000000000change-and-delete/.git/objects/2f/a0983019dc93dfb1b395e8b0d540584106e98f000064400000000000000000000002541046102023000222230ustar 00000000000000xe 0E]+ށLE,u8WB)qRd629H"F#aq uBe2L.fkgM l~F/,@8+xmӎs8UlovB,=9v8) N7change-and-delete/.git/objects/44000075500000000000000000000000001046102023000150575ustar 00000000000000change-and-delete/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000221100ustar 00000000000000xKOR0d/LK22222pSchange-and-delete/.git/objects/pack000075500000000000000000000000001046102023000155465ustar 00000000000000change-and-delete/.git/objects/4b000075500000000000000000000000001046102023000151355ustar 00000000000000change-and-delete/.git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904000064400000000000000000000000171046102023000224460ustar 00000000000000x+)JMU0` ,change-and-delete/.git/objects/c6000075500000000000000000000000001046102023000151405ustar 00000000000000change-and-delete/.git/objects/c6/5fa907e7a6916330491f23945d9f32dacf842d000064400000000000000000000001111046102023000222220ustar 00000000000000x+)JMU03`01Dj3%NR#change-and-delete/.git/objects/fd000075500000000000000000000000001046102023000152215ustar 00000000000000change-and-delete/.git/objects/fd/269b6918c9c52c15fb4ae75497178979ebb071000064400000000000000000000000601046102023000222440ustar 00000000000000x+)JMU06d040031QKcpa j1{5y+Zl change-and-delete/.git/objects/fc000075500000000000000000000000001046102023000152205ustar 00000000000000change-and-delete/.git/objects/fc/2b838c73b0fe7960dcc1b8cb8925c68724f973000064400000000000000000000002421046102023000223770ustar 00000000000000xeI 1D] ~gb7DAi*-445Z$G  dڹb sP*DU8bNECZ"½K_?u)-Ez6Ʊ#G"qP寝Z W&{Ichange-and-delete/.git/objects/e2000075500000000000000000000000001046102023000151365ustar 00000000000000change-and-delete/.git/objects/e2/9fa63dae4ccf0788897a7025da868083178fdf000064400000000000000000000000241046102023000224020ustar 00000000000000xKOR0eHԯKNchange-and-delete/.git/objects/b4000075500000000000000000000000001046102023000151355ustar 00000000000000change-and-delete/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000220320ustar 00000000000000xKOR04b022222/cchange-and-delete/.git/objects/33000075500000000000000000000000001046102023000150555ustar 00000000000000change-and-delete/.git/objects/33/8c82cddc9e40d5061e5aecd35c0969f748b4ce000064400000000000000000000000601046102023000225200ustar 00000000000000x+)JMU06d040031QKc""St/-.i C 5change-and-delete/.git/config000064400000000000000000000002111046102023000144400ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true change-and-delete/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000207340ustar 00000000000000c65fa907e7a6916330491f23945d9f32dacf842d change-and-delete/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000201060ustar 00000000000000dd0a2246b5f0a4597d643b36fb24dcac53a8e163 type-change-to-symlink000075500000000000000000000000001046102023000134215ustar 00000000000000type-change-to-symlink/b000064400000000000000000000000001046102023000136320ustar 00000000000000type-change-to-symlink/A-B.merge-info000064400000000000000000000004261046102023000160130ustar 00000000000000b22e19aed9f7b7639fbc373cf45288689c2e8f69100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 1 link120000 2e65efe2a145dda7ee51d1741299f848e5bf752e 2 link120000 63d8dbd40c23542e740659a7168a0ce3138ea748 3 link1linkCONFLICT (contents)CONFLICT (content): Merge conflict in link type-change-to-symlink/A-B-reversed.merge-info000064400000000000000000000004261046102023000176300ustar 00000000000000fb3766d3ab6bb4bbe6d8d66833758312bb10e191100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 1 link120000 63d8dbd40c23542e740659a7168a0ce3138ea748 2 link120000 2e65efe2a145dda7ee51d1741299f848e5bf752e 3 link1linkCONFLICT (contents)CONFLICT (content): Merge conflict in link type-change-to-symlink/.git000075500000000000000000000000001046102023000142625ustar 00000000000000type-change-to-symlink/.git/COMMIT_EDITMSG000064400000000000000000000000311046102023000164220ustar 00000000000000new link to point to 'b' type-change-to-symlink/.git/index000064400000000000000000000004111046102023000153670ustar 00000000000000DIRCgU#^X5gU#^X5 @>⛲CK)wZSagU#^)gU#^) @?⛲CK)wZSbgU*+!OgU*+!O @uc #T.tY HlinkTREE3 0 7fӫkh3u5VC"ҘA)d$type-change-to-symlink/.git/refs000075500000000000000000000000001046102023000152215ustar 00000000000000type-change-to-symlink/.git/refs/tags000075500000000000000000000000001046102023000161575ustar 00000000000000type-change-to-symlink/.git/refs/heads000075500000000000000000000000001046102023000163055ustar 00000000000000type-change-to-symlink/.git/refs/heads/B000064400000000000000000000000511046102023000164640ustar 000000000000007bdc9f08b0403dfe7bf8f2a821cfa8ce0adc3fc9 type-change-to-symlink/.git/refs/heads/main000064400000000000000000000000511046102023000172270ustar 000000000000004f4d303619f658d135c3e76be2280db77be14f12 type-change-to-symlink/.git/refs/heads/A000064400000000000000000000000511046102023000164630ustar 0000000000000074423ffe2be2cac33b1e89c021c3d13cb33d0304 type-change-to-symlink/.git/hooks000075500000000000000000000000001046102023000154055ustar 00000000000000type-change-to-symlink/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000221040ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 type-change-to-symlink/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000204430ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 type-change-to-symlink/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000216240ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : type-change-to-symlink/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000220430ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : type-change-to-symlink/.git/hooks/post-update.sample000075500000000000000000000002751046102023000211430ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info type-change-to-symlink/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000224070ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi type-change-to-symlink/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000210730ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi type-change-to-symlink/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000225170ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } type-change-to-symlink/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000216310ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : type-change-to-symlink/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000207500ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- type-change-to-symlink/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000207210ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END type-change-to-symlink/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000207430ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } type-change-to-symlink/.git/description000064400000000000000000000001111046102023000166000ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. type-change-to-symlink/.git/logs000075500000000000000000000000001046102023000152265ustar 00000000000000type-change-to-symlink/.git/logs/refs000075500000000000000000000000001046102023000161655ustar 00000000000000type-change-to-symlink/.git/logs/refs/heads000075500000000000000000000000001046102023000172515ustar 00000000000000type-change-to-symlink/.git/logs/refs/heads/B000064400000000000000000000005031046102023000174320ustar 000000000000000000000000000000000000000000000000000000 4f4d303619f658d135c3e76be2280db77be14f12 committer 946771200 +0000 branch: Created from main 4f4d303619f658d135c3e76be2280db77be14f12 7bdc9f08b0403dfe7bf8f2a821cfa8ce0adc3fc9 committer 946771200 +0000 commit: new link to point to 'b' type-change-to-symlink/.git/logs/refs/heads/main000064400000000000000000000002571046102023000202030ustar 000000000000000000000000000000000000000000000000000000 4f4d303619f658d135c3e76be2280db77be14f12 committer 946771200 +0000 commit (initial): original without symlink type-change-to-symlink/.git/logs/refs/heads/A000064400000000000000000000005031046102023000174310ustar 000000000000000000000000000000000000000000000000000000 4f4d303619f658d135c3e76be2280db77be14f12 committer 946771200 +0000 branch: Created from main 4f4d303619f658d135c3e76be2280db77be14f12 74423ffe2be2cac33b1e89c021c3d13cb33d0304 committer 946771200 +0000 commit: new link to point to 'a' type-change-to-symlink/.git/logs/HEAD000064400000000000000000000014761046102023000157410ustar 000000000000000000000000000000000000000000000000000000 4f4d303619f658d135c3e76be2280db77be14f12 committer 946771200 +0000 commit (initial): original without symlink 4f4d303619f658d135c3e76be2280db77be14f12 4f4d303619f658d135c3e76be2280db77be14f12 committer 946771200 +0000 checkout: moving from main to A 4f4d303619f658d135c3e76be2280db77be14f12 74423ffe2be2cac33b1e89c021c3d13cb33d0304 committer 946771200 +0000 commit: new link to point to 'a' 74423ffe2be2cac33b1e89c021c3d13cb33d0304 4f4d303619f658d135c3e76be2280db77be14f12 committer 946771200 +0000 checkout: moving from A to B 4f4d303619f658d135c3e76be2280db77be14f12 7bdc9f08b0403dfe7bf8f2a821cfa8ce0adc3fc9 committer 946771200 +0000 commit: new link to point to 'b' type-change-to-symlink/.git/info000075500000000000000000000000001046102023000152155ustar 00000000000000type-change-to-symlink/.git/info/exclude000064400000000000000000000003601046102023000166470ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ type-change-to-symlink/.git/HEAD000064400000000000000000000000221046102023000147570ustar 00000000000000ref: refs/heads/B type-change-to-symlink/.git/objects000075500000000000000000000000001046102023000157135ustar 00000000000000type-change-to-symlink/.git/objects/7a000075500000000000000000000000001046102023000162225ustar 00000000000000type-change-to-symlink/.git/objects/7a/e8b441185f0cafb03735d698a326b103902583000064400000000000000000000000711046102023000231230ustar 00000000000000x+)JMU4`040031QHdx6M9{wk+qIODd>ɜ̼l,type-change-to-symlink/.git/objects/2e000075500000000000000000000000001046102023000162215ustar 00000000000000type-change-to-symlink/.git/objects/2e/65efe2a145dda7ee51d1741299f848e5bf752e000064400000000000000000000000201046102023000235260ustar 00000000000000xKOR0dH Rtype-change-to-symlink/.git/objects/4f000075500000000000000000000000001046102023000162245ustar 00000000000000type-change-to-symlink/.git/objects/4f/4d303619f658d135c3e76be2280db77be14f12000064400000000000000000000002141046102023000232720ustar 00000000000000xe 0D]+^-WҚj0iJLQހRfsJ'{Ӡ'4RMGN 3p M^so>KK1#tR{laml_Qk-r 0Ў Wa7%=type-change-to-symlink/.git/objects/e6000075500000000000000000000000001046102023000162255ustar 00000000000000type-change-to-symlink/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000235310ustar 00000000000000xKOR0` type-change-to-symlink/.git/objects/63000075500000000000000000000000001046102023000161435ustar 00000000000000type-change-to-symlink/.git/objects/63/d8dbd40c23542e740659a7168a0ce3138ea748000064400000000000000000000000201046102023000232050ustar 00000000000000xKOR0dH Stype-change-to-symlink/.git/objects/info000075500000000000000000000000001046102023000166465ustar 00000000000000type-change-to-symlink/.git/objects/7b000075500000000000000000000000001046102023000162235ustar 00000000000000type-change-to-symlink/.git/objects/7b/dc9f08b0403dfe7bf8f2a821cfa8ce0adc3fc9000064400000000000000000000002521046102023000241530ustar 00000000000000xe 0D=+Al6ݤP_6[,ڦ~Ee̐y*weSQ(0'Er9&:-t)Gc;rR3u.$!љ^.yuo?볟כ&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 both-modify-union-attr/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000204520ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 both-modify-union-attr/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000216330ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : both-modify-union-attr/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000220520ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : both-modify-union-attr/.git/hooks/post-update.sample000075500000000000000000000002751046102023000211520ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info both-modify-union-attr/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000224160ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi both-modify-union-attr/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000211020ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi both-modify-union-attr/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000225260ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } both-modify-union-attr/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000216400ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : both-modify-union-attr/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000207570ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- both-modify-union-attr/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000207300ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END both-modify-union-attr/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000207520ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } both-modify-union-attr/.git/description000064400000000000000000000001111046102023000166070ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. both-modify-union-attr/.git/logs000075500000000000000000000000001046102023000152355ustar 00000000000000both-modify-union-attr/.git/logs/refs000075500000000000000000000000001046102023000161745ustar 00000000000000both-modify-union-attr/.git/logs/refs/heads000075500000000000000000000000001046102023000172605ustar 00000000000000both-modify-union-attr/.git/logs/refs/heads/B000064400000000000000000000005021046102023000174400ustar 000000000000000000000000000000000000000000000000000000 99c3f4cabf7b68cb8e267739a0886de566af087c committer 946771200 +0000 branch: Created from main 99c3f4cabf7b68cb8e267739a0886de566af087c 26f9484212ad820d220ca4b50e8dd4afccc54c30 committer 946771200 +0000 commit: change file differently both-modify-union-attr/.git/logs/refs/heads/main000064400000000000000000000002371046102023000202100ustar 000000000000000000000000000000000000000000000000000000 99c3f4cabf7b68cb8e267739a0886de566af087c committer 946771200 +0000 commit (initial): original both-modify-union-attr/.git/logs/refs/heads/A000064400000000000000000000004661046102023000174500ustar 000000000000000000000000000000000000000000000000000000 99c3f4cabf7b68cb8e267739a0886de566af087c committer 946771200 +0000 branch: Created from main 99c3f4cabf7b68cb8e267739a0886de566af087c fb50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3 committer 946771200 +0000 commit: change file both-modify-union-attr/.git/logs/HEAD000064400000000000000000000014401046102023000157370ustar 000000000000000000000000000000000000000000000000000000 99c3f4cabf7b68cb8e267739a0886de566af087c committer 946771200 +0000 commit (initial): original 99c3f4cabf7b68cb8e267739a0886de566af087c 99c3f4cabf7b68cb8e267739a0886de566af087c committer 946771200 +0000 checkout: moving from main to A 99c3f4cabf7b68cb8e267739a0886de566af087c fb50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3 committer 946771200 +0000 commit: change file fb50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3 99c3f4cabf7b68cb8e267739a0886de566af087c committer 946771200 +0000 checkout: moving from A to B 99c3f4cabf7b68cb8e267739a0886de566af087c 26f9484212ad820d220ca4b50e8dd4afccc54c30 committer 946771200 +0000 commit: change file differently both-modify-union-attr/.git/info000075500000000000000000000000001046102023000152245ustar 00000000000000both-modify-union-attr/.git/info/exclude000064400000000000000000000003601046102023000166560ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ both-modify-union-attr/.git/HEAD000064400000000000000000000000221046102023000147660ustar 00000000000000ref: refs/heads/B both-modify-union-attr/.git/objects000075500000000000000000000000001046102023000157225ustar 00000000000000both-modify-union-attr/.git/objects/71000075500000000000000000000000001046102023000161515ustar 00000000000000both-modify-union-attr/.git/objects/71/31901a0c06df1a4fe5e3e39e2d70f4a66e39cf000064400000000000000000000001261046102023000235150ustar 00000000000000x+)JMU07`040031QK,I,))L*-I-f0|Y5њeGs M @!a&+trmZZwboth-modify-union-attr/.git/objects/83000075500000000000000000000000001046102023000161545ustar 00000000000000both-modify-union-attr/.git/objects/83/508a40a13991264e6ce461324546bc89daf42d000064400000000000000000000000571046102023000231460ustar 00000000000000x+)JMU06d040031QKc(~'qw-%u*͢: both-modify-union-attr/.git/objects/c3000075500000000000000000000000001046102023000162275ustar 00000000000000both-modify-union-attr/.git/objects/c3/0b88b11c9bb09cd75e188647d57dd16391d4f4000064400000000000000000000001261046102023000233760ustar 00000000000000x+)JMU07`040031QK,I,))L*-I-f0|Y5њeGs M @!aդun,both-modify-union-attr/.git/objects/99000075500000000000000000000000001046102023000161635ustar 00000000000000both-modify-union-attr/.git/objects/99/c3f4cabf7b68cb8e267739a0886de566af087c000064400000000000000000000001771046102023000235720ustar 00000000000000xeK 1D]O`Ǝ&FBo@J2@:Gg/ Ά%Ȳ>V>VsD㌘זKr-wZt7 both-modify-union-attr/.git/objects/08000075500000000000000000000000001046102023000161515ustar 00000000000000both-modify-union-attr/.git/objects/08/858a3e06c8898a6d66f91b46b158bf774f27ac000064400000000000000000000000421046102023000233360ustar 00000000000000xKOR0`pr2222222Irboth-modify-union-attr/.git/objects/96000075500000000000000000000000001046102023000161605ustar 00000000000000both-modify-union-attr/.git/objects/96/c2036511aa9a65298a5f7ba30fa4167f559c07000064400000000000000000000001261046102023000232240ustar 00000000000000x+)JMU07`040031QK,I,))L*-I-f0|Y5њeGs M @!asQűͥ,ƛ3both-modify-union-attr/.git/objects/91000075500000000000000000000000001046102023000161535ustar 00000000000000both-modify-union-attr/.git/objects/91/49d5626cae35c3211087f9765db7f9bdc59a3c000064400000000000000000000000601046102023000234010ustar 00000000000000x+)JMU06d040031QKc8̂8qq9%both-modify-union-attr/.git/objects/info000075500000000000000000000000001046102023000166555ustar 00000000000000both-modify-union-attr/.git/objects/31000075500000000000000000000000001046102023000161455ustar 00000000000000both-modify-union-attr/.git/objects/31/e9702a913b049c1545d9e2c76d2a30834a1a0b000064400000000000000000000000401046102023000231700ustar 00000000000000xKOR04cHRM-JO-ZPboth-modify-union-attr/.git/objects/31/306963c7965d2a4ab33f4e1029faa05f82a5e4000064400000000000000000000001261046102023000232710ustar 00000000000000x+)JMU07`040031QK,I,))L*-I-f0|Y5њeGs M @!LGuD{=.YzC!Kboth-modify-union-attr/.git/objects/44000075500000000000000000000000001046102023000161515ustar 00000000000000both-modify-union-attr/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000232020ustar 00000000000000xKOR0d/LK22222pSboth-modify-union-attr/.git/objects/26000075500000000000000000000000001046102023000161515ustar 00000000000000both-modify-union-attr/.git/objects/26/f9484212ad820d220ca4b50e8dd4afccc54c30000064400000000000000000000002501046102023000234710ustar 00000000000000xe 0D=+.HҤ WZ[J{+J=87 <iX}Չ(!%8c+;-l &WUmqSImzǢ Y{>#N('3=9z[~럋hUU @J^"Jboth-modify-union-attr/.git/objects/pack000075500000000000000000000000001046102023000166405ustar 00000000000000both-modify-union-attr/.git/objects/18000075500000000000000000000000001046102023000161525ustar 00000000000000both-modify-union-attr/.git/objects/18/73e30e1258c5840dbfda14a47e248315d0881b000064400000000000000000000000361046102023000232120ustar 00000000000000xKOR04ap2222227both-modify-union-attr/.git/objects/fb000075500000000000000000000000001046102023000163115ustar 00000000000000both-modify-union-attr/.git/objects/fb/50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3000064400000000000000000000002401046102023000240650ustar 00000000000000xe 0D=+r$i+[B?߀Rea o9/UwO"$f$N<[0 mY㧤v*z31 G. bA`E:oEmM^U.|}6M[i< `U<.:-7jFhboth-modify-union-attr/.git/objects/cf000075500000000000000000000000001046102023000163125ustar 00000000000000both-modify-union-attr/.git/objects/cf/f0f31ca0ed2f38faa1b8cf47f1b9c71e2ea475000064400000000000000000000000361046102023000240730ustar 00000000000000xKOR04ap2222227both-modify-union-attr/.git/objects/fd000075500000000000000000000000001046102023000163135ustar 00000000000000both-modify-union-attr/.git/objects/fd/269b6918c9c52c15fb4ae75497178979ebb071000064400000000000000000000000601046102023000233360ustar 00000000000000x+)JMU06d040031QKcpa j1{5y+Zl both-modify-union-attr/.git/objects/f3000075500000000000000000000000001046102023000162325ustar 00000000000000both-modify-union-attr/.git/objects/f3/c66fff6e1d7df596dc1676072014cc967b7587000064400000000000000000000000421046102023000234170ustar 00000000000000xKOR0`pr2222222Irboth-modify-union-attr/.git/objects/da000075500000000000000000000000001046102023000163065ustar 00000000000000both-modify-union-attr/.git/objects/da/b7fcc3f757fe3e4c1703ca815483108f3604df000064400000000000000000000001261046102023000235230ustar 00000000000000x+)JMU07`040031QK,I,))L*-I-f0|Y5њeGs M @!9aD5'Fn{:o}both-modify-union-attr/.git/objects/9e000075500000000000000000000000001046102023000162375ustar 00000000000000both-modify-union-attr/.git/objects/9e/09bfce5a85310f735d8375f63943c4e8d60d62000064400000000000000000000000571046102023000233330ustar 00000000000000x+)JMU06d040031QKchc;ٕSmcr5 Tboth-modify-union-attr/.git/objects/92000075500000000000000000000000001046102023000161545ustar 00000000000000both-modify-union-attr/.git/objects/92/b219d4bb222c8ad5098e06b695757950fdbd3a000064400000000000000000000000601046102023000233650ustar 00000000000000x+)JMU06d040031QKc|,liwDL.mboth-modify-union-attr/.git/config000064400000000000000000000002111046102023000155320ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true both-modify-union-attr/A-B-diff3.merge-info000064400000000000000000000000511046102023000170050ustar 000000000000007131901a0c06df1a4fe5e3e39e2d70f4a66e39cfboth-modify-union-attr/.gitattributes000064400000000000000000000000201046102023000163720ustar 00000000000000a/* merge=union both-modify-union-attr/a000075500000000000000000000000001046102023000136505ustar 00000000000000both-modify-union-attr/a/x.f000064400000000000000000000000161046102023000143420ustar 00000000000000B 1 2 3 4 5 7 both-modify-union-attr/A-B-diff3-reversed.merge-info000064400000000000000000000000511046102023000206220ustar 0000000000000096c2036511aa9a65298a5f7ba30fa4167f559c07conflicting-rename-2000075500000000000000000000000001046102023000130145ustar 00000000000000conflicting-rename-2/A-B.merge-info000064400000000000000000000007751046102023000154150ustar 00000000000000711e15a7fd43769d77b926a6bf6ff7d34be0f72c100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/sub-different/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a/sub-renamed/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa/sub-renamed/y.fa/sub-different/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a/sub-renamed/y.f in A and to a/sub-different/y.f in B. 1a/x.fAuto-mergingAuto-merging a/x.f conflicting-rename-2/A-B-reversed.merge-info000064400000000000000000000007751046102023000172320ustar 00000000000000711e15a7fd43769d77b926a6bf6ff7d34be0f72c100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a/sub-different/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/sub-renamed/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa/sub-different/y.fa/sub-renamed/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a/sub-different/y.f in B and to a/sub-renamed/y.f in A. 1a/x.fAuto-mergingAuto-merging a/x.f conflicting-rename-2/.git000075500000000000000000000000001046102023000136555ustar 00000000000000conflicting-rename-2/.git/conflicting-rename-2-A-B.index000064400000000000000000000012101046102023000212170ustar 00000000000000DIRC JX+p0a/sub-different/y.f⛲CK)wZS0a/sub-different/z JX+p a/sub-renamed/y.f⛲CK)wZS a/sub-renamed/zDRCgG!8?ه a/sub/y.f⛲CK)wZSa/sub/z⛲CK)wZSa/w JX+pa/x.fe%Zci/conflicting-rename-2/.git/COMMIT_EDITMSG000064400000000000000000000000661046102023000160250ustar 00000000000000changed all content, renamed a/sub -> a/sub-different conflicting-rename-2/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000214120ustar 00000000000000e513194ec5ef3d5c99a6e132b57d693a6952defd conflicting-rename-2/.git/index000064400000000000000000000006711046102023000147720ustar 00000000000000DIRC JX+pa/sub-different/y.f⛲CK)wZSa/sub-different/z⛲CK)wZSa/w JX+pa/x.fTREEY4 1 ]dnϦTjȿ 9!a4 1 .,n! r{xSo)B؇sub-different2 0 v=ynpQ,HWpdY6pzconflicting-rename-2/.git/refs000075500000000000000000000000001046102023000146145ustar 00000000000000conflicting-rename-2/.git/refs/tags000075500000000000000000000000001046102023000155525ustar 00000000000000conflicting-rename-2/.git/refs/heads000075500000000000000000000000001046102023000157005ustar 00000000000000conflicting-rename-2/.git/refs/heads/B000064400000000000000000000000511046102023000160570ustar 000000000000004dd17fb1ce1977074bb3219bb4c0f835aca8a913 conflicting-rename-2/.git/refs/heads/main000064400000000000000000000000511046102023000166220ustar 0000000000000081a81b561f72d779aefb47ab475c363fbb8bb6bc conflicting-rename-2/.git/refs/heads/A000064400000000000000000000000511046102023000160560ustar 00000000000000a9f75942757826a4bc412a2978684913671fb776 conflicting-rename-2/.git/hooks000075500000000000000000000000001046102023000150005ustar 00000000000000conflicting-rename-2/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000214770ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 conflicting-rename-2/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000200360ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 conflicting-rename-2/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000212170ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : conflicting-rename-2/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000214360ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : conflicting-rename-2/.git/hooks/post-update.sample000075500000000000000000000002751046102023000205360ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info conflicting-rename-2/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000220020ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi conflicting-rename-2/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000204660ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi conflicting-rename-2/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000221120ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } conflicting-rename-2/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000212240ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : conflicting-rename-2/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000203430ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- conflicting-rename-2/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000203140ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END conflicting-rename-2/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000203360ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } conflicting-rename-2/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000205640ustar 00000000000000bc99f4115d99646ecfa654b3886ac8bf0939a121 conflicting-rename-2/.git/description000064400000000000000000000001111046102023000161730ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. conflicting-rename-2/.git/logs000075500000000000000000000000001046102023000146215ustar 00000000000000conflicting-rename-2/.git/logs/refs000075500000000000000000000000001046102023000155605ustar 00000000000000conflicting-rename-2/.git/logs/refs/heads000075500000000000000000000000001046102023000166445ustar 00000000000000conflicting-rename-2/.git/logs/refs/heads/B000064400000000000000000000005401046102023000170260ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 4dd17fb1ce1977074bb3219bb4c0f835aca8a913 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-different conflicting-rename-2/.git/logs/refs/heads/main000064400000000000000000000002371046102023000175740ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original conflicting-rename-2/.git/logs/refs/heads/A000064400000000000000000000005361046102023000170320ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc a9f75942757826a4bc412a2978684913671fb776 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-renamed conflicting-rename-2/.git/logs/HEAD000064400000000000000000000015461046102023000153320ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original 81a81b561f72d779aefb47ab475c363fbb8bb6bc 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from main to A 81a81b561f72d779aefb47ab475c363fbb8bb6bc a9f75942757826a4bc412a2978684913671fb776 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-renamed a9f75942757826a4bc412a2978684913671fb776 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from A to B 81a81b561f72d779aefb47ab475c363fbb8bb6bc 4dd17fb1ce1977074bb3219bb4c0f835aca8a913 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-different conflicting-rename-2/.git/info000075500000000000000000000000001046102023000146105ustar 00000000000000conflicting-rename-2/.git/info/exclude000064400000000000000000000003601046102023000162420ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ conflicting-rename-2/.git/HEAD000064400000000000000000000000221046102023000143520ustar 00000000000000ref: refs/heads/B conflicting-rename-2/.git/objects000075500000000000000000000000001046102023000153065ustar 00000000000000conflicting-rename-2/.git/objects/8e000075500000000000000000000000001046102023000156225ustar 00000000000000conflicting-rename-2/.git/objects/8e/5b5c26ab5f2a824c123846adceaf811f538231000064400000000000000000000001111046102023000230070ustar 00000000000000x+)JMU03`040031QKcX䥨m̢?? JW1Bnkϭon2440031Q(gx6M9{wk+qIODd^CB&/Eͷ mcyMל(]conflicting-rename-2/.git/objects/2e000075500000000000000000000000001046102023000156145ustar 00000000000000conflicting-rename-2/.git/objects/2e/2cb882946e2120e8727bb07853b86f2942d887000064400000000000000000000001611046102023000224730ustar 00000000000000x+)JMU040`01$ݔ̴ԢԼ?ޓ*b{ce@f&& >5gnuQ7= Kc""St/-.i ,Fconflicting-rename-2/.git/objects/71000075500000000000000000000000001046102023000155355ustar 00000000000000conflicting-rename-2/.git/objects/71/1e15a7fd43769d77b926a6bf6ff7d34be0f72c000064400000000000000000000000531046102023000231300ustar 00000000000000x+)JMU0`01D?G68F:~[1ԕOJconflicting-rename-2/.git/objects/e6000075500000000000000000000000001046102023000156205ustar 00000000000000conflicting-rename-2/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000231240ustar 00000000000000xKOR0` conflicting-rename-2/.git/objects/a9000075500000000000000000000000001046102023000156175ustar 00000000000000conflicting-rename-2/.git/objects/a9/f75942757826a4bc412a2978684913671fb776000064400000000000000000000002651046102023000223540ustar 00000000000000xe 0 S޿6D|* >Ǽ0Ns6$l0gzCc݈Վ8tQDi@0 $g;S66ÍqT,q9<ɋ]:\AkXzºvXUJE@}_Ա)de;c5gnuQ7= Kc""St/-.i +Kconflicting-rename-2/.git/objects/37000075500000000000000000000000001046102023000155375ustar 00000000000000conflicting-rename-2/.git/objects/37/984f28bc37a48294d64d981fdad863d0b229d3000064400000000000000000000001611046102023000227140ustar 00000000000000x+)JMU040`01$ݔ̴ԢԼF7[XNG4v՚(3&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-add-exe-bit-conflict/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000212620ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-add-exe-bit-conflict/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000224430ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-add-exe-bit-conflict/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000226620ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-add-exe-bit-conflict/.git/hooks/post-update.sample000075500000000000000000000002751046102023000217620ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-add-exe-bit-conflict/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000232260ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-add-exe-bit-conflict/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000217120ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-add-exe-bit-conflict/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000233360ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-add-exe-bit-conflict/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000224500ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-add-exe-bit-conflict/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000215670ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-add-exe-bit-conflict/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000215400ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-add-exe-bit-conflict/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000215620ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-add-exe-bit-conflict/.git/description000064400000000000000000000001111046102023000174170ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-add-exe-bit-conflict/.git/logs000075500000000000000000000000001046102023000160455ustar 00000000000000rename-add-exe-bit-conflict/.git/logs/refs000075500000000000000000000000001046102023000170045ustar 00000000000000rename-add-exe-bit-conflict/.git/logs/refs/heads000075500000000000000000000000001046102023000200705ustar 00000000000000rename-add-exe-bit-conflict/.git/logs/refs/heads/B000064400000000000000000000004751046102023000202610ustar 000000000000000000000000000000000000000000000000000000 7b6e33c757f1d3653a393b08a15be1d1220af578 committer 946771200 +0000 branch: Created from main 7b6e33c757f1d3653a393b08a15be1d1220af578 1dbf7decb27506a3248a47365c4a3f4c56b86558 committer 946771200 +0000 commit: mv b a; chmod +x a rename-add-exe-bit-conflict/.git/logs/refs/heads/main000064400000000000000000000002371046102023000210200ustar 000000000000000000000000000000000000000000000000000000 7b6e33c757f1d3653a393b08a15be1d1220af578 committer 946771200 +0000 commit (initial): original rename-add-exe-bit-conflict/.git/logs/refs/heads/A000064400000000000000000000004571046102023000202600ustar 000000000000000000000000000000000000000000000000000000 7b6e33c757f1d3653a393b08a15be1d1220af578 committer 946771200 +0000 branch: Created from main 7b6e33c757f1d3653a393b08a15be1d1220af578 90e5a2b92b14265db31ba385bf59bf711d20ece5 committer 946771200 +0000 commit: -x a rename-add-exe-bit-conflict/.git/logs/HEAD000064400000000000000000000014241046102023000165510ustar 000000000000000000000000000000000000000000000000000000 7b6e33c757f1d3653a393b08a15be1d1220af578 committer 946771200 +0000 commit (initial): original 7b6e33c757f1d3653a393b08a15be1d1220af578 7b6e33c757f1d3653a393b08a15be1d1220af578 committer 946771200 +0000 checkout: moving from main to A 7b6e33c757f1d3653a393b08a15be1d1220af578 90e5a2b92b14265db31ba385bf59bf711d20ece5 committer 946771200 +0000 commit: -x a 90e5a2b92b14265db31ba385bf59bf711d20ece5 7b6e33c757f1d3653a393b08a15be1d1220af578 committer 946771200 +0000 checkout: moving from A to B 7b6e33c757f1d3653a393b08a15be1d1220af578 1dbf7decb27506a3248a47365c4a3f4c56b86558 committer 946771200 +0000 commit: mv b a; chmod +x a rename-add-exe-bit-conflict/.git/info000075500000000000000000000000001046102023000160345ustar 00000000000000rename-add-exe-bit-conflict/.git/info/exclude000064400000000000000000000003601046102023000174660ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-add-exe-bit-conflict/.git/HEAD000064400000000000000000000000221046102023000155760ustar 00000000000000ref: refs/heads/B rename-add-exe-bit-conflict/.git/objects000075500000000000000000000000001046102023000165325ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/49000075500000000000000000000000001046102023000167665ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/49/6d6428b9cf92981dc9495211e6e1120fb6f2ba000064400000000000000000000000561046102023000241320ustar 00000000000000x+)JMU0d040031QHdx6M9{wk+qIODrename-add-exe-bit-conflict/.git/objects/1d000075500000000000000000000000001046102023000170365ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/1d/bf7decb27506a3248a47365c4a3f4c56b86558000064400000000000000000000002451046102023000242020ustar 00000000000000xe 0=)^$l,lP0(}| J=8o`\뭃[=Rd'diXASLz `eh-*!dceBVIi-?un%\{>ƹDntR mܾצ* ^`X^Frename-add-exe-bit-conflict/.git/objects/e6000075500000000000000000000000001046102023000170445ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000243500ustar 00000000000000xKOR0` rename-add-exe-bit-conflict/.git/objects/90000075500000000000000000000000001046102023000167625ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/90/e5a2b92b14265db31ba385bf59bf711d20ece5000064400000000000000000000002331046102023000243130ustar 00000000000000xeK 1D]*tP0"PƅyEskJ̠ecQQ.ITfx E&tU%v~p2QvUY($E*E|+->] hkp-bo;ڴ?9vWV BJrename-add-exe-bit-conflict/.git/objects/99000075500000000000000000000000001046102023000167735ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/99/36116b0f909d3a074cf63d29b2673bb8a6cd24000064400000000000000000000000561046102023000241200ustar 00000000000000x+)JMU0d040075UHdx6M9{wk+qIOD/rename-add-exe-bit-conflict/.git/objects/info000075500000000000000000000000001046102023000174655ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/7b000075500000000000000000000000001046102023000170425ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/7b/6e33c757f1d3653a393b08a15be1d1220af578000064400000000000000000000002001046102023000240730ustar 00000000000000xeK 1D]$i ^'j`b$Dqam^QTKDA\b)1]P#+~[mY^\R-'{5צ!\U[; p7rename-add-exe-bit-conflict/.git/objects/17000075500000000000000000000000001046102023000167615ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/17/d8aa46b6122ec55caeb8c2391a2d5fa82e8a9a000064400000000000000000000000671046102023000244660ustar 00000000000000x+)JMU0`040075UHdx6M9{wk+qIODBVI|[rename-add-exe-bit-conflict/.git/objects/29000075500000000000000000000000001046102023000167645ustar 00000000000000rename-add-exe-bit-conflict/.git/objects/29/6e56023cdc034d2735fee8c0d85a659d1b07f4000064400000000000000000000000631046102023000241760ustar 00000000000000x+)JMU0`040031QHdx6M9{wk+qIODdVI{rename-add-exe-bit-conflict/.git/objects/pack000075500000000000000000000000001046102023000174505ustar 00000000000000rename-add-exe-bit-conflict/.git/config000064400000000000000000000002111046102023000163420ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-add-exe-bit-conflict/a000075500000000000000000000000001046102023000144530ustar 00000000000000rename-within-rename-2000075500000000000000000000000001046102023000132645ustar 00000000000000rename-within-rename-2/.git000075500000000000000000000000001046102023000141255ustar 00000000000000rename-within-rename-2/.git/COMMIT_EDITMSG000064400000000000000000000000711046102023000162710ustar 00000000000000tracked both renames, applied all modifications by merge rename-within-rename-2/.git/index000064400000000000000000000007271046102023000152440ustar 00000000000000DIRCgU#eTgU#eT 6~  JX+pa-renamed/sub-renamed/y.fgU#OdgU#Od 6⛲CK)wZSa-renamed/sub-renamed/zgU! gU!  6`⛲CK)wZS a-renamed/wgU#dTgU#dT 6  JX+p a-renamed/x.fTREE_4 1 ݌Gw-l[~a-renamed4 1 Uz"fAґ-q^ ?{sub-renamed2 0 v=ynp/Wg Ewrrename-within-rename-2/.git/refs000075500000000000000000000000001046102023000150645ustar 00000000000000rename-within-rename-2/.git/refs/tags000075500000000000000000000000001046102023000160225ustar 00000000000000rename-within-rename-2/.git/refs/heads000075500000000000000000000000001046102023000161505ustar 00000000000000rename-within-rename-2/.git/refs/heads/B000064400000000000000000000000511046102023000163270ustar 000000000000007c93c7c953f7aac0ce6ecd73a2201efee8c62f58 rename-within-rename-2/.git/refs/heads/main000064400000000000000000000000511046102023000170720ustar 0000000000000081a81b561f72d779aefb47ab475c363fbb8bb6bc rename-within-rename-2/.git/refs/heads/A000064400000000000000000000000511046102023000163260ustar 00000000000000931aa51f3b2b0652306fab82bb2ab3d8d1c0bd3a rename-within-rename-2/.git/refs/heads/expected000064400000000000000000000000511046102023000177470ustar 00000000000000db9a0d2934f55a58c159723c6db683148a8e2e6a rename-within-rename-2/.git/hooks000075500000000000000000000000001046102023000152505ustar 00000000000000rename-within-rename-2/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000217470ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-within-rename-2/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000203060ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-within-rename-2/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000214670ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-within-rename-2/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000217060ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-within-rename-2/.git/hooks/post-update.sample000075500000000000000000000002751046102023000210060ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-within-rename-2/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000222520ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-within-rename-2/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000207360ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-within-rename-2/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000223620ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-within-rename-2/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000214740ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-within-rename-2/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000206130ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-within-rename-2/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000205640ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-within-rename-2/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000206060ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-within-rename-2/.git/description000064400000000000000000000001111046102023000164430ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-within-rename-2/.git/logs000075500000000000000000000000001046102023000150715ustar 00000000000000rename-within-rename-2/.git/logs/refs000075500000000000000000000000001046102023000160305ustar 00000000000000rename-within-rename-2/.git/logs/refs/heads000075500000000000000000000000001046102023000171145ustar 00000000000000rename-within-rename-2/.git/logs/refs/heads/B000064400000000000000000000005361046102023000173030ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-renamed rename-within-rename-2/.git/logs/refs/heads/main000064400000000000000000000002371046102023000200440ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original rename-within-rename-2/.git/logs/refs/heads/A000064400000000000000000000005561046102023000173040ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 931aa51f3b2b0652306fab82bb2ab3d8d1c0bd3a committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed, a/sub -> a/sub-renamed rename-within-rename-2/.git/logs/refs/heads/expected000064400000000000000000000005431046102023000207210ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc db9a0d2934f55a58c159723c6db683148a8e2e6a committer 946771200 +0000 commit: tracked both renames, applied all modifications by merge rename-within-rename-2/.git/logs/HEAD000064400000000000000000000023411046102023000155740ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original 81a81b561f72d779aefb47ab475c363fbb8bb6bc 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from main to A 81a81b561f72d779aefb47ab475c363fbb8bb6bc 931aa51f3b2b0652306fab82bb2ab3d8d1c0bd3a committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed, a/sub -> a/sub-renamed 931aa51f3b2b0652306fab82bb2ab3d8d1c0bd3a 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from A to B 81a81b561f72d779aefb47ab475c363fbb8bb6bc 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-renamed 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from B to expected 81a81b561f72d779aefb47ab475c363fbb8bb6bc db9a0d2934f55a58c159723c6db683148a8e2e6a committer 946771200 +0000 commit: tracked both renames, applied all modifications by merge rename-within-rename-2/.git/rename-within-rename-2-A-B-deviates-reversed.index000064400000000000000000000007271046102023000253720ustar 00000000000000DIRCgU#eTgU#eT 6~  JX+pa-renamed/sub-renamed/y.fgU#OdgU#Od 6⛲CK)wZSa-renamed/sub-renamed/zgU! gU!  6`⛲CK)wZS a-renamed/wgU#dTgU#dT 6  JX+p a-renamed/x.fTREE_4 1 ݌Gw-l[~a-renamed4 1 Uz"fAґ-q^ ?{sub-renamed2 0 v=ynp/Wg Ewrrename-within-rename-2/.git/info000075500000000000000000000000001046102023000150605ustar 00000000000000rename-within-rename-2/.git/info/exclude000064400000000000000000000003601046102023000165120ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-within-rename-2/.git/HEAD000064400000000000000000000000311046102023000146220ustar 00000000000000ref: refs/heads/expected rename-within-rename-2/.git/objects000075500000000000000000000000001046102023000155565ustar 00000000000000rename-within-rename-2/.git/objects/8e000075500000000000000000000000001046102023000160725ustar 00000000000000rename-within-rename-2/.git/objects/8e/5b5c26ab5f2a824c123846adceaf811f538231000064400000000000000000000001111046102023000232570ustar 00000000000000x+)JMU03`040031QKcX䥨m̢?? JW1Bnkϭon2440031Q(gx6M9{wk+qIODd^CB&/Eͷ mcyMל(]rename-within-rename-2/.git/objects/82000075500000000000000000000000001046102023000160075ustar 00000000000000rename-within-rename-2/.git/objects/82/dd8cac8e9da105477708c0a62d6c155b7ee0ac000064400000000000000000000000631046102023000234330ustar 00000000000000x+)JMU06c01DݢԼЪJS/M-ǽHd}57rename-within-rename-2/.git/objects/ce000075500000000000000000000000001046102023000161455ustar 00000000000000rename-within-rename-2/.git/objects/ce/c4bd5ac392ba3ceabfbef5f84878a3de6540f4000064400000000000000000000000531046102023000240200ustar 00000000000000x+)JMU0`01Ds:Ȫ" R+=o: rename-within-rename-2/.git/objects/e6000075500000000000000000000000001046102023000160705ustar 00000000000000rename-within-rename-2/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000233740ustar 00000000000000xKOR0` rename-within-rename-2/.git/objects/ea000075500000000000000000000000001046102023000161435ustar 00000000000000rename-within-rename-2/.git/objects/ea/e6f8e77224e1e596522fa8d918d71b7d4b7e77000064400000000000000000000001131046102023000233310ustar 00000000000000x+)JMU03a01DݢԼЪJS/M-ǽHd}5T \Z] /zfz|x[6Mrename-within-rename-2/.git/objects/ef000075500000000000000000000000001046102023000161505ustar 00000000000000rename-within-rename-2/.git/objects/ef/aed57421930e03aad2faa691178294aff08f3c000064400000000000000000000000631046102023000234310ustar 00000000000000x+)JMU06c01DݢԼg}?/=ئǻ)$inC rename-within-rename-2/.git/objects/db000075500000000000000000000000001046102023000161435ustar 00000000000000rename-within-rename-2/.git/objects/db/9a0d2934f55a58c159723c6db683148a8e2e6a000064400000000000000000000003001046102023000232220ustar 00000000000000xej0D{W=H!jݘZQThЁa#So|IH. 3"$Q\!9JCt+<# 2'b_j8~Q9v}Z^acLsNvȌr|Et5|h*=ǾJۺ ^ow(|Wrename-within-rename-2/.git/objects/ba000075500000000000000000000000001046102023000161405ustar 00000000000000rename-within-rename-2/.git/objects/ba/185e921f848f2b5db2cad1312950f1283b8e34000064400000000000000000000000531046102023000232060ustar 00000000000000x+)JMU0`01DUх%S$h&x?5 rename-within-rename-2/.git/objects/55000075500000000000000000000000001046102023000160075ustar 00000000000000rename-within-rename-2/.git/objects/55/7af822956641d2912d71955e0ba214a80e3f7b000064400000000000000000000001571046102023000230040ustar 00000000000000x+)JMU`01$ݢԼ?ޓ*b{ce󂏆f&& >5gnuQ7= Kc""St/-.i +Krename-within-rename-2/.git/objects/info000075500000000000000000000000001046102023000165115ustar 00000000000000rename-within-rename-2/.git/objects/2f000075500000000000000000000000001046102023000160655ustar 00000000000000rename-within-rename-2/.git/objects/2f/ce6da220e49ac105241d525014704d1b918e97000064400000000000000000000001571046102023000230410ustar 00000000000000x+)JMU`01$ݢԼF7[XNG4v(300dxJ閡a`aCEmCY"I1^5U4jE PuuM}x,D+|jiS5Ε7U۪*aٖen]W/CA}Urename-within-rename-2/.git/objects/pack000075500000000000000000000000001046102023000164745ustar 00000000000000rename-within-rename-2/.git/objects/ec000075500000000000000000000000001046102023000161455ustar 00000000000000rename-within-rename-2/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000232220ustar 00000000000000xKOR02d/LK222222}rename-within-rename-2/.git/objects/fc000075500000000000000000000000001046102023000161465ustar 00000000000000rename-within-rename-2/.git/objects/fc/0f90c085de1b1a769f843ddffc01796ee770f1000064400000000000000000000001111046102023000234450ustar 00000000000000x+)JMU03`040031QKc""St/-.i @}4{kݚʣnz< rename-within-rename-2/.git/objects/b4000075500000000000000000000000001046102023000160635ustar 00000000000000rename-within-rename-2/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000227600ustar 00000000000000xKOR04b022222/crename-within-rename-2/.git/objects/9c000075500000000000000000000000001046102023000160715ustar 00000000000000rename-within-rename-2/.git/objects/9c/48b30d5e977c4991e9ba3894817253b0adc876000064400000000000000000000001111046102023000231050ustar 00000000000000x+)JMU03`040031QKcpa j1{5y+Zl bx6M9{wk+qIODUrename-within-rename-2/.git/objects/9d000075500000000000000000000000001046102023000160725ustar 00000000000000rename-within-rename-2/.git/objects/9d/0bd758192a8a11004805e88c9948f110ed769f000064400000000000000000000000651046102023000230220ustar 00000000000000x+)JMU0`01$ݢԼ?ޓ*b{cejwrename-within-rename-2/.git/objects/5f000075500000000000000000000000001046102023000160705ustar 00000000000000rename-within-rename-2/.git/objects/5f/648142ecb5c4c8ad6fe1dbcf60ed42c42932b9000064400000000000000000000001111046102023000235110ustar 00000000000000x+)JMU03`040031QKcxÒƆ'EƼ_$O];y*]lٛ.^s\WuГl2rename-within-rename-2/.git/objects/93000075500000000000000000000000001046102023000160115ustar 00000000000000rename-within-rename-2/.git/objects/93/1aa51f3b2b0652306fab82bb2ab3d8d1c0bd3a000064400000000000000000000002751046102023000234510ustar 00000000000000xeۊ1D}W&tT c64UuTʵF 3p&;Z#Y^g"B&+xE^ΩG 9Z]2}.&AzxOOCexr`K kN4ضU^oETB{ahh< l@Wod/6Ybrename-within-rename-2/.git/objects/3b000075500000000000000000000000001046102023000160625ustar 00000000000000rename-within-rename-2/.git/objects/3b/76aa085b717495c060282da9b61b5d61df5a37000064400000000000000000000001471046102023000231340ustar 00000000000000x+)JMU4`01$9yxN|bJcQ' LL}4{kݚʣnz<*Yck.=IwWlG)Jrename-within-rename-2/.git/rename-within-rename-2-A-B-deviates.index000064400000000000000000000007271046102023000235550ustar 00000000000000DIRCgU#eTgU#eT 6~  JX+pa-renamed/sub-renamed/y.fgU#OdgU#Od 6⛲CK)wZSa-renamed/sub-renamed/zgU! gU!  6`⛲CK)wZS a-renamed/wgU#dTgU#dT 6  JX+p a-renamed/x.fTREE_4 1 ݌Gw-l[~a-renamed4 1 Uz"fAґ-q^ ?{sub-renamed2 0 v=ynp/Wg Ewrrename-within-rename-2/.git/config000064400000000000000000000002111046102023000153660ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-within-rename-2/a-renamed000075500000000000000000000000001046102023000151155ustar 00000000000000rename-within-rename-2/a-renamed/w000064400000000000000000000000001046102023000153530ustar 00000000000000rename-within-rename-2/a-renamed/x.f000064400000000000000000000000141046102023000156050ustar 000000000000001 2 3 4 5 6 rename-within-rename-2/a-renamed/sub-renamed000075500000000000000000000000001046102023000173175ustar 00000000000000rename-within-rename-2/a-renamed/sub-renamed/z000064400000000000000000000000001046102023000175600ustar 00000000000000rename-within-rename-2/a-renamed/sub-renamed/y.f000064400000000000000000000000141046102023000200100ustar 000000000000001 2 3 4 5 6 rename-within-rename-2/A-B-deviates-reversed.merge-info000064400000000000000000000010371046102023000212740ustar 00000000000000eae6f8e77224e1e596522fa8d918d71b7d4b7e77100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-renamed/sub-renamed/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a/sub-renamed/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f1a-renamed/x.fAuto-mergingAuto-merging a-renamed/x.f 1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa/sub-renamed/y.fa-renamed/sub-renamed/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a/sub-renamed/y.f in B and to a-renamed/sub-renamed/y.f in A. rename-within-rename-2/A-B-deviates.merge-info000064400000000000000000000010371046102023000174570ustar 00000000000000eae6f8e77224e1e596522fa8d918d71b7d4b7e77100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-renamed/sub-renamed/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/sub-renamed/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f1a-renamed/x.fAuto-mergingAuto-merging a-renamed/x.f 1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa-renamed/sub-renamed/y.fa/sub-renamed/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a-renamed/sub-renamed/y.f in A and to a/sub-renamed/y.f in B. submodule-both-modify000075500000000000000000000000001046102023000133275ustar 00000000000000submodule-both-modify/A-B.merge-info000064400000000000000000000000511046102023000157130ustar 000000000000002c78d61dfa38621f2c2765d9cf6a364c60681214submodule-both-modify/A-B-reversed.merge-info000064400000000000000000000000511046102023000175300ustar 000000000000002c78d61dfa38621f2c2765d9cf6a364c60681214submodule-both-modify/.git000075500000000000000000000000001046102023000141705ustar 00000000000000submodule-both-modify/.git/COMMIT_EDITMSG000064400000000000000000000000021046102023000163260ustar 00000000000000b submodule-both-modify/.git/submodule-both-modify-A-B-reversed.index000064400000000000000000000003701046102023000236700ustar 00000000000000DIRC5ʘ] d8subn<$\%Qڏ6, subdFnwZ̙<(@R0sub&QzldZ*v#Esubmodule-both-modify/.git/submodule-both-modify-A-B.index000064400000000000000000000003701046102023000220530ustar 00000000000000DIRC5ʘ] d8subdFnwZ̙<(@R subn<$\%Qڏ6,0sube;^/UO͕&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 submodule-both-modify/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000203510ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 submodule-both-modify/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000215320ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : submodule-both-modify/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000217510ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : submodule-both-modify/.git/hooks/post-update.sample000075500000000000000000000002751046102023000210510ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info submodule-both-modify/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000223150ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi submodule-both-modify/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000210010ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi submodule-both-modify/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000224250ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } submodule-both-modify/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000215370ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : submodule-both-modify/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000206560ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- submodule-both-modify/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000206270ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END submodule-both-modify/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000206510ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } submodule-both-modify/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000210770ustar 000000000000002c78d61dfa38621f2c2765d9cf6a364c60681214 submodule-both-modify/.git/description000064400000000000000000000001111046102023000165060ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. submodule-both-modify/.git/logs000075500000000000000000000000001046102023000151345ustar 00000000000000submodule-both-modify/.git/logs/refs000075500000000000000000000000001046102023000160735ustar 00000000000000submodule-both-modify/.git/logs/refs/heads000075500000000000000000000000001046102023000171575ustar 00000000000000submodule-both-modify/.git/logs/refs/heads/B000064400000000000000000000004561046102023000173470ustar 000000000000000000000000000000000000000000000000000000 64ce77011a5d6f37673c8e17b119a87838b36c51 committer 1112912053 -0700 branch: Created from main 64ce77011a5d6f37673c8e17b119a87838b36c51 b9381e5cf00d5804c66aba2d7dd267623f2d1683 committer 1112912113 -0700 commit: b submodule-both-modify/.git/logs/refs/heads/main000064400000000000000000000002341046102023000201040ustar 000000000000000000000000000000000000000000000000000000 64ce77011a5d6f37673c8e17b119a87838b36c51 committer 1112911993 -0700 commit (initial): root submodule-both-modify/.git/logs/refs/heads/A000064400000000000000000000004561046102023000173460ustar 000000000000000000000000000000000000000000000000000000 64ce77011a5d6f37673c8e17b119a87838b36c51 committer 1112911993 -0700 branch: Created from main 64ce77011a5d6f37673c8e17b119a87838b36c51 a2dad3097e5a657be1730738eebba201245627c0 committer 1112912053 -0700 commit: a submodule-both-modify/.git/logs/refs/heads/expected000064400000000000000000000002371046102023000207640ustar 000000000000000000000000000000000000000000000000000000 64ce77011a5d6f37673c8e17b119a87838b36c51 committer 1112911993 -0700 branch: Created from main submodule-both-modify/.git/logs/HEAD000064400000000000000000000014011046102023000156330ustar 000000000000000000000000000000000000000000000000000000 64ce77011a5d6f37673c8e17b119a87838b36c51 committer 1112911993 -0700 commit (initial): root 64ce77011a5d6f37673c8e17b119a87838b36c51 64ce77011a5d6f37673c8e17b119a87838b36c51 committer 1112911993 -0700 checkout: moving from main to A 64ce77011a5d6f37673c8e17b119a87838b36c51 a2dad3097e5a657be1730738eebba201245627c0 committer 1112912053 -0700 commit: a a2dad3097e5a657be1730738eebba201245627c0 64ce77011a5d6f37673c8e17b119a87838b36c51 committer 1112912053 -0700 checkout: moving from A to B 64ce77011a5d6f37673c8e17b119a87838b36c51 b9381e5cf00d5804c66aba2d7dd267623f2d1683 committer 1112912113 -0700 commit: b submodule-both-modify/.git/info000075500000000000000000000000001046102023000151235ustar 00000000000000submodule-both-modify/.git/info/exclude000064400000000000000000000003601046102023000165550ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ submodule-both-modify/.git/HEAD000064400000000000000000000000221046102023000146650ustar 00000000000000ref: refs/heads/B submodule-both-modify/.git/objects000075500000000000000000000000001046102023000156215ustar 00000000000000submodule-both-modify/.git/objects/8e000075500000000000000000000000001046102023000161355ustar 00000000000000submodule-both-modify/.git/objects/8e/c98a546ca8cd6f913a99760133eb70c1db840b000064400000000000000000000000561046102023000233540ustar 00000000000000x+)JMU06d043$ˣI<3櫆ÃA=submodule-both-modify/.git/objects/2c000075500000000000000000000000001046102023000161255ustar 00000000000000submodule-both-modify/.git/objects/2c/78d61dfa38621f2c2765d9cf6a364c60681214000064400000000000000000000000561046102023000231300ustar 00000000000000x+)JMU06d043$WyبL">3Esubmodule-both-modify/.git/objects/b9000075500000000000000000000000001046102023000161335ustar 00000000000000submodule-both-modify/.git/objects/b9/381e5cf00d5804c66aba2d7dd267623f2d1683000064400000000000000000000002241046102023000232560ustar 00000000000000xQ 0D)r%)*fR"x|~53^pZ/3!"y/i̓J!GMovHc8HTL)r q $#LzO<3U֣>`3sM7f1/ A(submodule-both-modify/.git/objects/64000075500000000000000000000000001046102023000160525ustar 00000000000000submodule-both-modify/.git/objects/64/ce77011a5d6f37673c8e17b119a87838b36c51000064400000000000000000000001711046102023000230560ustar 00000000000000xK 1]};AJ> -<.]UxUƸ)P̰jJus`nC)>Dvɛ^e~8DGf_3 ?['6SD 6submodule-both-modify/.git/objects/info000075500000000000000000000000001046102023000165545ustar 00000000000000submodule-both-modify/.git/objects/pack000075500000000000000000000000001046102023000165375ustar 00000000000000submodule-both-modify/.git/objects/a2000075500000000000000000000000001046102023000161235ustar 00000000000000submodule-both-modify/.git/objects/a2/dad3097e5a657be1730738eebba201245627c0000064400000000000000000000002241046102023000232360ustar 00000000000000xQ 1 D)z%n*i6`ݥT.({ 30z~@f411HΔCB8UݻO JځeC*Y8p I#:yӛ'{J]ovХ="ܖn5N sAsubmodule-both-modify/.git/objects/3d000075500000000000000000000000001046102023000161275ustar 00000000000000submodule-both-modify/.git/objects/3d/76c994175a24f152e644db0d0f26bb567e4a0f000064400000000000000000000000571046102023000232630ustar 00000000000000x+)JMU06d043$0x2/rgsubmodule-both-modify/.git/config000064400000000000000000000002111046102023000154310ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true submodule-both-modify/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000217250ustar 000000000000003d76c994175a24f152e644db0d0f26bb567e4a0f submodule-both-modify/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000210770ustar 000000000000008ec98a546ca8cd6f913a99760133eb70c1db840b submodule-both-modify/sub000075500000000000000000000000001046102023000141205ustar 00000000000000submodule-both-modify/sub/.git000075500000000000000000000000001046102023000147615ustar 00000000000000submodule-both-modify/sub/.git/COMMIT_EDITMSG000064400000000000000000000000061046102023000171230ustar 00000000000000sub-b submodule-both-modify/sub/.git/index000064400000000000000000000002111046102023000160640ustar 00000000000000DIRCgU9gU9 ;";x6KasƢxfileTREE1 0 .E?Mk*(B@V Y ;]submodule-both-modify/sub/.git/refs000075500000000000000000000000001046102023000157205ustar 00000000000000submodule-both-modify/sub/.git/refs/tags000075500000000000000000000000001046102023000166565ustar 00000000000000submodule-both-modify/sub/.git/refs/heads000075500000000000000000000000001046102023000170045ustar 00000000000000submodule-both-modify/sub/.git/refs/heads/main000064400000000000000000000000511046102023000177260ustar 00000000000000ea6eb701e03c2497915c25a851f3da8f8e362ca0 submodule-both-modify/sub/.git/hooks000075500000000000000000000000001046102023000161045ustar 00000000000000submodule-both-modify/sub/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000226030ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 submodule-both-modify/sub/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000211420ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 submodule-both-modify/sub/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000223230ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : submodule-both-modify/sub/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000225420ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : submodule-both-modify/sub/.git/hooks/post-update.sample000075500000000000000000000002751046102023000216420ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info submodule-both-modify/sub/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000231060ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi submodule-both-modify/sub/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000215720ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi submodule-both-modify/sub/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000232160ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } submodule-both-modify/sub/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000223300ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : submodule-both-modify/sub/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000214470ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- submodule-both-modify/sub/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000214200ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END submodule-both-modify/sub/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000214420ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } submodule-both-modify/sub/.git/description000064400000000000000000000001111046102023000172770ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. submodule-both-modify/sub/.git/logs000075500000000000000000000000001046102023000157255ustar 00000000000000submodule-both-modify/sub/.git/logs/refs000075500000000000000000000000001046102023000166645ustar 00000000000000submodule-both-modify/sub/.git/logs/refs/heads000075500000000000000000000000001046102023000177505ustar 00000000000000submodule-both-modify/sub/.git/logs/refs/heads/main000064400000000000000000000007061046102023000207010ustar 000000000000000000000000000000000000000000000000000000 e835c0c403c8e494c0ca98f3d25d0b8464c18d38 committer 1112911993 -0700 commit (initial): sub-root e835c0c403c8e494c0ca98f3d25d0b8464c18d38 64466ebdff775ad618d9cc993cf52840e0af528c committer 1112912053 -0700 commit: sub-a 64466ebdff775ad618d9cc993cf52840e0af528c ea6eb701e03c2497915c25a851f3da8f8e362ca0 committer 1112912113 -0700 commit: sub-b submodule-both-modify/sub/.git/logs/HEAD000064400000000000000000000007061046102023000164330ustar 000000000000000000000000000000000000000000000000000000 e835c0c403c8e494c0ca98f3d25d0b8464c18d38 committer 1112911993 -0700 commit (initial): sub-root e835c0c403c8e494c0ca98f3d25d0b8464c18d38 64466ebdff775ad618d9cc993cf52840e0af528c committer 1112912053 -0700 commit: sub-a 64466ebdff775ad618d9cc993cf52840e0af528c ea6eb701e03c2497915c25a851f3da8f8e362ca0 committer 1112912113 -0700 commit: sub-b submodule-both-modify/sub/.git/info000075500000000000000000000000001046102023000157145ustar 00000000000000submodule-both-modify/sub/.git/info/exclude000064400000000000000000000003601046102023000173460ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ submodule-both-modify/sub/.git/HEAD000064400000000000000000000000251046102023000154610ustar 00000000000000ref: refs/heads/main submodule-both-modify/sub/.git/objects000075500000000000000000000000001046102023000164125ustar 00000000000000submodule-both-modify/sub/.git/objects/22000075500000000000000000000000001046102023000166355ustar 00000000000000submodule-both-modify/sub/.git/objects/22/feea448b023a2d864ef94b013735af34d238ba000064400000000000000000000000611046102023000241130ustar 00000000000000x+)JMU06b040031QHIeْsmm'tg}Isubmodule-both-modify/sub/.git/objects/22/3b7836fb19fdf64ba2d3cd6173c6a283141f78000064400000000000000000000000211046102023000240460ustar 00000000000000xKOR0bp&>submodule-both-modify/sub/.git/objects/2e000075500000000000000000000000001046102023000167205ustar 00000000000000submodule-both-modify/sub/.git/objects/2e/457f998ff6a6163f89e091bc4d6b92c8ed2a28000064400000000000000000000000611046102023000241700ustar 00000000000000x+)JMU06b040031QHIeP0-g-j #.submodule-both-modify/sub/.git/objects/e8000075500000000000000000000000001046102023000167265ustar 00000000000000submodule-both-modify/sub/.git/objects/e8/35c0c403c8e494c0ca98f3d25d0b8464c18d38000064400000000000000000000001751046102023000240630ustar 00000000000000xA 0E]sJf& U&C$M㷠{|x|o}8 DIU -wy$v bdkRI_=%_) ZsY ?'6ZJ3;7submodule-both-modify/sub/.git/objects/f7000075500000000000000000000000001046102023000167265ustar 00000000000000submodule-both-modify/sub/.git/objects/f7/0f10e4db19068f79bc43844b49f3eece45c4e8000064400000000000000000000000211046102023000242270ustar 00000000000000xKOR0bp$=submodule-both-modify/sub/.git/objects/ea000075500000000000000000000000001046102023000167775ustar 00000000000000submodule-both-modify/sub/.git/objects/ea/6eb701e03c2497915c25a851f3da8f8e362ca0000064400000000000000000000002301046102023000241210ustar 00000000000000xA 0E]@%3M *dSV]z>/FD4|! %6DA2F \v:')h2aFL| GyzȞz0xcԶn4bu_Ӑ2DJsubmodule-both-modify/sub/.git/objects/a9000075500000000000000000000000001046102023000167235ustar 00000000000000submodule-both-modify/sub/.git/objects/a9/e3325a07117aa5381e044a8d96c26eb30d729d000064400000000000000000000000611046102023000237570ustar 00000000000000x+)JMU06b040031QHIe/$[oιyFsubmodule-both-modify/sub/.git/objects/64000075500000000000000000000000001046102023000166435ustar 00000000000000submodule-both-modify/sub/.git/objects/64/466ebdff775ad618d9cc993cf52840e0af528c000064400000000000000000000002271046102023000242450ustar 00000000000000xA 0E]@e&3i(UɈS]z~^jtwZIJ@@ ""*0K,inԙK[g r% ̑G E#k?/~0yԧUy.Ov`u;׵ٟM_:b^s}CRsubmodule-both-modify/sub/.git/objects/info000075500000000000000000000000001046102023000173455ustar 00000000000000submodule-both-modify/sub/.git/objects/pack000075500000000000000000000000001046102023000173305ustar 00000000000000submodule-both-modify/sub/.git/objects/4b000075500000000000000000000000001046102023000167175ustar 00000000000000submodule-both-modify/sub/.git/objects/4b/48deed3a433909bfd6b6ab3d4b91348b6af464000064400000000000000000000000301046102023000242670ustar 00000000000000xKORd/LK. Xsubmodule-both-modify/sub/.git/config000064400000000000000000000002111046102023000162220ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true submodule-both-modify/sub/file000064400000000000000000000000021046102023000150310ustar 00000000000000B rename-delete000075500000000000000000000000001046102023000116205ustar 00000000000000rename-delete/olddir000075500000000000000000000000001046102023000130755ustar 00000000000000rename-delete/olddir/b000064400000000000000000000000021046102023000133100ustar 00000000000000b rename-delete/olddir/c000064400000000000000000000000021046102023000133110ustar 00000000000000c rename-delete/olddir/bar000064400000000000000000000000161046102023000136400ustar 000000000000001 2 3 4 5 six rename-delete/olddir/a000064400000000000000000000000021046102023000133070ustar 00000000000000a rename-delete/A-B.merge-info000064400000000000000000000010771046102023000142150ustar 00000000000000ce7fa1e24ae1ad81cc16626ec69e6193a8cc9338100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 newdir/bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 newdir/bar100644 d0549c3d3c96a464289f3b820b7d96aedc58924b 3 newdir/bar2newdir/barolddir/barCONFLICT (directory rename suggested)CONFLICT (file location): foo renamed to olddir/bar in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to newdir/bar. 1newdir/barAuto-mergingAuto-merging newdir/bar 1newdir/barCONFLICT (contents)CONFLICT (content): Merge conflict in newdir/bar rename-delete/A-B-reversed.merge-info000064400000000000000000000010771046102023000160320ustar 000000000000008d0a75c05991fd6a44774524fed16c3eea40007b100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 newdir/bar100644 d0549c3d3c96a464289f3b820b7d96aedc58924b 2 newdir/bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 newdir/bar2newdir/barolddir/barCONFLICT (directory rename suggested)CONFLICT (file location): foo renamed to olddir/bar in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to newdir/bar. 1newdir/barAuto-mergingAuto-merging newdir/bar 1newdir/barCONFLICT (contents)CONFLICT (content): Merge conflict in newdir/bar rename-delete/A-similar-reversed.merge-info000064400000000000000000000000511046102023000173000ustar 00000000000000bd7aa77b5c729e524e31e74980d2cc0c1ea2ba2erename-delete/.git000075500000000000000000000000001046102023000124615ustar 00000000000000rename-delete/.git/COMMIT_EDITMSG000064400000000000000000000000461046102023000146270ustar 00000000000000Modify foo & rename foo -> olddir/bar rename-delete/.git/index000064400000000000000000000006101046102023000135670ustar 00000000000000DIRCgU! gU!  1x"a;*`%/Nolddir/agU! *gU! * 1ax"-4ϽUV$rolddir/bgU!)gU!) 1T=&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-delete/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000166420ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-delete/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000200230ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-delete/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000202420ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-delete/.git/hooks/post-update.sample000075500000000000000000000002751046102023000173420ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-delete/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000206060ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-delete/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000172720ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-delete/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000207160ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-delete/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000200300ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-delete/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000171470ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-delete/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000171200ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-delete/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000171420ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-delete/.git/description000064400000000000000000000001111046102023000147770ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-delete/.git/logs000075500000000000000000000000001046102023000134255ustar 00000000000000rename-delete/.git/logs/refs000075500000000000000000000000001046102023000143645ustar 00000000000000rename-delete/.git/logs/refs/heads000075500000000000000000000000001046102023000154505ustar 00000000000000rename-delete/.git/logs/refs/heads/B000064400000000000000000000005201046102023000156300ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 branch: Created from main 2dbefd673e079505f55702aa7d5bf923e173e756 f0d6c0a964bc1c3eae7551499cceb4023e8fca00 committer 946771200 +0000 commit: Modify foo & rename foo -> olddir/bar rename-delete/.git/logs/refs/heads/main000064400000000000000000000002371046102023000164000ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 commit (initial): original rename-delete/.git/logs/refs/heads/A000064400000000000000000000005161046102023000156340ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 branch: Created from main 2dbefd673e079505f55702aa7d5bf923e173e756 5645da1e133ee10e10178b3e979c781a8bb65e05 committer 946771200 +0000 commit: Modify foo, rename olddir to newdir rename-delete/.git/logs/HEAD000064400000000000000000000015061046102023000141320ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 commit (initial): original 2dbefd673e079505f55702aa7d5bf923e173e756 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 checkout: moving from main to A 2dbefd673e079505f55702aa7d5bf923e173e756 5645da1e133ee10e10178b3e979c781a8bb65e05 committer 946771200 +0000 commit: Modify foo, rename olddir to newdir 5645da1e133ee10e10178b3e979c781a8bb65e05 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 checkout: moving from A to B 2dbefd673e079505f55702aa7d5bf923e173e756 f0d6c0a964bc1c3eae7551499cceb4023e8fca00 committer 946771200 +0000 commit: Modify foo & rename foo -> olddir/bar rename-delete/.git/info000075500000000000000000000000001046102023000134145ustar 00000000000000rename-delete/.git/info/exclude000064400000000000000000000003601046102023000150460ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-delete/.git/HEAD000064400000000000000000000000221046102023000131560ustar 00000000000000ref: refs/heads/B rename-delete/.git/objects000075500000000000000000000000001046102023000141125ustar 00000000000000rename-delete/.git/objects/78000075500000000000000000000000001046102023000143505ustar 00000000000000rename-delete/.git/objects/78/981922613b2afb6025042ff6bd878ac1994e85000064400000000000000000000000211046102023000213470ustar 00000000000000xKOR0bHd]rename-delete/.git/objects/49000075500000000000000000000000001046102023000143465ustar 00000000000000rename-delete/.git/objects/49/4c39a7e6b41374e09659f632dc5fdee80b2470000064400000000000000000000001201046102023000215050ustar 00000000000000x+)JMU03a040031QHgX䥨m̢?? 21"[RW~ n_rename-delete/.git/objects/8d000075500000000000000000000000001046102023000144255ustar 00000000000000rename-delete/.git/objects/8d/0a75c05991fd6a44774524fed16c3eea40007b000064400000000000000000000000601046102023000215440ustar 00000000000000x+)JMU06f01"/3.޽ż풗5S"-rename-delete/.git/objects/2d000075500000000000000000000000001046102023000144175ustar 00000000000000rename-delete/.git/objects/2d/befd673e079505f55702aa7d5bf923e173e756000064400000000000000000000002011046102023000215610ustar 00000000000000xe 0D=+.6f(⯤V7ԃsycb95,Z,v0 z;q]DΚUx[E^!?69ŒZGأؿTi.wW6+7#rename-delete/.git/objects/ce000075500000000000000000000000001046102023000145015ustar 00000000000000rename-delete/.git/objects/ce/7fa1e24ae1ad81cc16626ec69e6193a8cc9338000064400000000000000000000000611046102023000217760ustar 00000000000000x+)JMU06f01"ozZYe].LK <rename-delete/.git/objects/f0000075500000000000000000000000001046102023000144175ustar 00000000000000rename-delete/.git/objects/f0/d6c0a964bc1c3eae7551499cceb4023e8fca00000064400000000000000000000002661046102023000220410ustar 00000000000000xeMn1 )bf2q~$z‰u$Ҡho޳OV벂m"0GABI$O3g=fJ98C:RrϢ}DkCSfi<:Eu_Lxu.ؠ5loajGU:rename-delete/.git/objects/b4000075500000000000000000000000001046102023000144175ustar 00000000000000rename-delete/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000213140ustar 00000000000000xKOR04b022222/crename-delete/.git/objects/d0000075500000000000000000000000001046102023000144155ustar 00000000000000rename-delete/.git/objects/d0/549c3d3c96a464289f3b820b7d96aedc58924b000064400000000000000000000000361046102023000215740ustar 00000000000000xKOR04a02222*ά9rename-delete/.git/objects/d9000075500000000000000000000000001046102023000144265ustar 00000000000000rename-delete/.git/objects/d9/de152488b3c11e7591912d2fec571386a0e85c000064400000000000000000000000751046102023000215070ustar 00000000000000xKOR0d02222岁'"" .[2㲃G|. gyrename-delete/.git/objects/02000075500000000000000000000000001046102023000143335ustar 00000000000000rename-delete/.git/objects/02/91e968d1dbbbb4377d06d24a24d62c4ed5d764000064400000000000000000000001721046102023000216310ustar 00000000000000x+)JMU04`040031QHd!h;AE3ZI 3zyr~аf"db{*ʕN&\mt2ç9en` [Ww` %/hrename-delete/.git/objects/56000075500000000000000000000000001046102023000143445ustar 00000000000000rename-delete/.git/objects/56/45da1e133ee10e10178b3e979c781a8bb65e05000064400000000000000000000002611046102023000214700ustar 00000000000000xeM 0F]W$&x SBD. )Pfp%r֨e@آboM cgIFK&E.k'҃z1}Oօ>5 l#ڲu\Gӆ.Q+.9161%@pG#[Nrename-delete/.git/objects/04000075500000000000000000000000001046102023000143355ustar 00000000000000rename-delete/.git/objects/04/a59185a0c5f4047e4fd3fa87b0c84e671b00ee000064400000000000000000000001371046102023000216260ustar 00000000000000x+)JMU0g040031QHd!h;AE3ZI 3zyr~аf"d2ç9en` [Ww`"rename-delete/.git/objects/68000075500000000000000000000000001046102023000143475ustar 00000000000000rename-delete/.git/objects/68/bdb834345c8a30ad42dedc03141815f3b253b3000064400000000000000000000000751046102023000215300ustar 00000000000000xKOR0d02222岁G|.3.[*άಃ'"".Cyrename-delete/.git/objects/61000075500000000000000000000000001046102023000143405ustar 00000000000000rename-delete/.git/objects/61/780798228d17af2d34fce4cfbdf35556832472000064400000000000000000000000211046102023000214260ustar 00000000000000xKOR0bHf^rename-delete/.git/config000064400000000000000000000002111046102023000137220ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-delete/A-similar.merge-info000064400000000000000000000000511046102023000154630ustar 00000000000000bd7aa77b5c729e524e31e74980d2cc0c1ea2ba2erename-delete/B-similar.merge-info000064400000000000000000000000511046102023000154640ustar 0000000000000039e5a52842bcaec13d4965da7c00001bc862ad86rename-delete/B-similar-reversed.merge-info000064400000000000000000000000511046102023000173010ustar 0000000000000039e5a52842bcaec13d4965da7c00001bc862ad86multiple-merge-bases000075500000000000000000000000001046102023000131345ustar 00000000000000multiple-merge-bases/A-B.merge-info000064400000000000000000000004501046102023000155230ustar 000000000000005575162492c6d6dc60c65c2c2d1e450650676412100644 09c277aa66897c58157f57a374eacc63a407dcab 1 content100644 0a6a0ba83635bc00e7c79a4b5b6e50381385c1af 2 content1contentCONFLICT (modify/delete)CONFLICT (modify/delete): content deleted in B and modified in A. Version A of content left in tree. multiple-merge-bases/A-B-reversed.merge-info000064400000000000000000000004501046102023000173400ustar 000000000000005575162492c6d6dc60c65c2c2d1e450650676412100644 09c277aa66897c58157f57a374eacc63a407dcab 1 content100644 0a6a0ba83635bc00e7c79a4b5b6e50381385c1af 3 content1contentCONFLICT (modify/delete)CONFLICT (modify/delete): content deleted in B and modified in A. Version A of content left in tree. multiple-merge-bases/.git000075500000000000000000000000001046102023000137755ustar 00000000000000multiple-merge-bases/.git/COMMIT_EDITMSG000064400000000000000000000000141046102023000161360ustar 00000000000000rename in B multiple-merge-bases/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000215320ustar 0000000000000087e79fece99fb89943630eee665dccc25d81c9d4 multiple-merge-bases/.git/index000064400000000000000000000001011046102023000150760ustar 00000000000000DIRCTREE0 0 K]Bn`K֒Ir?x}2Z76Fmultiple-merge-bases/.git/refs000075500000000000000000000000001046102023000147345ustar 00000000000000multiple-merge-bases/.git/refs/tags000075500000000000000000000000001046102023000156725ustar 00000000000000multiple-merge-bases/.git/refs/tags/A1000064400000000000000000000000511046102023000161310ustar 00000000000000e16ed0f09ae7792220eda6792b86cbc50462aa28 multiple-merge-bases/.git/refs/tags/B1000064400000000000000000000000511046102023000161320ustar 00000000000000c44939ee3daa38a655dd56dbb44bf35977cbc7dd multiple-merge-bases/.git/refs/heads000075500000000000000000000000001046102023000160205ustar 00000000000000multiple-merge-bases/.git/refs/heads/B000064400000000000000000000000511046102023000161770ustar 000000000000004fe4f8aa53e3f4ab85c92d5062316225ded26b1c multiple-merge-bases/.git/refs/heads/main000064400000000000000000000000511046102023000167420ustar 000000000000006ded0e1345b78c5d51323f03126aba7940424e6e multiple-merge-bases/.git/refs/heads/A000064400000000000000000000000511046102023000161760ustar 00000000000000823250ea581811282c9f6dbe6fb8d70c68c97367 multiple-merge-bases/.git/hooks000075500000000000000000000000001046102023000151205ustar 00000000000000multiple-merge-bases/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000216170ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 multiple-merge-bases/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000201560ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 multiple-merge-bases/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000213370ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : multiple-merge-bases/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000215560ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : multiple-merge-bases/.git/hooks/post-update.sample000075500000000000000000000002751046102023000206560ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info multiple-merge-bases/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000221220ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi multiple-merge-bases/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000206060ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi multiple-merge-bases/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000222320ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } multiple-merge-bases/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000213440ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : multiple-merge-bases/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000204630ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- multiple-merge-bases/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000204340ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END multiple-merge-bases/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000204560ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } multiple-merge-bases/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000207040ustar 000000000000004b825dc642cb6eb9a060e54bf8d69288fbee4904 multiple-merge-bases/.git/description000064400000000000000000000001111046102023000163130ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. multiple-merge-bases/.git/logs000075500000000000000000000000001046102023000147415ustar 00000000000000multiple-merge-bases/.git/logs/refs000075500000000000000000000000001046102023000157005ustar 00000000000000multiple-merge-bases/.git/logs/refs/heads000075500000000000000000000000001046102023000167645ustar 00000000000000multiple-merge-bases/.git/logs/refs/heads/B000064400000000000000000000011761046102023000171540ustar 000000000000000000000000000000000000000000000000000000 6ded0e1345b78c5d51323f03126aba7940424e6e committer 946771200 +0000 branch: Created from main 6ded0e1345b78c5d51323f03126aba7940424e6e c44939ee3daa38a655dd56dbb44bf35977cbc7dd committer 946771200 +0000 commit: change in B c44939ee3daa38a655dd56dbb44bf35977cbc7dd cac3b40271a66efa77a910b1e7b10deefddedb20 committer 946771200 +0000 merge A1: Merge made by the 'ort' strategy. cac3b40271a66efa77a910b1e7b10deefddedb20 4fe4f8aa53e3f4ab85c92d5062316225ded26b1c committer 946771200 +0000 commit: rename in B multiple-merge-bases/.git/logs/refs/heads/main000064400000000000000000000002361046102023000177130ustar 000000000000000000000000000000000000000000000000000000 6ded0e1345b78c5d51323f03126aba7940424e6e committer 946771200 +0000 commit (initial): initial multiple-merge-bases/.git/logs/refs/heads/A000064400000000000000000000012031046102023000171420ustar 000000000000000000000000000000000000000000000000000000 6ded0e1345b78c5d51323f03126aba7940424e6e committer 946771200 +0000 branch: Created from main 6ded0e1345b78c5d51323f03126aba7940424e6e e16ed0f09ae7792220eda6792b86cbc50462aa28 committer 946771200 +0000 commit: change in A e16ed0f09ae7792220eda6792b86cbc50462aa28 58c82f7acd55e6d7952851902ae404607fe1aa61 committer 946771200 +0000 merge B1: Merge made by the 'ort' strategy. 58c82f7acd55e6d7952851902ae404607fe1aa61 823250ea581811282c9f6dbe6fb8d70c68c97367 committer 946771200 +0000 commit: conflicting in A multiple-merge-bases/.git/logs/HEAD000064400000000000000000000040541046102023000154470ustar 000000000000000000000000000000000000000000000000000000 6ded0e1345b78c5d51323f03126aba7940424e6e committer 946771200 +0000 commit (initial): initial 6ded0e1345b78c5d51323f03126aba7940424e6e 6ded0e1345b78c5d51323f03126aba7940424e6e committer 946771200 +0000 checkout: moving from main to A 6ded0e1345b78c5d51323f03126aba7940424e6e e16ed0f09ae7792220eda6792b86cbc50462aa28 committer 946771200 +0000 commit: change in A e16ed0f09ae7792220eda6792b86cbc50462aa28 6ded0e1345b78c5d51323f03126aba7940424e6e committer 946771200 +0000 checkout: moving from A to B 6ded0e1345b78c5d51323f03126aba7940424e6e c44939ee3daa38a655dd56dbb44bf35977cbc7dd committer 946771200 +0000 commit: change in B c44939ee3daa38a655dd56dbb44bf35977cbc7dd e16ed0f09ae7792220eda6792b86cbc50462aa28 committer 946771200 +0000 checkout: moving from B to A e16ed0f09ae7792220eda6792b86cbc50462aa28 58c82f7acd55e6d7952851902ae404607fe1aa61 committer 946771200 +0000 merge B1: Merge made by the 'ort' strategy. 58c82f7acd55e6d7952851902ae404607fe1aa61 c44939ee3daa38a655dd56dbb44bf35977cbc7dd committer 946771200 +0000 checkout: moving from A to B c44939ee3daa38a655dd56dbb44bf35977cbc7dd cac3b40271a66efa77a910b1e7b10deefddedb20 committer 946771200 +0000 merge A1: Merge made by the 'ort' strategy. cac3b40271a66efa77a910b1e7b10deefddedb20 58c82f7acd55e6d7952851902ae404607fe1aa61 committer 946771200 +0000 checkout: moving from B to A 58c82f7acd55e6d7952851902ae404607fe1aa61 823250ea581811282c9f6dbe6fb8d70c68c97367 committer 946771200 +0000 commit: conflicting in A 823250ea581811282c9f6dbe6fb8d70c68c97367 cac3b40271a66efa77a910b1e7b10deefddedb20 committer 946771200 +0000 checkout: moving from A to B cac3b40271a66efa77a910b1e7b10deefddedb20 4fe4f8aa53e3f4ab85c92d5062316225ded26b1c committer 946771200 +0000 commit: rename in B multiple-merge-bases/.git/info000075500000000000000000000000001046102023000147305ustar 00000000000000multiple-merge-bases/.git/info/exclude000064400000000000000000000003601046102023000163620ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ multiple-merge-bases/.git/HEAD000064400000000000000000000000221046102023000144720ustar 00000000000000ref: refs/heads/B multiple-merge-bases/.git/objects000075500000000000000000000000001046102023000154265ustar 00000000000000multiple-merge-bases/.git/objects/82000075500000000000000000000000001046102023000156575ustar 00000000000000multiple-merge-bases/.git/objects/82/3250ea581811282c9f6dbe6fb8d70c68c97367000064400000000000000000000002411046102023000227510ustar 00000000000000xe 1 =S.HEQJՅT-(a`Fy+ '" gFUG=;ݖ.(H'DG@6Lc)ҳ>?yWIO9` MSj_zoqg (u\0.pVF'multiple-merge-bases/.git/objects/85000075500000000000000000000000001046102023000156625ustar 00000000000000multiple-merge-bases/.git/objects/85/b5978da272b81daec902412a35645d2b6dfb7f000064400000000000000000000000641046102023000231530ustar 00000000000000x+)JMU06e040031QH+I+aX䥨m̢?? Amultiple-merge-bases/.git/objects/4f000075500000000000000000000000001046102023000157375ustar 00000000000000multiple-merge-bases/.git/objects/4f/e4f8aa53e3f4ab85c92d5062316225ded26b1c000064400000000000000000000002371046102023000232220ustar 00000000000000xe 0=).&"&[,>| |0i-en`t8*rr$v‘С ]4!L,b#ZQAtfkrN&FYcr=}WyQrJk@=[ ?wsfwUGE`^Fmultiple-merge-bases/.git/objects/e8000075500000000000000000000000001046102023000157425ustar 00000000000000multiple-merge-bases/.git/objects/e8/371f00609f33a59378dd2f6bb4385a7df8bd63000064400000000000000000000000341046102023000231040ustar 00000000000000xKOR04b022222/9multiple-merge-bases/.git/objects/e1000075500000000000000000000000001046102023000157335ustar 00000000000000multiple-merge-bases/.git/objects/e1/6ed0f09ae7792220eda6792b86cbc50462aa28000064400000000000000000000002411046102023000231410ustar 00000000000000xe 1D=+.HwYAS8B;ih VE%%ٸ9X D٠^K߳/IcQk27pE ɇl%M)3#k'*>۰T*89e [6nߚTnwW!wqzEDmultiple-merge-bases/.git/objects/c4000075500000000000000000000000001046102023000157345ustar 00000000000000multiple-merge-bases/.git/objects/c4/4939ee3daa38a655dd56dbb44bf35977cbc7dd000064400000000000000000000002401046102023000234620ustar 00000000000000xe 0=).fd("6]m"zp.3udCɪ= 2p„,q}%ŀLfK0j{nmac)H/:r2,k/y{) u-"Բ~+ᗺ=̖v֤Q´ռ}FDmultiple-merge-bases/.git/objects/0a000075500000000000000000000000001046102023000157265ustar 00000000000000multiple-merge-bases/.git/objects/0a/6a0ba83635bc00e7c79a4b5b6e50381385c1af000064400000000000000000000000361046102023000231220ustar 00000000000000xKOR04a022222r7multiple-merge-bases/.git/objects/55000075500000000000000000000000001046102023000156575ustar 00000000000000multiple-merge-bases/.git/objects/55/75162492c6d6dc60c65c2c2d1e450650676412000064400000000000000000000000641046102023000225040ustar 00000000000000x+)JMU06e040031QH+I+a^afYy­multiple-merge-bases/.git/objects/6d000075500000000000000000000000001046102023000157375ustar 00000000000000multiple-merge-bases/.git/objects/6d/ed0e1345b78c5d51323f03126aba7940424e6e000064400000000000000000000001771046102023000227770ustar 00000000000000xe !D{+|BozUX_] 1y9aR 3Ko gL1ѭֺb/OՋ <15_[:awEQho7 multiple-merge-bases/.git/objects/info000075500000000000000000000000001046102023000163615ustar 00000000000000multiple-merge-bases/.git/objects/09000075500000000000000000000000001046102023000156565ustar 00000000000000multiple-merge-bases/.git/objects/09/c277aa66897c58157f57a374eacc63a407dcab000064400000000000000000000000361046102023000231600ustar 00000000000000xKOR04a02222226multiple-merge-bases/.git/objects/8a000075500000000000000000000000001046102023000157365ustar 00000000000000multiple-merge-bases/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000230740ustar 00000000000000xKOR04`02222(-Rmultiple-merge-bases/.git/objects/87000075500000000000000000000000001046102023000156645ustar 00000000000000multiple-merge-bases/.git/objects/87/e79fece99fb89943630eee665dccc25d81c9d4000064400000000000000000000000641046102023000233660ustar 00000000000000x+)JMU06e040031QH+I+a|qɫ3K0multiple-merge-bases/.git/objects/pack000075500000000000000000000000001046102023000163445ustar 00000000000000multiple-merge-bases/.git/objects/4b000075500000000000000000000000001046102023000157335ustar 00000000000000multiple-merge-bases/.git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904000064400000000000000000000000171046102023000232440ustar 00000000000000x+)JMU0` ,multiple-merge-bases/.git/objects/ca000075500000000000000000000000001046102023000160115ustar 00000000000000multiple-merge-bases/.git/objects/ca/c3b40271a66efa77a910b1e7b10deefddedb20000064400000000000000000000003061046102023000235540ustar 00000000000000xeJ1=)A2N"݇{gg ||z.QTvF7BFZ31z3CZ YXJˀG6*`Ϊ֔3Ho ճZp6ODBq1?v'nmbI{Sn˰t-n[jd0}-W+multiple-merge-bases/.git/objects/eb000075500000000000000000000000001046102023000160145ustar 00000000000000multiple-merge-bases/.git/objects/eb/0a070aa7b7a7207a9d7c5590702960e6e270a2000064400000000000000000000000641046102023000227670ustar 00000000000000x+)JMU06e040031QH+I+a""St/-.i (+(multiple-merge-bases/.git/objects/b4000075500000000000000000000000001046102023000157335ustar 00000000000000multiple-merge-bases/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000226300ustar 00000000000000xKOR04b022222/cmultiple-merge-bases/.git/objects/0e000075500000000000000000000000001046102023000157325ustar 00000000000000multiple-merge-bases/.git/objects/0e/bb1214c36aa4851811c305c72eff47db20f7d3000064400000000000000000000000641046102023000231200ustar 00000000000000x+)JMU06e040031QH+I+axa.ϐ0x䊻[,jM*multiple-merge-bases/.git/objects/58000075500000000000000000000000001046102023000156625ustar 00000000000000multiple-merge-bases/.git/objects/58/c82f7acd55e6d7952851902ae404607fe1aa61000064400000000000000000000003061046102023000230150ustar 00000000000000xeJD1 ]) IDi;xoAvF7BFZ31z3CZ YXJ[ԯň8M'ՂP~[J,H,9fZSkL4-Ru1?u'nmbI{3nax.n{~2rreW+multiple-merge-bases/.git/config000064400000000000000000000002111046102023000152360ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true multiple-merge-bases/.git/ORIG_HEAD000064400000000000000000000000511046102023000153140ustar 00000000000000c44939ee3daa38a655dd56dbb44bf35977cbc7dd multiple-merge-bases/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000215320ustar 0000000000000087e79fece99fb89943630eee665dccc25d81c9d4 multiple-merge-bases/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000207040ustar 000000000000005575162492c6d6dc60c65c2c2d1e450650676412 multiple-merge-bases/A-B-diff3.merge-info000064400000000000000000000004501046102023000165140ustar 000000000000005575162492c6d6dc60c65c2c2d1e450650676412100644 09c277aa66897c58157f57a374eacc63a407dcab 1 content100644 0a6a0ba83635bc00e7c79a4b5b6e50381385c1af 2 content1contentCONFLICT (modify/delete)CONFLICT (modify/delete): content deleted in B and modified in A. Version A of content left in tree. multiple-merge-bases/renamed000064400000000000000000000000161046102023000145460ustar 000000000000000 2 3 4 5 six multiple-merge-bases/A-B-diff3-reversed.merge-info000064400000000000000000000004501046102023000203310ustar 000000000000005575162492c6d6dc60c65c2c2d1e450650676412100644 09c277aa66897c58157f57a374eacc63a407dcab 1 content100644 0a6a0ba83635bc00e7c79a4b5b6e50381385c1af 3 content1contentCONFLICT (modify/delete)CONFLICT (modify/delete): content deleted in B and modified in A. Version A of content left in tree. remove-executable-mode000075500000000000000000000000001046102023000134475ustar 00000000000000remove-executable-mode/w000075500000000000000000000000121046102023000137130ustar 000000000000001 2 3 4 5 remove-executable-mode/A-B.merge-info000064400000000000000000000000511046102023000160330ustar 00000000000000530cc8504f3efbdc910faf47ee3e8818293d437cremove-executable-mode/A-B-reversed.merge-info000064400000000000000000000000511046102023000176500ustar 00000000000000530cc8504f3efbdc910faf47ee3e8818293d437cremove-executable-mode/.git000075500000000000000000000000001046102023000143105ustar 00000000000000remove-executable-mode/.git/COMMIT_EDITMSG000064400000000000000000000000261046102023000164540ustar 00000000000000unrelated change to w remove-executable-mode/.git/index000064400000000000000000000002011046102023000154120ustar 00000000000000DIRCgU gU  9` J!+0͆RwTREE1 0 81FCG m`߯ gD[@"remove-executable-mode/.git/refs000075500000000000000000000000001046102023000152475ustar 00000000000000remove-executable-mode/.git/refs/tags000075500000000000000000000000001046102023000162055ustar 00000000000000remove-executable-mode/.git/refs/heads000075500000000000000000000000001046102023000163335ustar 00000000000000remove-executable-mode/.git/refs/heads/B000064400000000000000000000000511046102023000165120ustar 0000000000000073305a5b4f5430ac29d974c1aeffdd3f335031fe remove-executable-mode/.git/refs/heads/main000064400000000000000000000000511046102023000172550ustar 00000000000000df45110a0f87e9c5e966fdfaa4ffea46273e362d remove-executable-mode/.git/refs/heads/A000064400000000000000000000000511046102023000165110ustar 0000000000000098e72477db834a1839e7c838bed3d3f90219112c remove-executable-mode/.git/hooks000075500000000000000000000000001046102023000154335ustar 00000000000000remove-executable-mode/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000221320ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 remove-executable-mode/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000204710ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 remove-executable-mode/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000216520ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : remove-executable-mode/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000220710ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : remove-executable-mode/.git/hooks/post-update.sample000075500000000000000000000002751046102023000211710ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info remove-executable-mode/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000224350ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi remove-executable-mode/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000211210ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi remove-executable-mode/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000225450ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } remove-executable-mode/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000216570ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : remove-executable-mode/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000207760ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- remove-executable-mode/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000207470ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END remove-executable-mode/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000207710ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } remove-executable-mode/.git/description000064400000000000000000000001111046102023000166260ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. remove-executable-mode/.git/logs000075500000000000000000000000001046102023000152545ustar 00000000000000remove-executable-mode/.git/logs/refs000075500000000000000000000000001046102023000162135ustar 00000000000000remove-executable-mode/.git/logs/refs/heads000075500000000000000000000000001046102023000172775ustar 00000000000000remove-executable-mode/.git/logs/refs/heads/B000064400000000000000000000005001046102023000174550ustar 000000000000000000000000000000000000000000000000000000 df45110a0f87e9c5e966fdfaa4ffea46273e362d committer 946771200 +0000 branch: Created from main df45110a0f87e9c5e966fdfaa4ffea46273e362d 73305a5b4f5430ac29d974c1aeffdd3f335031fe committer 946771200 +0000 commit: unrelated change to w remove-executable-mode/.git/logs/refs/heads/main000064400000000000000000000002371046102023000202270ustar 000000000000000000000000000000000000000000000000000000 df45110a0f87e9c5e966fdfaa4ffea46273e362d committer 946771200 +0000 commit (initial): original remove-executable-mode/.git/logs/refs/heads/A000064400000000000000000000005071046102023000174630ustar 000000000000000000000000000000000000000000000000000000 df45110a0f87e9c5e966fdfaa4ffea46273e362d committer 946771200 +0000 branch: Created from main df45110a0f87e9c5e966fdfaa4ffea46273e362d 98e72477db834a1839e7c838bed3d3f90219112c committer 946771200 +0000 commit: remove executable bit from w remove-executable-mode/.git/logs/HEAD000064400000000000000000000014571046102023000157660ustar 000000000000000000000000000000000000000000000000000000 df45110a0f87e9c5e966fdfaa4ffea46273e362d committer 946771200 +0000 commit (initial): original df45110a0f87e9c5e966fdfaa4ffea46273e362d df45110a0f87e9c5e966fdfaa4ffea46273e362d committer 946771200 +0000 checkout: moving from main to A df45110a0f87e9c5e966fdfaa4ffea46273e362d 98e72477db834a1839e7c838bed3d3f90219112c committer 946771200 +0000 commit: remove executable bit from w 98e72477db834a1839e7c838bed3d3f90219112c df45110a0f87e9c5e966fdfaa4ffea46273e362d committer 946771200 +0000 checkout: moving from A to B df45110a0f87e9c5e966fdfaa4ffea46273e362d 73305a5b4f5430ac29d974c1aeffdd3f335031fe committer 946771200 +0000 commit: unrelated change to w remove-executable-mode/.git/info000075500000000000000000000000001046102023000152435ustar 00000000000000remove-executable-mode/.git/info/exclude000064400000000000000000000003601046102023000166750ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ remove-executable-mode/.git/HEAD000064400000000000000000000000221046102023000150050ustar 00000000000000ref: refs/heads/B remove-executable-mode/.git/objects000075500000000000000000000000001046102023000157415ustar 00000000000000remove-executable-mode/.git/objects/82000075500000000000000000000000001046102023000161725ustar 00000000000000remove-executable-mode/.git/objects/82/a5adb893fb7cfcb76c0e4fb952cef374eb50f6000064400000000000000000000000561046102023000240570ustar 00000000000000x+)JMU0d040075U(gx6M9{wk+qIOD remove-executable-mode/.git/objects/e6000075500000000000000000000000001046102023000162535ustar 00000000000000remove-executable-mode/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000235570ustar 00000000000000xKOR0` remove-executable-mode/.git/objects/53000075500000000000000000000000001046102023000161705ustar 00000000000000remove-executable-mode/.git/objects/53/0cc8504f3efbdc910faf47ee3e8818293d437c000064400000000000000000000000561046102023000235560ustar 00000000000000x+)JMU0d040031Q(gX䥨m̢??  remove-executable-mode/.git/objects/98000075500000000000000000000000001046102023000162015ustar 00000000000000remove-executable-mode/.git/objects/98/e72477db834a1839e7c838bed3d3f90219112c000064400000000000000000000002531046102023000232660ustar 00000000000000xeOKjC1ڧ};~GU -q0NА,@H* օ̀)&E¦ujt^29Ƨ!I]hyBѤeJ(UG;Uu~Owj޾ yͯb jkolƾjp7sN'~ ~Lremove-executable-mode/.git/objects/info000075500000000000000000000000001046102023000166745ustar 00000000000000remove-executable-mode/.git/objects/38000075500000000000000000000000001046102023000161735ustar 00000000000000remove-executable-mode/.git/objects/38/31084643e6d747a317c60a166d601fdfaf0c67000064400000000000000000000000561046102023000232400ustar 00000000000000x+)JMU0d040075U(gX䥨m̢?? d remove-executable-mode/.git/objects/8a000075500000000000000000000000001046102023000162515ustar 00000000000000remove-executable-mode/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000234070ustar 00000000000000xKOR04`02222(-Rremove-executable-mode/.git/objects/73000075500000000000000000000000001046102023000161725ustar 00000000000000remove-executable-mode/.git/objects/73/305a5b4f5430ac29d974c1aeffdd3f335031fe000064400000000000000000000002451046102023000235320ustar 00000000000000xe 0=).槛*KBJHǷԃsa&. VcpPγ>&J:#yu*s]52ॏDoŒI6.6|"O.INq)gQpImI_zΪu2qq*x\Iremove-executable-mode/.git/objects/pack000075500000000000000000000000001046102023000166575ustar 00000000000000remove-executable-mode/.git/objects/df000075500000000000000000000000001046102023000163325ustar 00000000000000remove-executable-mode/.git/objects/df/45110a0f87e9c5e966fdfaa4ffea46273e362d000064400000000000000000000002011046102023000237070ustar 00000000000000xe !E[oOa~E_ĠO(Ews.j)d38LFE$Y"N3jF&+³k// e[DkkvRQ1 ~m럋8[~U8nremove-executable-mode/.git/objects/69000075500000000000000000000000001046102023000161775ustar 00000000000000remove-executable-mode/.git/objects/69/79ebcf580098d734fba33b6d602149b551a40a000064400000000000000000000000561046102023000233250ustar 00000000000000x+)JMU0d040031Q(gx6M9{wk+qIOD remove-executable-mode/.git/config000064400000000000000000000002111046102023000155510ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true big-file-merge000075500000000000000000000000001046102023000116645ustar 00000000000000big-file-merge/A-B.merge-info000064400000000000000000000005041046102023000142530ustar 00000000000000a55d5d973799e33bc36a33290141277411434d27100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/x.f100644 197489828265c7b6e438b4df431fd10e8b432c23 2 a/x.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/x.f1a/x.fAuto-mergingAuto-merging a/x.f 1a/x.fCONFLICT (contents)CONFLICT (content): Merge conflict in a/x.f big-file-merge/.git000075500000000000000000000000001046102023000125255ustar 00000000000000big-file-merge/.git/COMMIT_EDITMSG000064400000000000000000000000451046102023000146720ustar 00000000000000a normal but conflicting file change big-file-merge/.git/index000064400000000000000000000002431046102023000136350ustar 00000000000000DIRCgU1gU1 =  JX+pa/x.fTREE31 1 ;Fǂ2$wa1 0 3ܞ@Z\ iH=4N -` &=^big-file-merge/.git/refs000075500000000000000000000000001046102023000134645ustar 00000000000000big-file-merge/.git/refs/tags000075500000000000000000000000001046102023000144225ustar 00000000000000big-file-merge/.git/refs/heads000075500000000000000000000000001046102023000145505ustar 00000000000000big-file-merge/.git/refs/heads/B000064400000000000000000000000511046102023000147270ustar 0000000000000017d9deb0ec0480826e905bd45eca1026842c9143 big-file-merge/.git/refs/heads/main000064400000000000000000000000511046102023000154720ustar 00000000000000a80891d88650998268c93a07b48dff45fc8fbcfd big-file-merge/.git/refs/heads/A000064400000000000000000000000511046102023000147260ustar 0000000000000035137b0250e7159cd6364f29f922dff63374dd3a big-file-merge/.git/refs/heads/expected000064400000000000000000000000511046102023000163470ustar 0000000000000035137b0250e7159cd6364f29f922dff63374dd3a big-file-merge/.git/hooks000075500000000000000000000000001046102023000136505ustar 00000000000000big-file-merge/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000203470ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 big-file-merge/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000167060ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 big-file-merge/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000200670ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : big-file-merge/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000203060ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : big-file-merge/.git/hooks/post-update.sample000075500000000000000000000002751046102023000174060ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info big-file-merge/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000206520ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi big-file-merge/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000173360ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi big-file-merge/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000207620ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } big-file-merge/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000200740ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : big-file-merge/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000172130ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- big-file-merge/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000171640ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END big-file-merge/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000172060ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } big-file-merge/.git/description000064400000000000000000000001111046102023000150430ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. big-file-merge/.git/logs000075500000000000000000000000001046102023000134715ustar 00000000000000big-file-merge/.git/logs/refs000075500000000000000000000000001046102023000144305ustar 00000000000000big-file-merge/.git/logs/refs/heads000075500000000000000000000000001046102023000155145ustar 00000000000000big-file-merge/.git/logs/refs/heads/B000064400000000000000000000005171046102023000157020ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 branch: Created from main a80891d88650998268c93a07b48dff45fc8fbcfd 17d9deb0ec0480826e905bd45eca1026842c9143 committer 946771200 +0000 commit: a normal but conflicting file change big-file-merge/.git/logs/refs/heads/main000064400000000000000000000002371046102023000164440ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 commit (initial): original big-file-merge/.git/logs/refs/heads/A000064400000000000000000000005241046102023000156770ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 branch: Created from main a80891d88650998268c93a07b48dff45fc8fbcfd 35137b0250e7159cd6364f29f922dff63374dd3a committer 946771200 +0000 commit: turn normal file into big one (102 bytes) big-file-merge/.git/logs/refs/heads/expected000064400000000000000000000002331046102023000173150ustar 000000000000000000000000000000000000000000000000000000 35137b0250e7159cd6364f29f922dff63374dd3a committer 946771200 +0000 branch: Created from A big-file-merge/.git/logs/HEAD000064400000000000000000000015131046102023000141740ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 commit (initial): original a80891d88650998268c93a07b48dff45fc8fbcfd a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 checkout: moving from main to A a80891d88650998268c93a07b48dff45fc8fbcfd 35137b0250e7159cd6364f29f922dff63374dd3a committer 946771200 +0000 commit: turn normal file into big one (102 bytes) 35137b0250e7159cd6364f29f922dff63374dd3a a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 checkout: moving from A to B a80891d88650998268c93a07b48dff45fc8fbcfd 17d9deb0ec0480826e905bd45eca1026842c9143 committer 946771200 +0000 commit: a normal but conflicting file change big-file-merge/.git/info000075500000000000000000000000001046102023000134605ustar 00000000000000big-file-merge/.git/info/exclude000064400000000000000000000003601046102023000151120ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ big-file-merge/.git/HEAD000064400000000000000000000000221046102023000132220ustar 00000000000000ref: refs/heads/B big-file-merge/.git/objects000075500000000000000000000000001046102023000141565ustar 00000000000000big-file-merge/.git/objects/a8000075500000000000000000000000001046102023000144665ustar 00000000000000big-file-merge/.git/objects/a8/0891d88650998268c93a07b48dff45fc8fbcfd000064400000000000000000000002011046102023000217370ustar 00000000000000xe 0D=+.H6.WHPa`KΩkUc EY&4 8HAȳJ/X0|!'kaoLV ?7nۏkJMtռ*7#big-file-merge/.git/objects/91000075500000000000000000000000001046102023000144075ustar 00000000000000big-file-merge/.git/objects/91/771b1aa7d21439ea8b961e85106ed29a78f5e9000064400000000000000000000000531046102023000215560ustar 00000000000000x+)JMU0`01Dj3%N|sy2,/ Vp Ѡogbig-file-merge/.git/objects/fd000075500000000000000000000000001046102023000145475ustar 00000000000000big-file-merge/.git/objects/fd/269b6918c9c52c15fb4ae75497178979ebb071000064400000000000000000000000601046102023000215720ustar 00000000000000x+)JMU06d040031QKcpa j1{5y+Zl big-file-merge/.git/objects/c9000075500000000000000000000000001046102023000144715ustar 00000000000000big-file-merge/.git/objects/c9/a7268c226f7d06f12a0c59e961303066a931e5000064400000000000000000000000531046102023000213760ustar 00000000000000x+)JMU0`01DF?JuW:H' 5 Hbig-file-merge/.git/objects/a5000075500000000000000000000000001046102023000144635ustar 00000000000000big-file-merge/.git/objects/a5/5d5d973799e33bc36a33290141277411434d27000064400000000000000000000000531046102023000211570ustar 00000000000000x+)JMU0`01D9#ͬW2[l- big-file-merge/.git/objects/b4000075500000000000000000000000001046102023000144635ustar 00000000000000big-file-merge/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000213600ustar 00000000000000xKOR04b022222/cbig-file-merge/.git/objects/9c000075500000000000000000000000001046102023000144715ustar 00000000000000big-file-merge/.git/objects/9c/be3a03595b363a9faf223728fd7c4df34ecd7d000064400000000000000000000000571046102023000221320ustar 00000000000000x+)JMU06d040031QKc`X!x@\苫=P /big-file-merge/.git/objects/33000075500000000000000000000000001046102023000144035ustar 00000000000000big-file-merge/.git/objects/33/8c82cddc9e40d5061e5aecd35c0969f748b4ce000064400000000000000000000000601046102023000220460ustar 00000000000000x+)JMU06d040031QKc""St/-.i C 5big-file-merge/.git/objects/35000075500000000000000000000000001046102023000144055ustar 00000000000000big-file-merge/.git/objects/35/137b0250e7159cd6364f29f922dff63374dd3a000064400000000000000000000002701046102023000214650ustar 00000000000000xeJ1D=+dnX_tt`,1 + TjlU!D(9r\1dN8a“ٜk v% 32ӷʓ`\<99'Kʫh~q~I9Zy!'Dx#oC;ӽscqjEvۮ`ޡUG'sHO5big-file-merge/.git/objects/04000075500000000000000000000000001046102023000144015ustar 00000000000000big-file-merge/.git/objects/04/68aa48115f21cc7025f43c1e8515e8d58ca37b000064400000000000000000000001351046102023000215300ustar 00000000000000x%̻ @QJݽHa/9(!Lht[y3YlTQPC 4BW| w< oR5iA&ǭ|;'big-file-merge/.git/config000064400000000000000000000002411046102023000137710ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true bigFileThreshold = 100 big-file-merge/a000075500000000000000000000000001046102023000121045ustar 00000000000000big-file-merge/a/x.f000064400000000000000000000000141046102023000125740ustar 000000000000001 2 3 4 5 6 non-tree-to-tree-with-rename000075500000000000000000000000001046102023000144335ustar 00000000000000non-tree-to-tree-with-rename/A-B.merge-info000064400000000000000000000000511046102023000170170ustar 00000000000000602c8b837694ec0eb26afe65e98e5e9747464ddenon-tree-to-tree-with-rename/A-B-reversed.merge-info000064400000000000000000000000511046102023000206340ustar 00000000000000602c8b837694ec0eb26afe65e98e5e9747464ddenon-tree-to-tree-with-rename/.git000075500000000000000000000000001046102023000152745ustar 00000000000000non-tree-to-tree-with-rename/.git/COMMIT_EDITMSG000064400000000000000000000000641046102023000174420ustar 00000000000000mv 'a' to 'a/sub/b', populate 'a/' with empty files non-tree-to-tree-with-rename/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000230310ustar 00000000000000602c8b837694ec0eb26afe65e98e5e9747464dde non-tree-to-tree-with-rename/.git/index000064400000000000000000000006271046102023000164120ustar 00000000000000DIRC⛲CK)wZSa/d⛲CK)wZSa/e JX+pa/sub/b⛲CK)wZSa/sub/cTREEO4 1 `,vje^GFMa4 1 p@x[\GD(sub2 0 }IM $Ƈ JDcˈ`9Hnon-tree-to-tree-with-rename/.git/refs000075500000000000000000000000001046102023000162335ustar 00000000000000non-tree-to-tree-with-rename/.git/refs/tags000075500000000000000000000000001046102023000171715ustar 00000000000000non-tree-to-tree-with-rename/.git/refs/heads000075500000000000000000000000001046102023000173175ustar 00000000000000non-tree-to-tree-with-rename/.git/refs/heads/B000064400000000000000000000000511046102023000174760ustar 000000000000005109b47a244a69d0643f1bb474bd2ac3792fb073 non-tree-to-tree-with-rename/.git/refs/heads/main000064400000000000000000000000511046102023000202410ustar 0000000000000007922b1229e4b3c7f55eadc5d759618997f820a5 non-tree-to-tree-with-rename/.git/refs/heads/A000064400000000000000000000000511046102023000174750ustar 0000000000000002ce1376dec77fa0bec1ac442b7480c8ebefa664 non-tree-to-tree-with-rename/.git/hooks000075500000000000000000000000001046102023000164175ustar 00000000000000non-tree-to-tree-with-rename/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000231160ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 non-tree-to-tree-with-rename/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000214550ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 non-tree-to-tree-with-rename/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000226360ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : non-tree-to-tree-with-rename/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000230550ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : non-tree-to-tree-with-rename/.git/hooks/post-update.sample000075500000000000000000000002751046102023000221550ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info non-tree-to-tree-with-rename/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000234210ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi non-tree-to-tree-with-rename/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000221050ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi non-tree-to-tree-with-rename/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000235310ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } non-tree-to-tree-with-rename/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000226430ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : non-tree-to-tree-with-rename/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000217620ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- non-tree-to-tree-with-rename/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000217330ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END non-tree-to-tree-with-rename/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000217550ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } non-tree-to-tree-with-rename/.git/description000064400000000000000000000001111046102023000176120ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. non-tree-to-tree-with-rename/.git/logs000075500000000000000000000000001046102023000162405ustar 00000000000000non-tree-to-tree-with-rename/.git/logs/refs000075500000000000000000000000001046102023000171775ustar 00000000000000non-tree-to-tree-with-rename/.git/logs/refs/heads000075500000000000000000000000001046102023000202635ustar 00000000000000non-tree-to-tree-with-rename/.git/logs/refs/heads/B000064400000000000000000000005361046102023000204520ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 branch: Created from main 07922b1229e4b3c7f55eadc5d759618997f820a5 5109b47a244a69d0643f1bb474bd2ac3792fb073 committer 946771200 +0000 commit: mv 'a' to 'a/sub/b', populate 'a/' with empty files non-tree-to-tree-with-rename/.git/logs/refs/heads/main000064400000000000000000000002331046102023000212070ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 commit (initial): init non-tree-to-tree-with-rename/.git/logs/refs/heads/A000064400000000000000000000004721046102023000204500ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 branch: Created from main 07922b1229e4b3c7f55eadc5d759618997f820a5 02ce1376dec77fa0bec1ac442b7480c8ebefa664 committer 946771200 +0000 commit: 'A' changes 'a' non-tree-to-tree-with-rename/.git/logs/HEAD000064400000000000000000000014741046102023000167510ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 commit (initial): init 07922b1229e4b3c7f55eadc5d759618997f820a5 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 checkout: moving from main to A 07922b1229e4b3c7f55eadc5d759618997f820a5 02ce1376dec77fa0bec1ac442b7480c8ebefa664 committer 946771200 +0000 commit: 'A' changes 'a' 02ce1376dec77fa0bec1ac442b7480c8ebefa664 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 checkout: moving from A to B 07922b1229e4b3c7f55eadc5d759618997f820a5 5109b47a244a69d0643f1bb474bd2ac3792fb073 committer 946771200 +0000 commit: mv 'a' to 'a/sub/b', populate 'a/' with empty files non-tree-to-tree-with-rename/.git/info000075500000000000000000000000001046102023000162275ustar 00000000000000non-tree-to-tree-with-rename/.git/info/exclude000064400000000000000000000003601046102023000176610ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ non-tree-to-tree-with-rename/.git/HEAD000064400000000000000000000000221046102023000157710ustar 00000000000000ref: refs/heads/B non-tree-to-tree-with-rename/.git/objects000075500000000000000000000000001046102023000167255ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/85000075500000000000000000000000001046102023000171615ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/85/f97d1749104d0d9624b7a3c687f8bfd514a1b9000064400000000000000000000001071046102023000243270ustar 00000000000000x+)JMU0`040031QHb""St/-.i @%}4{kݚʣnz<Nnon-tree-to-tree-with-rename/.git/objects/23000075500000000000000000000000001046102023000171515ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/23/ec07147738552204dbc9ebcd7e4a5a5e0d9573000064400000000000000000000000561046102023000243670ustar 00000000000000x+)JMU0d040031QHd""St/-.i C non-tree-to-tree-with-rename/.git/objects/e6000075500000000000000000000000001046102023000172375ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000245430ustar 00000000000000xKOR0` non-tree-to-tree-with-rename/.git/objects/b9000075500000000000000000000000001046102023000172375ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/b9/608457c26f2fb16afd693db85f53d5de94c007000064400000000000000000000000531046102023000244650ustar 00000000000000x+)JMU0`01DE2{Y6$cڷ1 6 non-tree-to-tree-with-rename/.git/objects/a6000075500000000000000000000000001046102023000172335ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/a6/58470a4f22222704a4a4f8b2ef73815d714549000064400000000000000000000001071046102023000240630ustar 00000000000000x+)JMU0`040031QHbpa j1{5y+Zl Lfx6M9{wk+qIOD+Nnon-tree-to-tree-with-rename/.git/objects/a8000075500000000000000000000000001046102023000172355ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/a8/e0d7ec7040785be91f5cc447bd131844288397000064400000000000000000000001211046102023000242400ustar 00000000000000x+)JMU`040031QHax6M9{wk+qIODd*VI P(.MbhY+);Mec?_Y*6non-tree-to-tree-with-rename/.git/objects/6d000075500000000000000000000000001046102023000172365ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/6d/64e6ce6982fe066d23fb83fb7958b2e40c18fd000064400000000000000000000000561046102023000245610ustar 00000000000000x+)JMU0d040031QHdpa j1{5y+Zl ޶6non-tree-to-tree-with-rename/.git/objects/info000075500000000000000000000000001046102023000176605ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/07000075500000000000000000000000001046102023000171535ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/07/922b1229e4b3c7f55eadc5d759618997f820a5000064400000000000000000000001751046102023000242550ustar 00000000000000xeQ !{W{ٺ;]I ك~~Bq=400Z Ǹ cd d3kdҰgZ-; 外Mn7O^O HR_~4}ʣz6non-tree-to-tree-with-rename/.git/objects/44000075500000000000000000000000001046102023000171545ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000242050ustar 00000000000000xKOR0d/LK22222pSnon-tree-to-tree-with-rename/.git/objects/pack000075500000000000000000000000001046102023000176435ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/a2000075500000000000000000000000001046102023000172275ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/a2/1cbd21058106b06371ae02d7258eb20c015dec000064400000000000000000000001201046102023000243050ustar 00000000000000x+)JMU`040031QHax6M9{wk+qIODd*VI P(.MbX寤βdɏMc ]=(Tnon-tree-to-tree-with-rename/.git/objects/b4000075500000000000000000000000001046102023000172325ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000241270ustar 00000000000000xKOR04b022222/cnon-tree-to-tree-with-rename/.git/objects/02000075500000000000000000000000001046102023000171465ustar 00000000000000non-tree-to-tree-with-rename/.git/objects/02/ce1376dec77fa0bec1ac442b7480c8ebefa664000064400000000000000000000002451046102023000247360ustar 00000000000000xe 0=)փ 6M>6٪`|| J=8o`<+Yhv̍'B.1hRqc:1JB[xh'CS 3N RZʗҒRaTX)ڌ>ELɌfG~+ap! ojy^*~Qnon-tree-to-tree-with-rename/.git/config000064400000000000000000000002111046102023000165350ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true non-tree-to-tree-with-rename/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000230310ustar 00000000000000602c8b837694ec0eb26afe65e98e5e9747464dde non-tree-to-tree-with-rename/a000075500000000000000000000000001046102023000146535ustar 00000000000000non-tree-to-tree-with-rename/a/e000064400000000000000000000000001046102023000150670ustar 00000000000000non-tree-to-tree-with-rename/a/d000064400000000000000000000000001046102023000150660ustar 00000000000000non-tree-to-tree-with-rename/a/sub000075500000000000000000000000001046102023000154445ustar 00000000000000non-tree-to-tree-with-rename/a/sub/b000064400000000000000000000000231046102023000156620ustar 00000000000000original 1 2 3 4 5 non-tree-to-tree-with-rename/a/sub/c000064400000000000000000000000001046102023000156560ustar 00000000000000baseline.cases000064400000000000000000000456451046102023000120100ustar 00000000000000non-tree-to-tree merge 02ce1376dec77fa0bec1ac442b7480c8ebefa664 A 417f665bb59cf77d66148f6d23b2af70ea934c09 B A-B.merge-info expected^{tree} non-tree-to-tree merge 417f665bb59cf77d66148f6d23b2af70ea934c09 B 02ce1376dec77fa0bec1ac442b7480c8ebefa664 A A-B-reversed.merge-info expected^{tree} tree-to-non-tree merge 4b223685fb54ccf8e390739440ddd65f69ead854 A 7f7724fe3bb9152a2eb126f95a8ca8f5780edc9b B A-B.merge-info expected^{tree} tree-to-non-tree merge 7f7724fe3bb9152a2eb126f95a8ca8f5780edc9b B 4b223685fb54ccf8e390739440ddd65f69ead854 A A-B-reversed.merge-info expected^{tree} tree-to-non-tree-with-rename merge 4b223685fb54ccf8e390739440ddd65f69ead854 A 7abf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e B A-B.merge-info expected^{tree} tree-to-non-tree-with-rename merge 7abf1ed63fbdbcbd48aab8422e9c7a3d82bddd8e B 4b223685fb54ccf8e390739440ddd65f69ead854 A A-B-reversed.merge-info expected^{tree} non-tree-to-tree-with-rename merge 02ce1376dec77fa0bec1ac442b7480c8ebefa664 A 5109b47a244a69d0643f1bb474bd2ac3792fb073 B A-B.merge-info expected^{tree} non-tree-to-tree-with-rename merge 5109b47a244a69d0643f1bb474bd2ac3792fb073 B 02ce1376dec77fa0bec1ac442b7480c8ebefa664 A A-B-reversed.merge-info expected^{tree} rename-add-same-symlink merge fa185d1df68d36f299d1be7ccebe85039459c0fa A cf7e0510d951edab8b3023e7979a3ecf8ae0e3a2 B A-B.merge-info expected^{tree} rename-add-same-symlink merge cf7e0510d951edab8b3023e7979a3ecf8ae0e3a2 B fa185d1df68d36f299d1be7ccebe85039459c0fa A A-B-reversed.merge-info expected^{tree} rename-add-exe-bit-conflict merge 90e5a2b92b14265db31ba385bf59bf711d20ece5 A 1dbf7decb27506a3248a47365c4a3f4c56b86558 B A-B.merge-info expected^{tree} rename-add-exe-bit-conflict merge 1dbf7decb27506a3248a47365c4a3f4c56b86558 B 90e5a2b92b14265db31ba385bf59bf711d20ece5 A A-B-reversed.merge-info expected^{tree} remove-executable-mode merge 98e72477db834a1839e7c838bed3d3f90219112c A 73305a5b4f5430ac29d974c1aeffdd3f335031fe B A-B.merge-info expected^{tree} remove-executable-mode merge 73305a5b4f5430ac29d974c1aeffdd3f335031fe B 98e72477db834a1839e7c838bed3d3f90219112c A A-B-reversed.merge-info expected^{tree} simple merge 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 d0d15aac124a3ec8b48d145c160d67c776b55c38 side3 side-1-3-without-conflict.merge-info expected^{tree} simple merge d0d15aac124a3ec8b48d145c160d67c776b55c38 side3 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 side-1-3-without-conflict-reversed.merge-info expected^{tree} simple merge 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 b8f70c8124cce398e5ec255d7704f9be827fe178 main fast-forward.merge-info expected^{tree} simple merge b8f70c8124cce398e5ec255d7704f9be827fe178 main 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 fast-forward-reversed.merge-info expected^{tree} simple merge b8f70c8124cce398e5ec255d7704f9be827fe178 main b8f70c8124cce398e5ec255d7704f9be827fe178 main no-change.merge-info expected^{tree} simple merge b8f70c8124cce398e5ec255d7704f9be827fe178 main b8f70c8124cce398e5ec255d7704f9be827fe178 main no-change-reversed.merge-info expected^{tree} simple diff3 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 d0d15aac124a3ec8b48d145c160d67c776b55c38 side3 side-1-3-without-conflict-diff3.merge-info expected^{tree} simple diff3 d0d15aac124a3ec8b48d145c160d67c776b55c38 side3 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 side-1-3-without-conflict-diff3-reversed.merge-info expected^{tree} simple merge 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 side-1-2-various-conflicts.merge-info expected^{tree} simple merge bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 side-1-2-various-conflicts-reversed.merge-info expected^{tree} simple diff3 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 side-1-2-various-conflicts-diff3.merge-info expected^{tree} simple diff3 bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 side-1-2-various-conflicts-diff3-reversed.merge-info expected^{tree} simple merge 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 e8ad12b03cafae65f93846f861e3cff749d803c6 side4 single-content-conflict.merge-info expected^{tree} simple merge e8ad12b03cafae65f93846f861e3cff749d803c6 side4 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 single-content-conflict-reversed.merge-info expected^{tree} simple diff3 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 e8ad12b03cafae65f93846f861e3cff749d803c6 side4 single-content-conflict-diff3.merge-info expected^{tree} simple diff3 e8ad12b03cafae65f93846f861e3cff749d803c6 side4 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 single-content-conflict-diff3-reversed.merge-info expected^{tree} simple merge 9c0e5177bb92038c5d78abcb144b9398417cf5ab tweak1 bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 tweak1-side2.merge-info expected^{tree} simple merge bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 9c0e5177bb92038c5d78abcb144b9398417cf5ab tweak1 tweak1-side2-reversed.merge-info expected^{tree} simple diff3 9c0e5177bb92038c5d78abcb144b9398417cf5ab tweak1 bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 tweak1-side2-diff3.merge-info expected^{tree} simple diff3 bac05a18a999e047be725b72ba2fba5a5c15a2b7 side2 9c0e5177bb92038c5d78abcb144b9398417cf5ab tweak1 tweak1-side2-diff3-reversed.merge-info expected^{tree} simple merge 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c unrelated side-1-unrelated.merge-info expected^{tree} simple merge e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c unrelated 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 side-1-unrelated-reversed.merge-info expected^{tree} simple diff3 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c unrelated side-1-unrelated-diff3.merge-info expected^{tree} simple diff3 e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c unrelated 01b0ab9ec793698774e27548b9d0fd5f08806804 side1 side-1-unrelated-diff3-reversed.merge-info expected^{tree} rename-delete merge 5645da1e133ee10e10178b3e979c781a8bb65e05 A f0d6c0a964bc1c3eae7551499cceb4023e8fca00 B A-B.merge-info expected^{tree} rename-delete merge f0d6c0a964bc1c3eae7551499cceb4023e8fca00 B 5645da1e133ee10e10178b3e979c781a8bb65e05 A A-B-reversed.merge-info expected^{tree} rename-delete merge 5645da1e133ee10e10178b3e979c781a8bb65e05 A 5645da1e133ee10e10178b3e979c781a8bb65e05 A A-similar.merge-info expected^{tree} rename-delete merge 5645da1e133ee10e10178b3e979c781a8bb65e05 A 5645da1e133ee10e10178b3e979c781a8bb65e05 A A-similar-reversed.merge-info expected^{tree} rename-delete merge f0d6c0a964bc1c3eae7551499cceb4023e8fca00 B f0d6c0a964bc1c3eae7551499cceb4023e8fca00 B B-similar.merge-info expected^{tree} rename-delete merge f0d6c0a964bc1c3eae7551499cceb4023e8fca00 B f0d6c0a964bc1c3eae7551499cceb4023e8fca00 B B-similar-reversed.merge-info expected^{tree} rename-add merge d3bb807308fa4859a3f2c85607741fd06607a8a0 A 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B A-B.merge-info expected^{tree} rename-add merge 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B d3bb807308fa4859a3f2c85607741fd06607a8a0 A A-B-reversed.merge-info expected^{tree} rename-add diff3 d3bb807308fa4859a3f2c85607741fd06607a8a0 A 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B A-B-diff3.merge-info expected^{tree} rename-add diff3 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B d3bb807308fa4859a3f2c85607741fd06607a8a0 A A-B-diff3-reversed.merge-info expected^{tree} rename-add-symlink merge b65c25978715c1a1d2dfad9fb1da0a441df8db06 A 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B A-B.merge-info expected^{tree} rename-add-symlink merge 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B b65c25978715c1a1d2dfad9fb1da0a441df8db06 A A-B-reversed.merge-info expected^{tree} rename-add-symlink diff3 b65c25978715c1a1d2dfad9fb1da0a441df8db06 A 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B A-B-diff3.merge-info expected^{tree} rename-add-symlink diff3 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae B b65c25978715c1a1d2dfad9fb1da0a441df8db06 A A-B-diff3-reversed.merge-info expected^{tree} rename-rename-plus-content merge 3535b23e27606131d40a1784c588106a71ae717d A c19ff48eacbb961cdb9e0e824ac99736631648da B A-B.merge-info expected^{tree} rename-rename-plus-content merge c19ff48eacbb961cdb9e0e824ac99736631648da B 3535b23e27606131d40a1784c588106a71ae717d A A-B-reversed.merge-info expected^{tree} rename-rename-plus-content diff3 3535b23e27606131d40a1784c588106a71ae717d A c19ff48eacbb961cdb9e0e824ac99736631648da B A-B-diff3.merge-info expected^{tree} rename-rename-plus-content diff3 c19ff48eacbb961cdb9e0e824ac99736631648da B 3535b23e27606131d40a1784c588106a71ae717d A A-B-diff3-reversed.merge-info expected^{tree} rename-add-delete merge 66c1c1414adb7ca3f6981a65d450fde297c03155 A fa3f30f20aefd91ac4ce876c13214b8dfba1eb42 B A-B.merge-info expected^{tree} rename-add-delete merge fa3f30f20aefd91ac4ce876c13214b8dfba1eb42 B 66c1c1414adb7ca3f6981a65d450fde297c03155 A A-B-reversed.merge-info expected^{tree} rename-rename-delete-delete merge d94014964b0b086b4fbea9df5a07c085872368bc A 95e9b001b7f3007f274180cb0e413776012d3df5 B A-B.merge-info expected^{tree} rename-rename-delete-delete merge 95e9b001b7f3007f274180cb0e413776012d3df5 B d94014964b0b086b4fbea9df5a07c085872368bc A A-B-reversed.merge-info expected^{tree} super-1 merge 6c126fbbd60926788afcd30c446e5173a46b166e A 339e8dc8898e2aeff47d784e3d720403ff27522e B A-B.merge-info expected^{tree} super-1 merge 339e8dc8898e2aeff47d784e3d720403ff27522e B 6c126fbbd60926788afcd30c446e5173a46b166e A A-B-reversed.merge-info expected^{tree} super-1 diff3 6c126fbbd60926788afcd30c446e5173a46b166e A 339e8dc8898e2aeff47d784e3d720403ff27522e B A-B-diff3.merge-info expected^{tree} super-1 diff3 339e8dc8898e2aeff47d784e3d720403ff27522e B 6c126fbbd60926788afcd30c446e5173a46b166e A A-B-diff3-reversed.merge-info expected^{tree} super-2 merge a1ea379c9ac17994b650f34e47de4b86a9e652fd A d870598997d8b735d8cabd57dc4d980a4860410a B A-B.merge-info expected^{tree} super-2 merge d870598997d8b735d8cabd57dc4d980a4860410a B a1ea379c9ac17994b650f34e47de4b86a9e652fd A A-B-reversed.merge-info expected^{tree} super-2 diff3 a1ea379c9ac17994b650f34e47de4b86a9e652fd A d870598997d8b735d8cabd57dc4d980a4860410a B A-B-diff3.merge-info expected^{tree} super-2 diff3 d870598997d8b735d8cabd57dc4d980a4860410a B a1ea379c9ac17994b650f34e47de4b86a9e652fd A A-B-diff3-reversed.merge-info expected^{tree} rename-within-rename merge beb102ac2dffaede3cb6e968466fe50a7cb4d7aa A 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 B A-B-deviates.merge-info 80ae1408ce7ca91c2e90e00595cfc7b144ad9995 Git doesn't detect the rename-nesting, and we do neith, and we do neither rename-within-rename merge 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 B beb102ac2dffaede3cb6e968466fe50a7cb4d7aa A A-B-deviates-reversed.merge-info 80ae1408ce7ca91c2e90e00595cfc7b144ad9995 Git doesn't detect the rename-nesting, and we do neith, and we do neither rename-within-rename-2 merge 931aa51f3b2b0652306fab82bb2ab3d8d1c0bd3a A 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 B A-B-deviates.merge-info 82dd8cac8e9da105477708c0a62d6c155b7ee0ac TBD: Right, something is different documentation was forgotten :/ rename-within-rename-2 merge 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 B 931aa51f3b2b0652306fab82bb2ab3d8d1c0bd3a A A-B-deviates-reversed.merge-info 82dd8cac8e9da105477708c0a62d6c155b7ee0ac TBD: Right, something is different documentation was forgotten :/ conflicting-rename merge beb102ac2dffaede3cb6e968466fe50a7cb4d7aa A 82426bf4e159da8e9a6c5a34773b5863e35acb0d B A-B.merge-info expected^{tree} conflicting-rename merge 82426bf4e159da8e9a6c5a34773b5863e35acb0d B beb102ac2dffaede3cb6e968466fe50a7cb4d7aa A A-B-reversed.merge-info expected^{tree} conflicting-rename-2 merge a9f75942757826a4bc412a2978684913671fb776 A 4dd17fb1ce1977074bb3219bb4c0f835aca8a913 B A-B.merge-info expected^{tree} conflicting-rename-2 merge 4dd17fb1ce1977074bb3219bb4c0f835aca8a913 B a9f75942757826a4bc412a2978684913671fb776 A A-B-reversed.merge-info expected^{tree} conflicting-rename-complex merge beb102ac2dffaede3cb6e968466fe50a7cb4d7aa A 8a653419bf3dedd8a42f156ea96bc5ae3c359f1b B A-B.merge-info 3dc63ad95d52e0a30a7b3fb8244e0ff035645b9f Git has different rename tracking - overall result it's still close enough conflicting-rename-complex merge 8a653419bf3dedd8a42f156ea96bc5ae3c359f1b B beb102ac2dffaede3cb6e968466fe50a7cb4d7aa A A-B-reversed.merge-info 3dc63ad95d52e0a30a7b3fb8244e0ff035645b9f Git has different rename tracking - overall result it's still close enough same-rename-different-mode merge 8e75814cfd9d503b00605595866c56a245ebb345 A 429d0fdcf8bb6651338467e5d785a8a5bd30de06 B A-B.merge-info 05209c13a7736c3c40fb7e55c73ce37af06c01ab Git works for the A/B case, but for B/A it forgets to set the executable bit same-rename-different-mode merge 429d0fdcf8bb6651338467e5d785a8a5bd30de06 B 8e75814cfd9d503b00605595866c56a245ebb345 A A-B-reversed.merge-info 05209c13a7736c3c40fb7e55c73ce37af06c01ab Git works for the A/B case, but for B/A it forgets to set the executable bit renamed-symlink-with-conflict merge b3ea3182ff893372e7e4ffdce2a77361f4f031b6 A f7789e9d5f95a4abe51fcc29a04b828da44633a2 B A-B.merge-info expected^{tree} renamed-symlink-with-conflict merge f7789e9d5f95a4abe51fcc29a04b828da44633a2 B b3ea3182ff893372e7e4ffdce2a77361f4f031b6 A A-B-reversed.merge-info expected^{tree} added-file-changed-content-and-mode merge 9f77009f1d1f98c3e624f3909aaa02e589cf1eef A 607487b8a4b55faa02852cee5dee30f4cd1ea354 B A-B.merge-info e216c88d1d38e934d1ed1aa51b1621263e71fb3a We improve on executable bit handling, but loose on diff quality as we are definitely missing some tweaks added-file-changed-content-and-mode merge 607487b8a4b55faa02852cee5dee30f4cd1ea354 B 9f77009f1d1f98c3e624f3909aaa02e589cf1eef A A-B-reversed.merge-info e216c88d1d38e934d1ed1aa51b1621263e71fb3a We improve on executable bit handling, but loose on diff quality as we are definitely missing some tweaks type-change-and-renamed merge cffc95d55f99c1826787019253a68b78802ea3f4 A 9ad0ceab185a95fd19e01b4179c2d17525600b4c B A-B.merge-info expected^{tree} type-change-and-renamed merge 9ad0ceab185a95fd19e01b4179c2d17525600b4c B cffc95d55f99c1826787019253a68b78802ea3f4 A A-B-reversed.merge-info expected^{tree} change-and-delete merge 2fa0983019dc93dfb1b395e8b0d540584106e98f A fc2b838c73b0fe7960dcc1b8cb8925c68724f973 B A-B.merge-info expected^{tree} change-and-delete merge fc2b838c73b0fe7960dcc1b8cb8925c68724f973 B 2fa0983019dc93dfb1b395e8b0d540584106e98f A A-B-reversed.merge-info expected^{tree} submodule-both-modify merge a2dad3097e5a657be1730738eebba201245627c0 A b9381e5cf00d5804c66aba2d7dd267623f2d1683 B A-B.merge-info 3d76c994175a24f152e644db0d0f26bb567e4a0f We can't handle submodules yet and just mark them as conflicting. This is planned to be improved. submodule-both-modify merge b9381e5cf00d5804c66aba2d7dd267623f2d1683 B a2dad3097e5a657be1730738eebba201245627c0 A A-B-reversed.merge-info 3d76c994175a24f152e644db0d0f26bb567e4a0f We can't handle submodules yet and just mark them as conflicting. This is planned to be improved. both-modify-union-attr merge fb50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3 A 26f9484212ad820d220ca4b50e8dd4afccc54c30 B A-B.merge-info expected^{tree} both-modify-union-attr merge 26f9484212ad820d220ca4b50e8dd4afccc54c30 B fb50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3 A A-B-reversed.merge-info expected^{tree} both-modify-union-attr diff3 fb50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3 A 26f9484212ad820d220ca4b50e8dd4afccc54c30 B A-B-diff3.merge-info expected^{tree} both-modify-union-attr diff3 26f9484212ad820d220ca4b50e8dd4afccc54c30 B fb50475aa3ff1ed2ffffeb320b7aa9c016a8f8a3 A A-B-diff3-reversed.merge-info expected^{tree} both-modify-binary merge 5b1bbb91e22922cc099c7def751ca1ee42dec330 A 7a5528d43f13ed1af81d881479e93bbd92a45529 B A-B.merge-info expected^{tree} both-modify-binary merge 7a5528d43f13ed1af81d881479e93bbd92a45529 B 5b1bbb91e22922cc099c7def751ca1ee42dec330 A A-B-reversed.merge-info expected^{tree} both-modify-binary merge 5b1bbb91e22922cc099c7def751ca1ee42dec330 A 7a5528d43f13ed1af81d881479e93bbd92a45529 B A-B.merge-info expected^{tree} both-modify-binary merge 7a5528d43f13ed1af81d881479e93bbd92a45529 B 5b1bbb91e22922cc099c7def751ca1ee42dec330 A A-B-reversed.merge-info expected^{tree} both-modify-file-with-binary-attr merge 9aa3a00ce07bbd339309bd1cda56cfab6ad39f89 A 33c756dc1fbabe2353b6327d0ec546eb499689b6 B A-B.merge-info expected^{tree} both-modify-file-with-binary-attr merge 33c756dc1fbabe2353b6327d0ec546eb499689b6 B 9aa3a00ce07bbd339309bd1cda56cfab6ad39f89 A A-B-reversed.merge-info expected^{tree} big-file-merge merge 35137b0250e7159cd6364f29f922dff63374dd3a A 17d9deb0ec0480826e905bd45eca1026842c9143 B A-B.merge-info c9a7268c226f7d06f12a0c59e961303066a931e5 Git actually ignores core.bigFileThreshold during merging and tries a normal merge (or binary one) anyway. We don't ignore it and treat big files like binary files no-merge-base merge 39d2172cec25e3e71aef2ab793af717d4f7621e8 A 2fee72c3a50786500087a553d0551da889ae2728 B A-B.merge-info expected^{tree} no-merge-base merge 2fee72c3a50786500087a553d0551da889ae2728 B 39d2172cec25e3e71aef2ab793af717d4f7621e8 A A-B-reversed.merge-info expected^{tree} no-merge-base diff3 39d2172cec25e3e71aef2ab793af717d4f7621e8 A 2fee72c3a50786500087a553d0551da889ae2728 B A-B-diff3.merge-info expected^{tree} no-merge-base diff3 2fee72c3a50786500087a553d0551da889ae2728 B 39d2172cec25e3e71aef2ab793af717d4f7621e8 A A-B-diff3-reversed.merge-info expected^{tree} multiple-merge-bases merge 823250ea581811282c9f6dbe6fb8d70c68c97367 A 4fe4f8aa53e3f4ab85c92d5062316225ded26b1c B A-B.merge-info expected^{tree} multiple-merge-bases merge 4fe4f8aa53e3f4ab85c92d5062316225ded26b1c B 823250ea581811282c9f6dbe6fb8d70c68c97367 A A-B-reversed.merge-info expected^{tree} multiple-merge-bases diff3 823250ea581811282c9f6dbe6fb8d70c68c97367 A 4fe4f8aa53e3f4ab85c92d5062316225ded26b1c B A-B-diff3.merge-info expected^{tree} multiple-merge-bases diff3 4fe4f8aa53e3f4ab85c92d5062316225ded26b1c B 823250ea581811282c9f6dbe6fb8d70c68c97367 A A-B-diff3-reversed.merge-info expected^{tree} rename-and-modification merge d6034e249b070a3f621d250f284299ef549af72a A 01543f61899d828adc10ae50d9475e0d7ee497b3 B A-B.merge-info expected^{tree} rename-and-modification merge 01543f61899d828adc10ae50d9475e0d7ee497b3 B d6034e249b070a3f621d250f284299ef549af72a A A-B-reversed.merge-info expected^{tree} symlink-modification merge 075928004cd260e27002d305cb9975ff0ba0aff3 A 7f9b55f7f743d0ea403d39344cbfe7e67a8fdfc2 B A-B.merge-info expected^{tree} symlink-modification merge 7f9b55f7f743d0ea403d39344cbfe7e67a8fdfc2 B 075928004cd260e27002d305cb9975ff0ba0aff3 A A-B-reversed.merge-info expected^{tree} symlink-addition merge dee465281ff47aa01465d6a71f094975f79433d7 A 96790124d8523a74bdce179602c7f6eba7a0f736 B A-B.merge-info expected^{tree} symlink-addition merge 96790124d8523a74bdce179602c7f6eba7a0f736 B dee465281ff47aa01465d6a71f094975f79433d7 A A-B-reversed.merge-info expected^{tree} type-change-to-symlink merge 74423ffe2be2cac33b1e89c021c3d13cb33d0304 A 7bdc9f08b0403dfe7bf8f2a821cfa8ce0adc3fc9 B A-B.merge-info expected^{tree} type-change-to-symlink merge 7bdc9f08b0403dfe7bf8f2a821cfa8ce0adc3fc9 B 74423ffe2be2cac33b1e89c021c3d13cb33d0304 A A-B-reversed.merge-info expected^{tree} conflicting-rename000075500000000000000000000000001046102023000126555ustar 00000000000000conflicting-rename/A-B.merge-info000064400000000000000000000015221046102023000152450ustar 00000000000000183e9720efcdfd28e76a01b6e11753301e86517f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-different/sub/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-different/x.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-renamed/sub/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-renamed/x.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/x.f1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa-renamed/sub/y.fa-different/sub/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a-renamed/sub/y.f in A and to a-different/sub/y.f in B. 1a/x.fAuto-mergingAuto-merging a/x.f 3a/x.fa-renamed/x.fa-different/x.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/x.f renamed to a-renamed/x.f in A and to a-different/x.f in B. conflicting-rename/A-B-reversed.merge-info000064400000000000000000000015221046102023000170620ustar 00000000000000183e9720efcdfd28e76a01b6e11753301e86517f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-different/sub/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-different/x.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-renamed/sub/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-renamed/x.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/x.f1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa-different/sub/y.fa-renamed/sub/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a-different/sub/y.f in B and to a-renamed/sub/y.f in A. 1a/x.fAuto-mergingAuto-merging a/x.f 3a/x.fa-different/x.fa-renamed/x.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/x.f renamed to a-different/x.f in B and to a-renamed/x.f in A. conflicting-rename/.git000075500000000000000000000000001046102023000135165ustar 00000000000000conflicting-rename/.git/COMMIT_EDITMSG000064400000000000000000000000561046102023000156650ustar 00000000000000changed all content, renamed a -> a-different conflicting-rename/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000212530ustar 00000000000000ba185e921f848f2b5db2cad1312950f1283b8e34 conflicting-rename/.git/index000064400000000000000000000007111046102023000146260ustar 00000000000000DIRC JX+pa-different/sub/y.f⛲CK)wZSa-different/sub/z⛲CK)wZS a-different/w JX+pa-different/x.fTREEY4 1 ހNdQY;"@ka-different4 1 `vKΙ xsub2 0 v=ynpYB,@m conflicting-rename/.git/conflicting-rename-A-B-reversed.index000064400000000000000000000017101046102023000225430ustar 00000000000000DIRC  JX+p a-different/sub/y.f⛲CK)wZS a-different/sub/z⛲CK)wZS a-different/w JX+p a-different/x.f JX+p0a-renamed/sub/y.f⛲CK)wZS0a-renamed/sub/z⛲CK)wZS0 a-renamed/w JX+p0 a-renamed/x.fDRCgG!8?ه a/sub/y.f⛲CK)wZSa/sub/z⛲CK)wZSa/wDRCgG!8?هa/x.fc DIr@Hconflicting-rename/.git/refs000075500000000000000000000000001046102023000144555ustar 00000000000000conflicting-rename/.git/refs/tags000075500000000000000000000000001046102023000154135ustar 00000000000000conflicting-rename/.git/refs/heads000075500000000000000000000000001046102023000155415ustar 00000000000000conflicting-rename/.git/refs/heads/B000064400000000000000000000000511046102023000157200ustar 0000000000000082426bf4e159da8e9a6c5a34773b5863e35acb0d conflicting-rename/.git/refs/heads/main000064400000000000000000000000511046102023000164630ustar 0000000000000081a81b561f72d779aefb47ab475c363fbb8bb6bc conflicting-rename/.git/refs/heads/A000064400000000000000000000000511046102023000157170ustar 00000000000000beb102ac2dffaede3cb6e968466fe50a7cb4d7aa conflicting-rename/.git/hooks000075500000000000000000000000001046102023000146415ustar 00000000000000conflicting-rename/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000213400ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 conflicting-rename/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000176770ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 conflicting-rename/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000210600ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : conflicting-rename/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000212770ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : conflicting-rename/.git/hooks/post-update.sample000075500000000000000000000002751046102023000203770ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info conflicting-rename/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000216430ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi conflicting-rename/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000203270ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi conflicting-rename/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000217530ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } conflicting-rename/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000210650ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : conflicting-rename/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000202040ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- conflicting-rename/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000201550ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END conflicting-rename/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000201770ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } conflicting-rename/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000204250ustar 00000000000000b1de801fb89c4e6451fa593b22c5d5c7d440916b conflicting-rename/.git/description000064400000000000000000000001111046102023000160340ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. conflicting-rename/.git/logs000075500000000000000000000000001046102023000144625ustar 00000000000000conflicting-rename/.git/logs/refs000075500000000000000000000000001046102023000154215ustar 00000000000000conflicting-rename/.git/logs/refs/heads000075500000000000000000000000001046102023000165055ustar 00000000000000conflicting-rename/.git/logs/refs/heads/B000064400000000000000000000005301046102023000166660ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 82426bf4e159da8e9a6c5a34773b5863e35acb0d committer 946771200 +0000 commit: changed all content, renamed a -> a-different conflicting-rename/.git/logs/refs/heads/main000064400000000000000000000002371046102023000174350ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original conflicting-rename/.git/logs/refs/heads/A000064400000000000000000000005261046102023000166720ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc beb102ac2dffaede3cb6e968466fe50a7cb4d7aa committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed conflicting-rename/.git/logs/HEAD000064400000000000000000000015261046102023000151710ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original 81a81b561f72d779aefb47ab475c363fbb8bb6bc 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from main to A 81a81b561f72d779aefb47ab475c363fbb8bb6bc beb102ac2dffaede3cb6e968466fe50a7cb4d7aa committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed beb102ac2dffaede3cb6e968466fe50a7cb4d7aa 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from A to B 81a81b561f72d779aefb47ab475c363fbb8bb6bc 82426bf4e159da8e9a6c5a34773b5863e35acb0d committer 946771200 +0000 commit: changed all content, renamed a -> a-different conflicting-rename/.git/info000075500000000000000000000000001046102023000144515ustar 00000000000000conflicting-rename/.git/info/exclude000064400000000000000000000003601046102023000161030ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ conflicting-rename/.git/HEAD000064400000000000000000000000221046102023000142130ustar 00000000000000ref: refs/heads/B conflicting-rename/.git/conflicting-rename-A-B.index000064400000000000000000000017101046102023000207260ustar 00000000000000DIRC  JX+p0a-different/sub/y.f⛲CK)wZS0a-different/sub/z⛲CK)wZS0 a-different/w JX+p0a-different/x.f JX+p a-renamed/sub/y.f⛲CK)wZS a-renamed/sub/z⛲CK)wZS a-renamed/w JX+p a-renamed/x.fDRCgG!8?ه a/sub/y.f⛲CK)wZSa/sub/z⛲CK)wZSa/wDRCgG!8?هa/x.f@GoBմY\zconflicting-rename/.git/objects000075500000000000000000000000001046102023000151475ustar 00000000000000conflicting-rename/.git/objects/8e000075500000000000000000000000001046102023000154635ustar 00000000000000conflicting-rename/.git/objects/8e/5b5c26ab5f2a824c123846adceaf811f538231000064400000000000000000000001111046102023000226500ustar 00000000000000x+)JMU03`040031QKcX䥨m̢?? JW1F7ŘIH} ̉9p1hu9Y~g.k=ACHcvad;#kʕL@{蕩>C8MU3/2RXconflicting-rename/.git/objects/2c000075500000000000000000000000001046102023000154535ustar 00000000000000conflicting-rename/.git/objects/2c/03c8a79fdd1f4f9f1b1ac71ad878a43bba87df000064400000000000000000000000641046102023000232530ustar 00000000000000x+)JMU06c01DݢԼ] o^>?7s#{U_tconflicting-rename/.git/objects/e6000075500000000000000000000000001046102023000154615ustar 00000000000000conflicting-rename/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000227650ustar 00000000000000xKOR0` conflicting-rename/.git/objects/b1000075500000000000000000000000001046102023000154515ustar 00000000000000conflicting-rename/.git/objects/b1/de801fb89c4e6451fa593b22c5d5c7d440916b000064400000000000000000000000661046102023000226720ustar 00000000000000x+)JMU0`01Dݔ̴ԢԼ] o^>?7s#{U%Qconflicting-rename/.git/objects/ba000075500000000000000000000000001046102023000155315ustar 00000000000000conflicting-rename/.git/objects/ba/185e921f848f2b5db2cad1312950f1283b8e34000064400000000000000000000000531046102023000225770ustar 00000000000000x+)JMU0`01DUх%S$h&x?5 conflicting-rename/.git/objects/ba/60ed76e9e04b8fce99f3810cad83bfbdb678db000064400000000000000000000001471046102023000233510ustar 00000000000000x+)JMU4`01$?ޓ*b{ce󂏆f&& >5gnuQ7= Kc""St/-.i 7(:conflicting-rename/.git/objects/info000075500000000000000000000000001046102023000161025ustar 00000000000000conflicting-rename/.git/objects/44000075500000000000000000000000001046102023000153765ustar 00000000000000conflicting-rename/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000224270ustar 00000000000000xKOR0d/LK22222pSconflicting-rename/.git/objects/81000075500000000000000000000000001046102023000153775ustar 00000000000000conflicting-rename/.git/objects/81/a81b561f72d779aefb47ab475c363fbb8bb6bc000064400000000000000000000002001046102023000231060ustar 00000000000000xe B![z%\3ĠO(nf 3Zep00:&r^#Zd@'#Xx[ B}ltJW!QLίAܲۿ{^6BE7;conflicting-rename/.git/objects/19000075500000000000000000000000001046102023000154005ustar 00000000000000conflicting-rename/.git/objects/19/2f286cc1b77b16935a43b1bffe1084c93cb087000064400000000000000000000001461046102023000226110ustar 00000000000000x+)JMU4`01$ZM>Bnkϭon2440031Q(gx6M9{wk+qIODd^CB&/Eͷ mcyM%Lconflicting-rename/.git/objects/8a000075500000000000000000000000001046102023000154575ustar 00000000000000conflicting-rename/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000226150ustar 00000000000000xKOR04`02222(-Rconflicting-rename/.git/objects/pack000075500000000000000000000000001046102023000160655ustar 00000000000000conflicting-rename/.git/objects/18000075500000000000000000000000001046102023000153775ustar 00000000000000conflicting-rename/.git/objects/18/3e9720efcdfd28e76a01b6e11753301e86517f000064400000000000000000000001001046102023000225230ustar 00000000000000x+)JMU07a01Dݔ̴ԢԼ] o^>?7s#{U܆*HMM^w%conflicting-rename/.git/objects/ec000075500000000000000000000000001046102023000155365ustar 00000000000000conflicting-rename/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000226130ustar 00000000000000xKOR02d/LK222222}conflicting-rename/.git/objects/f5000075500000000000000000000000001046102023000154615ustar 00000000000000conflicting-rename/.git/objects/f5/21fe9111230b8e655e08bf9aa64d80b9cf1c5c000064400000000000000000000000651046102023000227470ustar 00000000000000x+)JMU0`01Dݔ̴ԢԼ ܲ kJ0]bm=Kconflicting-rename/.git/objects/fc000075500000000000000000000000001046102023000155375ustar 00000000000000conflicting-rename/.git/objects/fc/0f90c085de1b1a769f843ddffc01796ee770f1000064400000000000000000000001111046102023000230360ustar 00000000000000x+)JMU03`040031QKc""St/-.i @}4{kݚʣnz< conflicting-rename/.git/objects/e5000075500000000000000000000000001046102023000154605ustar 00000000000000conflicting-rename/.git/objects/e5/fcfa8380466dbf3f664f73229b8eb14933271f000064400000000000000000000000631046102023000226320ustar 00000000000000x+)JMU06c01DݢԼI}۫&G9oO͆v0 conflicting-rename/.git/objects/b4000075500000000000000000000000001046102023000154545ustar 00000000000000conflicting-rename/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000223510ustar 00000000000000xKOR04b022222/cconflicting-rename/.git/objects/be000075500000000000000000000000001046102023000155355ustar 00000000000000conflicting-rename/.git/objects/be/b102ac2dffaede3cb6e968466fe50a7cb4d7aa000064400000000000000000000002611046102023000234570ustar 00000000000000xe 0 S_%m >E/ sr/ϥ*No IL.i@$/YSb2wF#j `2#1B>b.( :[|s9A^&nZ*sǯh췫 Sm;hX^!OϩǻQ0conflicting-rename/.git/objects/9c000075500000000000000000000000001046102023000154625ustar 00000000000000conflicting-rename/.git/objects/9c/48b30d5e977c4991e9ba3894817253b0adc876000064400000000000000000000001111046102023000224760ustar 00000000000000x+)JMU03`040031QKcpa j1{5y+Zl bx6M9{wk+qIODUconflicting-rename/.git/objects/5f000075500000000000000000000000001046102023000154615ustar 00000000000000conflicting-rename/.git/objects/5f/648142ecb5c4c8ad6fe1dbcf60ed42c42932b9000064400000000000000000000001111046102023000231020ustar 00000000000000x+)JMU03`040031QKcxÒƆ'EƼ_$O];y*]lٛ.^s\WuГl2conflicting-rename/.git/objects/3b000075500000000000000000000000001046102023000154535ustar 00000000000000conflicting-rename/.git/objects/3b/76aa085b717495c060282da9b61b5d61df5a37000064400000000000000000000001471046102023000225250ustar 00000000000000x+)JMU4`01$9yxN|bJcQ' LL}4{kݚʣnz<*Yck.=IwWlG)Jconflicting-rename/.git/config000064400000000000000000000002111046102023000147570ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true conflicting-rename/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000212530ustar 00000000000000ba185e921f848f2b5db2cad1312950f1283b8e34 conflicting-rename/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000204250ustar 000000000000002c03c8a79fdd1f4f9f1b1ac71ad878a43bba87df conflicting-rename/a-different000075500000000000000000000000001046102023000150415ustar 00000000000000conflicting-rename/a-different/w000064400000000000000000000000001046102023000152770ustar 00000000000000conflicting-rename/a-different/x.f000064400000000000000000000000251046102023000155330ustar 00000000000000original 1 2 3 4 5 6 conflicting-rename/a-different/sub000075500000000000000000000000001046102023000156325ustar 00000000000000conflicting-rename/a-different/sub/z000064400000000000000000000000001046102023000160730ustar 00000000000000conflicting-rename/a-different/sub/y.f000064400000000000000000000000251046102023000163250ustar 00000000000000original 1 2 3 4 5 6 super-1000075500000000000000000000000001046102023000104055ustar 00000000000000super-1/A-B.merge-info000064400000000000000000000023601046102023000127760ustar 0000000000000033e7ac1e29ff2c3b6930330cf360c4b033f7b509100644 3fd312e42671d4107294830fb0b0bc24c44e6cdf 1 five100644 87bf36fd7b36b899e0af9e82dc033442d9e997a7 2 four100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 3 four100644 73fa03215520024089ba0ead656d5133fd394f67 1 one100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 2 six100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 3 six100644 4265bf0d4252580fb95fc4ef0bbb47c1d1a9831d 1 three100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 2 two100644 87bf36fd7b36b899e0af9e82dc033442d9e997a7 3 two3fivesixfourCONFLICT (rename/rename)CONFLICT (rename/rename): five renamed to six in A and to four in B. 1fourAuto-mergingAuto-merging four 1fourCONFLICT (contents)CONFLICT (add/add): Merge conflict in four 1oneAuto-mergingAuto-merging one 3onetwosixCONFLICT (rename/rename)CONFLICT (rename/rename): one renamed to two in A and to six in B. 1sixAuto-mergingAuto-merging six 1sixCONFLICT (contents)CONFLICT (add/add): Merge conflict in six 1threeAuto-mergingAuto-merging three 3threefourtwoCONFLICT (rename/rename)CONFLICT (rename/rename): three renamed to four in A and to two in B. 1twoAuto-mergingAuto-merging two 1twoCONFLICT (contents)CONFLICT (add/add): Merge conflict in two super-1/five000064400000000000000000000000331046102023000113340ustar 0000000000000051 52 53 54 55 56 57 58 59 super-1/A-B-reversed.merge-info000064400000000000000000000023601046102023000146130ustar 000000000000005a4d169474dca3b0485cc1d265f61578f86ba612100644 3fd312e42671d4107294830fb0b0bc24c44e6cdf 1 five100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 2 four100644 2dba4ddecd865f7ca4e7588fe9ee8ac2fc4a1f91 3 four100644 73fa03215520024089ba0ead656d5133fd394f67 1 one100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 2 six100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 3 six100644 4265bf0d4252580fb95fc4ef0bbb47c1d1a9831d 1 three100644 2dba4ddecd865f7ca4e7588fe9ee8ac2fc4a1f91 2 two100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 3 two3fivefoursixCONFLICT (rename/rename)CONFLICT (rename/rename): five renamed to four in B and to six in A. 1fourAuto-mergingAuto-merging four 1fourCONFLICT (contents)CONFLICT (add/add): Merge conflict in four 1oneAuto-mergingAuto-merging one 3onesixtwoCONFLICT (rename/rename)CONFLICT (rename/rename): one renamed to six in B and to two in A. 1sixAuto-mergingAuto-merging six 1sixCONFLICT (contents)CONFLICT (add/add): Merge conflict in six 1threeAuto-mergingAuto-merging three 3threetwofourCONFLICT (rename/rename)CONFLICT (rename/rename): three renamed to two in B and to four in A. 1twoAuto-mergingAuto-merging two 1twoCONFLICT (contents)CONFLICT (add/add): Merge conflict in two super-1/.git000075500000000000000000000000001046102023000112465ustar 00000000000000super-1/.git/COMMIT_EDITMSG000064400000000000000000000000021046102023000134040ustar 00000000000000B super-1/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000170030ustar 00000000000000526ba25c6497b70498b39b97332ba76b3f201f0e super-1/.git/index000064400000000000000000000004311046102023000123550ustar 00000000000000DIRCd$@Ȑ+Jc_pܰfour?^G ;_"ʻx/sixAxg{NJ~twoTREE3 0 KW3&rJaCC]Ul&ȇsuper-1/.git/refs000075500000000000000000000000001046102023000122055ustar 00000000000000super-1/.git/refs/tags000075500000000000000000000000001046102023000131435ustar 00000000000000super-1/.git/refs/heads000075500000000000000000000000001046102023000132715ustar 00000000000000super-1/.git/refs/heads/B000064400000000000000000000000511046102023000134500ustar 00000000000000339e8dc8898e2aeff47d784e3d720403ff27522e super-1/.git/refs/heads/main000064400000000000000000000000511046102023000142130ustar 00000000000000552585225d229a53ebeb45a9d66c9fac0a8b218a super-1/.git/refs/heads/A000064400000000000000000000000511046102023000134470ustar 000000000000006c126fbbd60926788afcd30c446e5173a46b166e super-1/.git/hooks000075500000000000000000000000001046102023000123715ustar 00000000000000super-1/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000170700ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 super-1/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000154270ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 super-1/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000166100ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : super-1/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000170270ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : super-1/.git/hooks/post-update.sample000075500000000000000000000002751046102023000161270ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info super-1/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000173730ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi super-1/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000160570ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi super-1/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000175030ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } super-1/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000166150ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : super-1/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000157340ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- super-1/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000157050ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END super-1/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000157270ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } super-1/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000161550ustar 00000000000000f64b1a04579c823326a072bca88f4a6143868543 super-1/.git/description000064400000000000000000000001111046102023000135640ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. super-1/.git/logs000075500000000000000000000000001046102023000122125ustar 00000000000000super-1/.git/logs/refs000075500000000000000000000000001046102023000131515ustar 00000000000000super-1/.git/logs/refs/heads000075500000000000000000000000001046102023000142355ustar 00000000000000super-1/.git/logs/refs/heads/B000064400000000000000000000004561046102023000144250ustar 000000000000000000000000000000000000000000000000000000 552585225d229a53ebeb45a9d66c9fac0a8b218a committer 1112911993 -0700 branch: Created from main 552585225d229a53ebeb45a9d66c9fac0a8b218a 339e8dc8898e2aeff47d784e3d720403ff27522e committer 1112912113 -0700 commit: B super-1/.git/logs/refs/heads/main000064400000000000000000000002311046102023000151570ustar 000000000000000000000000000000000000000000000000000000 552585225d229a53ebeb45a9d66c9fac0a8b218a committer 1112911993 -0700 commit (initial): O super-1/.git/logs/refs/heads/A000064400000000000000000000004561046102023000144240ustar 000000000000000000000000000000000000000000000000000000 552585225d229a53ebeb45a9d66c9fac0a8b218a committer 1112911993 -0700 branch: Created from main 552585225d229a53ebeb45a9d66c9fac0a8b218a 6c126fbbd60926788afcd30c446e5173a46b166e committer 1112912053 -0700 commit: A super-1/.git/logs/HEAD000064400000000000000000000016421046102023000127200ustar 000000000000000000000000000000000000000000000000000000 552585225d229a53ebeb45a9d66c9fac0a8b218a committer 1112911993 -0700 commit (initial): O 552585225d229a53ebeb45a9d66c9fac0a8b218a 552585225d229a53ebeb45a9d66c9fac0a8b218a committer 1112911993 -0700 checkout: moving from main to A 552585225d229a53ebeb45a9d66c9fac0a8b218a 6c126fbbd60926788afcd30c446e5173a46b166e committer 1112912053 -0700 commit: A 6c126fbbd60926788afcd30c446e5173a46b166e 552585225d229a53ebeb45a9d66c9fac0a8b218a committer 1112912053 -0700 checkout: moving from A to B 552585225d229a53ebeb45a9d66c9fac0a8b218a 339e8dc8898e2aeff47d784e3d720403ff27522e committer 1112912113 -0700 commit: B 339e8dc8898e2aeff47d784e3d720403ff27522e 552585225d229a53ebeb45a9d66c9fac0a8b218a committer 946771200 +0000 checkout: moving from B to main super-1/.git/info000075500000000000000000000000001046102023000122015ustar 00000000000000super-1/.git/info/exclude000064400000000000000000000003601046102023000136330ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ super-1/.git/HEAD000064400000000000000000000000251046102023000117460ustar 00000000000000ref: refs/heads/main super-1/.git/objects000075500000000000000000000000001046102023000126775ustar 00000000000000super-1/.git/objects/49000075500000000000000000000000001046102023000131335ustar 00000000000000super-1/.git/objects/49/2b9c2f08555694ae7eedb60dba0c800fce0ec0000064400000000000000000000001471046102023000206330ustar 00000000000000x+)JMU4a040031QH/-bHaT(qAm;gV01|Af]7 ;w"Ty/εUnIG~6i֢ ydG hDM[*super-1/.git/objects/41000075500000000000000000000000001046102023000131235ustar 00000000000000super-1/.git/objects/41/78ea6795c4c3e07b4e17e6a04aa49584b07ecd000064400000000000000000000000611046102023000204220ustar 00000000000000xKOR06f0626262626262622J/*fsuper-1/.git/objects/2d000075500000000000000000000000001046102023000132045ustar 00000000000000super-1/.git/objects/2d/ba4ddecd865f7ca4e7588fe9ee8ac2fc4a1f91000064400000000000000000000001111046102023000211550ustar 00000000000000x-A Ew.zR8 >ےӀF$фhF [㮵FR?s4\= super-1/.git/objects/f8000075500000000000000000000000001046102023000132145ustar 00000000000000super-1/.git/objects/f8/410220101c61314f0483512d01129f5cab1099000064400000000000000000000001211046102023000176260ustar 00000000000000x% 0DAϯ|@-%g,^!sq?#(e…"JhETQCy`'7' ^qWpD)|Ssuper-1/.git/objects/f8/e99715ef31772c904b1ee554958ab93aad00b6000064400000000000000000000001471046102023000203600ustar 00000000000000x+)JMU4a040031QH/-b8VaOD/ά`XLJq;R;T<[ Vf6]Y7Wk7H *super-1/.git/objects/e9000075500000000000000000000000001046102023000132145ustar 00000000000000super-1/.git/objects/e9/a427daa00aaafa3b041b35a5497e9d2a909046000064400000000000000000000001711046102023000204510ustar 00000000000000x=A 09/ITG. w<; 7 ydFEPZ|Q|hg(0a35XuحQ/ǽ׶,l`yqSno*super-1/.git/objects/f6000075500000000000000000000000001046102023000132125ustar 00000000000000super-1/.git/objects/f6/4b1a04579c823326a072bca88f4a6143868543000064400000000000000000000001471046102023000200440ustar 00000000000000x+)JMU4a040031QH/-bHaT(qAm;gV0~x-ڲ,^r)*super-1/.git/objects/fa000075500000000000000000000000001046102023000132655ustar 00000000000000super-1/.git/objects/fa/dac5e77087c55f2fd65144c367f1922a3b6ad9000064400000000000000000000001111046102023000205020ustar 00000000000000x%; DAw 'Q= ,YqnA %QAF5 E 'q7Fn~Wsuper-1/.git/objects/f7000075500000000000000000000000001046102023000132135ustar 00000000000000super-1/.git/objects/f7/3ab4ab0d16afb7d4b442be27ebf437d9dd17c7000064400000000000000000000001471046102023000207740ustar 00000000000000x=1 @D{gguU4G ,A} 5)Kk UH("jԠZ+ 878woC|75m?yGy2super-1/.git/objects/f0000075500000000000000000000000001046102023000132045ustar 00000000000000super-1/.git/objects/f0/95b15442c3580e8fd2ff831b19b7d2a4de26e9000064400000000000000000000001451046102023000204300ustar 00000000000000x=A 0DѮ)r'-Q\޾Y9?`ልnq3@Mawa+Y^Uǭ\ǿ EdP:Q} 3_ݮsuper-1/.git/objects/ea000075500000000000000000000000001046102023000132645ustar 00000000000000super-1/.git/objects/ea/7e98aa8abd3caa27e7ba91472f47479a43697f000064400000000000000000000000541046102023000206020ustar 00000000000000x 0L~֡FbwrdXbÎ'.|4~super-1/.git/objects/d4000075500000000000000000000000001046102023000132065ustar 00000000000000super-1/.git/objects/d4/e9fbf0fe1f1d1ba5e7e5b2054e3dea0b62637f000064400000000000000000000001461046102023000207710ustar 00000000000000x5= 0D)rd*Q,"~ ^1~gG\cᄍ3np;rxCH(!ԢjKFRsvssuper-1/.git/objects/90000075500000000000000000000000001046102023000131275ustar 00000000000000super-1/.git/objects/90/ed4116a9317c06db2cf5daa89869c96c95e5f4000064400000000000000000000001471046102023000204500ustar 00000000000000x+)JMU4a040031QH/-by[ f;貸*_Y`YZ)6Q9s*]Rnƪ6ԟ>9IJ(super-1/.git/objects/64000075500000000000000000000000001046102023000131305ustar 00000000000000super-1/.git/objects/64/012489f118cb4011c8902b4a635f70dcb0c0ca000064400000000000000000000000551046102023000202240ustar 00000000000000xAU{hGlFsɽ$+68P pRsuper-1/.git/objects/55000075500000000000000000000000001046102023000131305ustar 00000000000000super-1/.git/objects/55/2585225d229a53ebeb45a9d66c9fac0a8b218a000064400000000000000000000001711046102023000204150ustar 00000000000000xA 0E]sef&xL`<EZʭ>f#M<0HԈՋJ5Š~eͥ_k7{)2x8bDtukbwq/4Dsuper-1/.git/objects/52000075500000000000000000000000001046102023000131255ustar 00000000000000super-1/.git/objects/52/6ba25c6497b70498b39b97332ba76b3f201f0e000064400000000000000000000001471046102023000202040ustar 00000000000000x+)JMU4c040031QH,Ke,D@єf ˹Ke(Ŭйomjn_KttI8NA;㏼~fYK%super-1/.git/objects/6c000075500000000000000000000000001046102023000132075ustar 00000000000000super-1/.git/objects/6c/126fbbd60926788afcd30c446e5173a46b166e000064400000000000000000000002251046102023000203420ustar 00000000000000xQ 0D)rewMPDM([BoAOcIK) aת#!OfΪQb$! Ͻ[ڽyfDDɦUrؚ&8Fuh7OԲ쐖rH= nKsͪ?cwv/B_super-1/.git/objects/5b000075500000000000000000000000001046102023000132055ustar 00000000000000super-1/.git/objects/5b/4b5820ab006542571a24fcf1f435b8abff02bb000064400000000000000000000001261046102023000204430ustar 00000000000000x-A s;RAEPZt6Ĺh@Tp'pFv]`{|z6H[#O3super-1/.git/objects/3f000075500000000000000000000000001046102023000132075ustar 00000000000000super-1/.git/objects/3f/d312e42671d4107294830fb0b0bc24c44e6cdf000064400000000000000000000000531046102023000203130ustar 00000000000000xKOR02g0525252525252522N=super-1/.git/objects/info000075500000000000000000000000001046102023000136325ustar 00000000000000super-1/.git/objects/88000075500000000000000000000000001046102023000131365ustar 00000000000000super-1/.git/objects/88/c32547b2da8f7cc34436a87168e414a7f9f48f000064400000000000000000000001651046102023000203150ustar 00000000000000x5A 0D)r1lA"(]R =&l96X 1atwUN ,νܚOni5( C=PD#vV.j*\super-1/.git/objects/86000075500000000000000000000000001046102023000131345ustar 00000000000000super-1/.git/objects/86/f163e62b748575d77bb94b3975b3fd358541f6000064400000000000000000000001261046102023000201610ustar 00000000000000x-A s;RAEPZt6Ĺh@Tp'pF_K}5jtVYb}wOsuper-1/.git/objects/10000075500000000000000000000000001046102023000131175ustar 00000000000000super-1/.git/objects/10/21cf5494849f3990c455d171456d3ca02a9239000064400000000000000000000001111046102023000177550ustar 00000000000000x%; DAw 'Q= ,Yqn g\q wےӀF$фhF [5S={CR?]k}_super-1/.git/objects/73000075500000000000000000000000001046102023000131305ustar 00000000000000super-1/.git/objects/73/fa03215520024089ba0ead656d5133fd394f67000064400000000000000000000000531046102023000201020ustar 00000000000000xKOR02g0424242424242422~2super-1/.git/objects/42000075500000000000000000000000001046102023000131245ustar 00000000000000super-1/.git/objects/42/65bf0d4252580fb95fc4ef0bbb47c1d1a9831d000064400000000000000000000000531046102023000204660ustar 00000000000000xKOR02g0626262626262622@+super-1/.git/objects/pack000075500000000000000000000000001046102023000136155ustar 00000000000000super-1/.git/objects/4b000075500000000000000000000000001046102023000132045ustar 00000000000000super-1/.git/objects/4b/5599c7c2ed4390417d9699bec86144a386873d000064400000000000000000000000541046102023000201620ustar 00000000000000xAU#6d#Yذ 7-super-1/.git/objects/e3000075500000000000000000000000001046102023000132065ustar 00000000000000super-1/.git/objects/e3/3f5e94470d3b5fa0220ff6a9cabb78a3f72fa3000064400000000000000000000000561046102023000206340ustar 00000000000000xAU#6dAb`Î'.super-1/.git/objects/fc000075500000000000000000000000001046102023000132675ustar 00000000000000super-1/.git/objects/fc/316949efe6001c9993bad8a2471cc256dd9d91000064400000000000000000000000551046102023000204400ustar 00000000000000x 0L~֡FbwrXbÎ'.ܔsuper-1/.git/objects/ad000075500000000000000000000000001046102023000132635ustar 00000000000000super-1/.git/objects/ad/b642fdd3e3c3d6bc42f96e515ca94b60d27a47000064400000000000000000000001221046102023000206300ustar 00000000000000x% 0DAϯ|@-%g,^!sq?#(e‰^qWpD)"JhETQC9pfsuper-1/.git/objects/33000075500000000000000000000000001046102023000131245ustar 00000000000000super-1/.git/objects/33/9e8dc8898e2aeff47d784e3d720403ff27522e000064400000000000000000000002251046102023000203740ustar 00000000000000xA 0E]23 o2LQ߂KWe®U3'Ii!bYJ0)Uݛg&Lą( w-,i0G,0yG;mvY?'vgBsuper-1/.git/objects/33/e7ac1e29ff2c3b6930330cf360c4b033f7b509000064400000000000000000000001471046102023000203240ustar 00000000000000x+)JMU4a040031QH/-b(ܰ(b]O?/ά`P<2e# ]smhMJ3|ڲWl+[b~qM)Ksuper-1/.git/objects/5a000075500000000000000000000000001046102023000132045ustar 00000000000000super-1/.git/objects/5a/4d169474dca3b0485cc1d265f61578f86ba612000064400000000000000000000001471046102023000202650ustar 00000000000000x+)JMU4a040031QH/-bK?g;)*_YGN8I:&T<ԍ!N#/o~i=J,.super-1/.git/objects/0e000075500000000000000000000000001046102023000132035ustar 00000000000000super-1/.git/objects/0e/e5d5ab05ab93834b7a6c1554dabc28c8e38223000064400000000000000000000001461046102023000204660ustar 00000000000000x+)JMU4a040031QH/-bH\xƮEY}5| T8#L?Ks.3% b^tSubQ$super-1/.git/objects/61000075500000000000000000000000001046102023000131255ustar 00000000000000super-1/.git/objects/61/aceb3398ba70dd19d740ee5bf4abd55940cf74000064400000000000000000000001701046102023000206360ustar 00000000000000x5A 0D)rh-QB y[quug-FjP:PO[q\9+Vc3XG cʿ+m[&睛=~RnO7*\super-1/.git/config000064400000000000000000000002111046102023000125070ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true super-1/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000170030ustar 00000000000000526ba25c6497b70498b39b97332ba76b3f201f0e super-1/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000161550ustar 000000000000001a133b9895dfe02b4c0d905385ba14843ca503f6 super-1/A-B-diff3.merge-info000064400000000000000000000023601046102023000137670ustar 00000000000000f8e99715ef31772c904b1ee554958ab93aad00b6100644 3fd312e42671d4107294830fb0b0bc24c44e6cdf 1 five100644 5b4b5820ab006542571a24fcf1f435b8abff02bb 2 four100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 3 four100644 73fa03215520024089ba0ead656d5133fd394f67 1 one100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 2 six100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 3 six100644 4265bf0d4252580fb95fc4ef0bbb47c1d1a9831d 1 three100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 2 two100644 5b4b5820ab006542571a24fcf1f435b8abff02bb 3 two3fivesixfourCONFLICT (rename/rename)CONFLICT (rename/rename): five renamed to six in A and to four in B. 1fourAuto-mergingAuto-merging four 1fourCONFLICT (contents)CONFLICT (add/add): Merge conflict in four 1oneAuto-mergingAuto-merging one 3onetwosixCONFLICT (rename/rename)CONFLICT (rename/rename): one renamed to two in A and to six in B. 1sixAuto-mergingAuto-merging six 1sixCONFLICT (contents)CONFLICT (add/add): Merge conflict in six 1threeAuto-mergingAuto-merging three 3threefourtwoCONFLICT (rename/rename)CONFLICT (rename/rename): three renamed to four in A and to two in B. 1twoAuto-mergingAuto-merging two 1twoCONFLICT (contents)CONFLICT (add/add): Merge conflict in two super-1/one000064400000000000000000000000331046102023000111640ustar 0000000000000011 12 13 14 15 16 17 18 19 super-1/three000064400000000000000000000000331046102023000115120ustar 0000000000000031 32 33 34 35 36 37 38 39 super-1/A-B-diff3-reversed.merge-info000064400000000000000000000023601046102023000156040ustar 000000000000000ee5d5ab05ab93834b7a6c1554dabc28c8e38223100644 3fd312e42671d4107294830fb0b0bc24c44e6cdf 1 five100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 2 four100644 86f163e62b748575d77bb94b3975b3fd358541f6 3 four100644 73fa03215520024089ba0ead656d5133fd394f67 1 one100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 2 six100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 3 six100644 4265bf0d4252580fb95fc4ef0bbb47c1d1a9831d 1 three100644 86f163e62b748575d77bb94b3975b3fd358541f6 2 two100644 e33f5e94470d3b5fa0220ff6a9cabb78a3f72fa3 3 two3fivefoursixCONFLICT (rename/rename)CONFLICT (rename/rename): five renamed to four in B and to six in A. 1fourAuto-mergingAuto-merging four 1fourCONFLICT (contents)CONFLICT (add/add): Merge conflict in four 1oneAuto-mergingAuto-merging one 3onesixtwoCONFLICT (rename/rename)CONFLICT (rename/rename): one renamed to six in B and to two in A. 1sixAuto-mergingAuto-merging six 1sixCONFLICT (contents)CONFLICT (add/add): Merge conflict in six 1threeAuto-mergingAuto-merging three 3threetwofourCONFLICT (rename/rename)CONFLICT (rename/rename): three renamed to two in B and to four in A. 1twoAuto-mergingAuto-merging two 1twoCONFLICT (contents)CONFLICT (add/add): Merge conflict in two type-change-and-renamed000075500000000000000000000000001046102023000134665ustar 00000000000000type-change-and-renamed/A-B.merge-info000064400000000000000000000005011046102023000160520ustar 000000000000000743f93b12ce76d3f6983d7aca92ad3c731fae46120000 e29fa63dae4ccf0788897a7025da868083178fdf 1 link-renamed120000 e29fa63dae4ccf0788897a7025da868083178fdf 3 link-renamed1link-renamedCONFLICT (modify/delete)CONFLICT (modify/delete): link-renamed deleted in A and modified in B. Version B of link-renamed left in tree. type-change-and-renamed/A-B-reversed.merge-info000064400000000000000000000005011046102023000176670ustar 000000000000000743f93b12ce76d3f6983d7aca92ad3c731fae46120000 e29fa63dae4ccf0788897a7025da868083178fdf 1 link-renamed120000 e29fa63dae4ccf0788897a7025da868083178fdf 2 link-renamed1link-renamedCONFLICT (modify/delete)CONFLICT (modify/delete): link-renamed deleted in A and modified in B. Version B of link-renamed left in tree. type-change-and-renamed/.git000075500000000000000000000000001046102023000143275ustar 00000000000000type-change-and-renamed/.git/COMMIT_EDITMSG000064400000000000000000000000261046102023000164730ustar 00000000000000just renamed the link type-change-and-renamed/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000220640ustar 0000000000000018238613eab0dcb5aa2ffe85645eb58c5aab3023 type-change-and-renamed/.git/index000064400000000000000000000003631046102023000154420ustar 00000000000000DIRC⛲CK)wZSa/x.f⟦=Lzp%چ link-renamedTREE32 1 oZ6O-x(iDa1 0 0YDi/P>G޺type-change-and-renamed/.git/refs000075500000000000000000000000001046102023000152665ustar 00000000000000type-change-and-renamed/.git/refs/tags000075500000000000000000000000001046102023000162245ustar 00000000000000type-change-and-renamed/.git/refs/heads000075500000000000000000000000001046102023000163525ustar 00000000000000type-change-and-renamed/.git/refs/heads/B000064400000000000000000000000511046102023000165310ustar 000000000000009ad0ceab185a95fd19e01b4179c2d17525600b4c type-change-and-renamed/.git/refs/heads/main000064400000000000000000000000511046102023000172740ustar 00000000000000c46b9376c6283d4e4ce8197f49261278bc3b5931 type-change-and-renamed/.git/refs/heads/A000064400000000000000000000000511046102023000165300ustar 00000000000000cffc95d55f99c1826787019253a68b78802ea3f4 type-change-and-renamed/.git/hooks000075500000000000000000000000001046102023000154525ustar 00000000000000type-change-and-renamed/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000221510ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 type-change-and-renamed/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000205100ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 type-change-and-renamed/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000216710ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : type-change-and-renamed/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000221100ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : type-change-and-renamed/.git/hooks/post-update.sample000075500000000000000000000002751046102023000212100ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info type-change-and-renamed/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000224540ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi type-change-and-renamed/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000211400ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi type-change-and-renamed/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000225640ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } type-change-and-renamed/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000216760ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : type-change-and-renamed/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000210150ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- type-change-and-renamed/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000207660ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END type-change-and-renamed/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000210100ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } type-change-and-renamed/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000212360ustar 000000000000006f5a36f14fa2908ab92d7828dd69edc244cb19f6 type-change-and-renamed/.git/description000064400000000000000000000001111046102023000166450ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. type-change-and-renamed/.git/logs000075500000000000000000000000001046102023000152735ustar 00000000000000type-change-and-renamed/.git/logs/refs000075500000000000000000000000001046102023000162325ustar 00000000000000type-change-and-renamed/.git/logs/refs/heads000075500000000000000000000000001046102023000173165ustar 00000000000000type-change-and-renamed/.git/logs/refs/heads/B000064400000000000000000000005001046102023000174740ustar 000000000000000000000000000000000000000000000000000000 c46b9376c6283d4e4ce8197f49261278bc3b5931 committer 946771200 +0000 branch: Created from main c46b9376c6283d4e4ce8197f49261278bc3b5931 9ad0ceab185a95fd19e01b4179c2d17525600b4c committer 946771200 +0000 commit: just renamed the link type-change-and-renamed/.git/logs/refs/heads/main000064400000000000000000000002371046102023000202460ustar 000000000000000000000000000000000000000000000000000000 c46b9376c6283d4e4ce8197f49261278bc3b5931 committer 946771200 +0000 commit (initial): original type-change-and-renamed/.git/logs/refs/heads/A000064400000000000000000000005121046102023000174760ustar 000000000000000000000000000000000000000000000000000000 c46b9376c6283d4e4ce8197f49261278bc3b5931 committer 946771200 +0000 branch: Created from main c46b9376c6283d4e4ce8197f49261278bc3b5931 cffc95d55f99c1826787019253a68b78802ea3f4 committer 946771200 +0000 commit: link type-changed, file changed type-change-and-renamed/.git/logs/HEAD000064400000000000000000000014621046102023000160010ustar 000000000000000000000000000000000000000000000000000000 c46b9376c6283d4e4ce8197f49261278bc3b5931 committer 946771200 +0000 commit (initial): original c46b9376c6283d4e4ce8197f49261278bc3b5931 c46b9376c6283d4e4ce8197f49261278bc3b5931 committer 946771200 +0000 checkout: moving from main to A c46b9376c6283d4e4ce8197f49261278bc3b5931 cffc95d55f99c1826787019253a68b78802ea3f4 committer 946771200 +0000 commit: link type-changed, file changed cffc95d55f99c1826787019253a68b78802ea3f4 c46b9376c6283d4e4ce8197f49261278bc3b5931 committer 946771200 +0000 checkout: moving from A to B c46b9376c6283d4e4ce8197f49261278bc3b5931 9ad0ceab185a95fd19e01b4179c2d17525600b4c committer 946771200 +0000 commit: just renamed the link type-change-and-renamed/.git/info000075500000000000000000000000001046102023000152625ustar 00000000000000type-change-and-renamed/.git/info/exclude000064400000000000000000000003601046102023000167140ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ type-change-and-renamed/.git/HEAD000064400000000000000000000000221046102023000150240ustar 00000000000000ref: refs/heads/B type-change-and-renamed/.git/objects000075500000000000000000000000001046102023000157605ustar 00000000000000type-change-and-renamed/.git/objects/f8000075500000000000000000000000001046102023000162755ustar 00000000000000type-change-and-renamed/.git/objects/f8/9a08d1e226b9a319210641b63b07dcf0bd705f000064400000000000000000000000301046102023000233750ustar 00000000000000xKORd/,/type-change-and-renamed/.git/objects/e6000075500000000000000000000000001046102023000162725ustar 00000000000000type-change-and-renamed/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000235760ustar 00000000000000xKOR0` type-change-and-renamed/.git/objects/c4000075500000000000000000000000001046102023000162665ustar 00000000000000type-change-and-renamed/.git/objects/c4/6b9376c6283d4e4ce8197f49261278bc3b5931000064400000000000000000000001771046102023000232360ustar 00000000000000xeK 1D]$0\{401"x (ԣQ;(1Bm+5EGy8:LcFj#O\jzc_h A[~*67type-change-and-renamed/.git/objects/0a000075500000000000000000000000001046102023000162605ustar 00000000000000type-change-and-renamed/.git/objects/0a/f776a3cefb0c7523e7c11ef8ead521ee7056d4000064400000000000000000000001151046102023000237120ustar 00000000000000x+)JMU03`01DX>ӟL](de3qŒl۬|[]type-change-and-renamed/.git/objects/30000075500000000000000000000000001046102023000162025ustar 00000000000000type-change-and-renamed/.git/objects/30/93b004f2c7e18059f5ce02fc8ea0029b441aae000064400000000000000000000000601046102023000234500ustar 00000000000000x+)JMU06d040031QKcx6M9{wk+qIODtype-change-and-renamed/.git/objects/info000075500000000000000000000000001046102023000167135ustar 00000000000000type-change-and-renamed/.git/objects/9a000075500000000000000000000000001046102023000162715ustar 00000000000000type-change-and-renamed/.git/objects/9a/d0ceab185a95fd19e01b4179c2d17525600b4c000064400000000000000000000002521046102023000234620ustar 00000000000000xej1 {S(kY%Ɓ>~C2L{?@} <:Iʊ5 JV 쵱[j8k\%T2*&^c#E%KqWx_r2#(1 4nq6l?:Ƿԭ8\*IKtype-change-and-renamed/.git/objects/07000075500000000000000000000000001046102023000162065ustar 00000000000000type-change-and-renamed/.git/objects/07/43f93b12ce76d3f6983d7aca92ad3c731fae46000064400000000000000000000001601046102023000235650ustar 00000000000000x+)JMU040`01DX>ӟL]LLr2~HmbIE6mw>-74k%榦0ӟL]%s2_f<{GgUꭶfbmype-change-and-renamed/.git/objects/cf000075500000000000000000000000001046102023000163505ustar 00000000000000type-change-and-renamed/.git/objects/cf/fc95d55f99c1826787019253a68b78802ea3f4000064400000000000000000000002551046102023000233230ustar 00000000000000xeˊ1D]+~TdWҷ+/O kS8P2c_ɺ+@:搝Z,ƠD䮱`݄Ϋ%*mr$:/&qc9&9^^vz<.2|GGoR۸}XN2fO7 rݞJ?^M(Mtype-change-and-renamed/.git/objects/e2000075500000000000000000000000001046102023000162665ustar 00000000000000type-change-and-renamed/.git/objects/e2/9fa63dae4ccf0788897a7025da868083178fdf000064400000000000000000000000241046102023000235320ustar 00000000000000xKOR0eHԯKNtype-change-and-renamed/.git/objects/6f000075500000000000000000000000001046102023000162735ustar 00000000000000type-change-and-renamed/.git/objects/6f/5a36f14fa2908ab92d7828dd69edc244cb19f6000064400000000000000000000001211046102023000235750ustar 00000000000000x+)JMU0`01DX>ӟL]%s2uRsSS_f<{GgUꭶf:dltype-change-and-renamed/.git/config000064400000000000000000000002111046102023000155700ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true type-change-and-renamed/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000220640ustar 0000000000000018238613eab0dcb5aa2ffe85645eb58c5aab3023 type-change-and-renamed/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000212360ustar 000000000000000af776a3cefb0c7523e7c11ef8ead521ee7056d4 type-change-and-renamed/link-renamed000075500000000000000000000000001046102023000166652a/x.fustar 00000000000000type-change-and-renamed/a000075500000000000000000000000001046102023000137065ustar 00000000000000type-change-and-renamed/a/x.f000064400000000000000000000000001046102023000143710ustar 00000000000000both-modify-file-with-binary-attr000075500000000000000000000000001046102023000154525ustar 00000000000000both-modify-file-with-binary-attr/A-B.merge-info000064400000000000000000000005041046102023000200410ustar 00000000000000bfe255b84031a8ffc6cda29bc412c3d1b174768f100644 7c1018a095be6ff9a395e131c79bee93a945946c 1 a/x.f100644 1bae97ae075022b4996c67823f268325704f0a83 2 a/x.f100644 3bee8263b3d40a765c9af5855c0833e5b4d01a78 3 a/x.f1a/x.fAuto-mergingAuto-merging a/x.f 1a/x.fCONFLICT (contents)CONFLICT (content): Merge conflict in a/x.f both-modify-file-with-binary-attr/A-B-reversed.merge-info000064400000000000000000000005041046102023000216560ustar 00000000000000fe91610a2afa5045602125832a3503399fff6af5100644 7c1018a095be6ff9a395e131c79bee93a945946c 1 a/x.f100644 3bee8263b3d40a765c9af5855c0833e5b4d01a78 2 a/x.f100644 1bae97ae075022b4996c67823f268325704f0a83 3 a/x.f1a/x.fAuto-mergingAuto-merging a/x.f 1a/x.fCONFLICT (contents)CONFLICT (content): Merge conflict in a/x.f both-modify-file-with-binary-attr/.git000075500000000000000000000000001046102023000163135ustar 00000000000000both-modify-file-with-binary-attr/.git/COMMIT_EDITMSG000064400000000000000000000000461046102023000204610ustar 00000000000000change pseudo-binary file differently both-modify-file-with-binary-attr/.git/index000064400000000000000000000002431046102023000174230ustar 00000000000000DIRCgU)ѻcgU)ѻc =M ;c v\\3xa/x.fTREE31 1 };SAá5].Lp䙇3a1 0 bbpg#+fsg ԕCoboth-modify-file-with-binary-attr/.git/refs000075500000000000000000000000001046102023000172525ustar 00000000000000both-modify-file-with-binary-attr/.git/refs/tags000075500000000000000000000000001046102023000202105ustar 00000000000000both-modify-file-with-binary-attr/.git/refs/heads000075500000000000000000000000001046102023000203365ustar 00000000000000both-modify-file-with-binary-attr/.git/refs/heads/B000064400000000000000000000000511046102023000205150ustar 0000000000000033c756dc1fbabe2353b6327d0ec546eb499689b6 both-modify-file-with-binary-attr/.git/refs/heads/main000064400000000000000000000000511046102023000212600ustar 000000000000005374cf2788f20d80c0f084fca5c56c924dda6bee both-modify-file-with-binary-attr/.git/refs/heads/A000064400000000000000000000000511046102023000205140ustar 000000000000009aa3a00ce07bbd339309bd1cda56cfab6ad39f89 both-modify-file-with-binary-attr/.git/hooks000075500000000000000000000000001046102023000174365ustar 00000000000000both-modify-file-with-binary-attr/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000241350ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 both-modify-file-with-binary-attr/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000224740ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 both-modify-file-with-binary-attr/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000236550ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : both-modify-file-with-binary-attr/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000240740ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : both-modify-file-with-binary-attr/.git/hooks/post-update.sample000075500000000000000000000002751046102023000231740ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info both-modify-file-with-binary-attr/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000244400ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi both-modify-file-with-binary-attr/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000231240ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi both-modify-file-with-binary-attr/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000245500ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } both-modify-file-with-binary-attr/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000236620ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : both-modify-file-with-binary-attr/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000230010ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- both-modify-file-with-binary-attr/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000227520ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END both-modify-file-with-binary-attr/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000227740ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } both-modify-file-with-binary-attr/.git/description000064400000000000000000000001111046102023000206310ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. both-modify-file-with-binary-attr/.git/logs000075500000000000000000000000001046102023000172575ustar 00000000000000both-modify-file-with-binary-attr/.git/logs/refs000075500000000000000000000000001046102023000202165ustar 00000000000000both-modify-file-with-binary-attr/.git/logs/refs/heads000075500000000000000000000000001046102023000213025ustar 00000000000000both-modify-file-with-binary-attr/.git/logs/refs/heads/B000064400000000000000000000005201046102023000214620ustar 000000000000000000000000000000000000000000000000000000 5374cf2788f20d80c0f084fca5c56c924dda6bee committer 946771200 +0000 branch: Created from main 5374cf2788f20d80c0f084fca5c56c924dda6bee 33c756dc1fbabe2353b6327d0ec546eb499689b6 committer 946771200 +0000 commit: change pseudo-binary file differently both-modify-file-with-binary-attr/.git/logs/refs/heads/main000064400000000000000000000002371046102023000222320ustar 000000000000000000000000000000000000000000000000000000 5374cf2788f20d80c0f084fca5c56c924dda6bee committer 946771200 +0000 commit (initial): original both-modify-file-with-binary-attr/.git/logs/refs/heads/A000064400000000000000000000005041046102023000214630ustar 000000000000000000000000000000000000000000000000000000 5374cf2788f20d80c0f084fca5c56c924dda6bee committer 946771200 +0000 branch: Created from main 5374cf2788f20d80c0f084fca5c56c924dda6bee 9aa3a00ce07bbd339309bd1cda56cfab6ad39f89 committer 946771200 +0000 commit: change pseudo-binary file both-modify-file-with-binary-attr/.git/logs/HEAD000064400000000000000000000014741046102023000177700ustar 000000000000000000000000000000000000000000000000000000 5374cf2788f20d80c0f084fca5c56c924dda6bee committer 946771200 +0000 commit (initial): original 5374cf2788f20d80c0f084fca5c56c924dda6bee 5374cf2788f20d80c0f084fca5c56c924dda6bee committer 946771200 +0000 checkout: moving from main to A 5374cf2788f20d80c0f084fca5c56c924dda6bee 9aa3a00ce07bbd339309bd1cda56cfab6ad39f89 committer 946771200 +0000 commit: change pseudo-binary file 9aa3a00ce07bbd339309bd1cda56cfab6ad39f89 5374cf2788f20d80c0f084fca5c56c924dda6bee committer 946771200 +0000 checkout: moving from A to B 5374cf2788f20d80c0f084fca5c56c924dda6bee 33c756dc1fbabe2353b6327d0ec546eb499689b6 committer 946771200 +0000 commit: change pseudo-binary file differently both-modify-file-with-binary-attr/.git/info000075500000000000000000000000001046102023000172465ustar 00000000000000both-modify-file-with-binary-attr/.git/info/exclude000064400000000000000000000003601046102023000207000ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ both-modify-file-with-binary-attr/.git/HEAD000064400000000000000000000000221046102023000170100ustar 00000000000000ref: refs/heads/B both-modify-file-with-binary-attr/.git/objects000075500000000000000000000000001046102023000177445ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/40000075500000000000000000000000001046102023000201675ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/40/1d8754cb542c5d97afe205e6278b94f3b73d21000064400000000000000000000000601046102023000253270ustar 00000000000000x+)JMU06d040031QKct=W~|J:,iboth-modify-file-with-binary-attr/.git/objects/71000075500000000000000000000000001046102023000201735ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/71/1ebedac2fabfa4ce9841042fac1eb8343365e1000064400000000000000000000000601046102023000257370ustar 00000000000000x+)JMU06d040031QKcX0u_SnJ)9both-modify-file-with-binary-attr/.git/objects/4f000075500000000000000000000000001046102023000202555ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/4f/706a540b235248a5946d50a531d0392b674075000064400000000000000000000000521046102023000247310ustar 00000000000000xKOR01cG.G̼ĢJ.[r Ah both-modify-file-with-binary-attr/.git/objects/1b000075500000000000000000000000001046102023000202465ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/1b/ae97ae075022b4996c67823f268325704f0a83000064400000000000000000000000301046102023000251040ustar 00000000000000xKORdpTHK,)both-modify-file-with-binary-attr/.git/objects/bf000075500000000000000000000000001046102023000203335ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/bf/e255b84031a8ffc6cda29bc412c3d1b174768f000064400000000000000000000000531046102023000256160ustar 00000000000000x+)JMU0`01D9n'x=^[0bؙ both-modify-file-with-binary-attr/.git/objects/90000075500000000000000000000000001046102023000201745ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/90/82dd83fde2bc0f53d476f8f262c3192937a247000064400000000000000000000000521046102023000253410ustar 00000000000000xKOR01c'.'̼ĢJ.[r A# both-modify-file-with-binary-attr/.git/objects/6d000075500000000000000000000000001046102023000202555ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/6d/dc44a84ee7e95966b6017bcda8fc647054b7d4000064400000000000000000000000541046102023000255700ustar 00000000000000x+)JMU0`01DB}ڿ G5r;LS both-modify-file-with-binary-attr/.git/objects/53000075500000000000000000000000001046102023000201735ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/53/74cf2788f20d80c0f084fca5c56c924dda6bee000064400000000000000000000002001046102023000256240ustar 00000000000000xeK 1D]$zīj`b$DPƅyEb-%w0ćDRޢQ m851pB_^||x/UN38$hQc_]ڲ?Lj˷}7both-modify-file-with-binary-attr/.git/objects/info000075500000000000000000000000001046102023000206775ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/9a000075500000000000000000000000001046102023000202555ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/9a/a3a00ce07bbd339309bd1cda56cfab6ad39f89000064400000000000000000000002551046102023000260330ustar 00000000000000xej0sS4Z!z :f`d穁CwjUEGNc'ɇ˹BRV.J. &/%l&+}qP5lZ.?~]ϲW}Z^ߚVK#cSyR0-\PoSKboth-modify-file-with-binary-attr/.git/objects/7c000075500000000000000000000000001046102023000202555ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/7c/1018a095be6ff9a395e131c79bee93a945946c000064400000000000000000000000331046102023000254250ustar 00000000000000xKOR04d/QHK,<"both-modify-file-with-binary-attr/.git/objects/7d000075500000000000000000000000001046102023000202565ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/7d/c33bc45341a8efa3c3a1355d2e4c70e4998733000064400000000000000000000000541046102023000254030ustar 00000000000000x+)JMU0`01D'WN|[ܕ4 }+hVboth-modify-file-with-binary-attr/.git/objects/pack000075500000000000000000000000001046102023000206625ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/fe000075500000000000000000000000001046102023000203365ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/fe/91610a2afa5045602125832a3503399fff6af5000064400000000000000000000000531046102023000252310ustar 00000000000000x+)JMU0`01D!:?b}=v[Eʠ both-modify-file-with-binary-attr/.git/objects/9c000075500000000000000000000000001046102023000202575ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/9c/4689c3b7604ae050096bad74e16108d16997c1000064400000000000000000000000571046102023000251770ustar 00000000000000x+)JMU06d040031QKc/ VX:%7`KtR both-modify-file-with-binary-attr/.git/objects/9d000075500000000000000000000000001046102023000202605ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/9d/3470a0ba2b9f1a10a22bd9a6c11ba195cf8941000064400000000000000000000000571046102023000255140ustar 00000000000000x+)JMU06d040031QKc^7}{Җ9Mjͪ\ both-modify-file-with-binary-attr/.git/objects/33000075500000000000000000000000001046102023000201715ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/33/cc893a75431c74563b2dd1c834eb38deafe84f000064400000000000000000000000541046102023000255540ustar 00000000000000x+)JMU0`01D& viϗX}sASw:= 6both-modify-file-with-binary-attr/.git/objects/33/c756dc1fbabe2353b6327d0ec546eb499689b6000064400000000000000000000002641046102023000255010ustar 00000000000000xej0{S=ڕ%C(yj@qhq| |0LP}Ԣ ! b/AS`.Drѹ@]1;m,ŷ9J^^u% mh-^t> qkz{Z>aAF4fSP8both-modify-file-with-binary-attr/.git/objects/03000075500000000000000000000000001046102023000201665ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/03/e4d4c8f6a38a62629b7067a2efbb23a9bc2bcb000064400000000000000000000000601046102023000256660ustar 00000000000000x+)JMU06d040031QKc~ה WY̬1O\both-modify-file-with-binary-attr/.git/objects/3b000075500000000000000000000000001046102023000202505ustar 00000000000000both-modify-file-with-binary-attr/.git/objects/3b/ee8263b3d40a765c9af5855c0833e5b4d01a78000064400000000000000000000000301046102023000253770ustar 00000000000000xKORdpRHK,)both-modify-file-with-binary-attr/.git/config000064400000000000000000000002111046102023000175540ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true both-modify-file-with-binary-attr/a000075500000000000000000000000001046102023000156725ustar 00000000000000both-modify-file-with-binary-attr/a/x.f000064400000000000000000000000111046102023000163570ustar 00000000000000B binary simple000075500000000000000000000000001046102023000104025ustar 00000000000000simple/side-1-2-various-conflicts-diff3.merge-info000064400000000000000000000015251046102023000203200ustar 00000000000000c94fc150aafabc649fd8bbb8feb3b73ae39f228c100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 2 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~side1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 2 whatever~side11greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers 2whatever~side1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from side1; moving it to whatever~side1 instead. 1whatever~side1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~side1 deleted in side2 and modified in side1. Version side1 of whatever~side1 left in tree. simple/Αυτά μου φαίνονται κινέζικα000064400000000000000000000000211046102023000323530ustar 00000000000000zero 1 2 3 4 5 6 simple/side-1-3-without-conflict-diff3.merge-info000064400000000000000000000000511046102023000201420ustar 00000000000000a4579c927a8fc104f6d8eedeaf18c3560e3363a3simple/single-content-conflict-reversed.merge-info000064400000000000000000000006061046102023000210020ustar 00000000000000267c413af85bbfaca0267fc719e52225ba87d3de100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 2 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 3 greeting1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers simple/.git000075500000000000000000000000001046102023000112435ustar 00000000000000simple/.git/resolve-side2-side1-with-ours.tree000064400000000000000000000000511046102023000176240ustar 000000000000003151988e28a0765bc1c7bfd94de7650619b075d0 simple/.git/COMMIT_EDITMSG000064400000000000000000000000201046102023000134010ustar 00000000000000Renamed numbers simple/.git/resolve-tweak1-side2-with-ancestor.tree000064400000000000000000000000511046102023000206410ustar 00000000000000a34baf4034c9f2f690ca6b26b799f9d4badbb8e2 simple/.git/index000064400000000000000000000005621046102023000123570ustar 00000000000000DIRC +t݌"greeting⛲CK)wZSwhatever/empty wf|XWtcܫ3Αυτά μου φαίνονται κινέζικαTREE:3 1 P³B?.whatever1 0 A|yZ55:ggӖόp$Un#"simple/.git/resolve-side2-tweak1-with-ours.tree000064400000000000000000000000511046102023000200130ustar 000000000000000bd7069fcc50c2b3d34285fd99f8e816cec23f2e simple/.git/refs000075500000000000000000000000001046102023000122025ustar 00000000000000simple/.git/refs/tags000075500000000000000000000000001046102023000131405ustar 00000000000000simple/.git/refs/heads000075500000000000000000000000001046102023000132665ustar 00000000000000simple/.git/refs/heads/unrelated000064400000000000000000000000511046102023000152470ustar 00000000000000e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c simple/.git/refs/heads/main000064400000000000000000000000511046102023000142100ustar 00000000000000b8f70c8124cce398e5ec255d7704f9be827fe178 simple/.git/refs/heads/tweak1000064400000000000000000000000511046102023000144600ustar 000000000000009c0e5177bb92038c5d78abcb144b9398417cf5ab simple/.git/refs/heads/side4000064400000000000000000000000511046102023000142740ustar 00000000000000e8ad12b03cafae65f93846f861e3cff749d803c6 simple/.git/refs/heads/side3000064400000000000000000000000511046102023000142730ustar 00000000000000d0d15aac124a3ec8b48d145c160d67c776b55c38 simple/.git/refs/heads/side2000064400000000000000000000000511046102023000142720ustar 00000000000000bac05a18a999e047be725b72ba2fba5a5c15a2b7 simple/.git/refs/heads/side1000064400000000000000000000000511046102023000142710ustar 0000000000000001b0ab9ec793698774e27548b9d0fd5f08806804 simple/.git/description000064400000000000000000000001111046102023000135610ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. simple/.git/resolve-tweak1-side2-with-ours.tree000064400000000000000000000000511046102023000200130ustar 0000000000000049bf5a5c5059d2946c6c1f6fe73bd7c614657ed4 simple/.git/logs000075500000000000000000000000001046102023000122075ustar 00000000000000simple/.git/logs/refs000075500000000000000000000000001046102023000131465ustar 00000000000000simple/.git/logs/refs/heads000075500000000000000000000000001046102023000142325ustar 00000000000000simple/.git/logs/refs/heads/unrelated000064400000000000000000000002441046102023000162170ustar 000000000000000000000000000000000000000000000000000000 e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c committer 1112912293 -0700 commit (initial): first-commit simple/.git/logs/refs/heads/main000064400000000000000000000002371046102023000151620ustar 000000000000000000000000000000000000000000000000000000 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112911993 -0700 commit (initial): initial simple/.git/logs/refs/heads/tweak1000064400000000000000000000004751046102023000154360ustar 000000000000000000000000000000000000000000000000000000 01b0ab9ec793698774e27548b9d0fd5f08806804 committer 1112912293 -0700 branch: Created from side1 01b0ab9ec793698774e27548b9d0fd5f08806804 9c0e5177bb92038c5d78abcb144b9398417cf5ab committer 1112912293 -0700 commit: Renamed numbers simple/.git/logs/refs/heads/side4000064400000000000000000000005101046102023000152400ustar 000000000000000000000000000000000000000000000000000000 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112911993 -0700 branch: Created from main b8f70c8124cce398e5ec255d7704f9be827fe178 e8ad12b03cafae65f93846f861e3cff749d803c6 committer 1112912233 -0700 commit: other-content-modifications simple/.git/logs/refs/heads/side3000064400000000000000000000004731046102023000152470ustar 000000000000000000000000000000000000000000000000000000 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112911993 -0700 branch: Created from main b8f70c8124cce398e5ec255d7704f9be827fe178 d0d15aac124a3ec8b48d145c160d67c776b55c38 committer 1112912173 -0700 commit: rename-numbers simple/.git/logs/refs/heads/side2000064400000000000000000000005001046102023000152350ustar 000000000000000000000000000000000000000000000000000000 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112911993 -0700 branch: Created from main b8f70c8124cce398e5ec255d7704f9be827fe178 bac05a18a999e047be725b72ba2fba5a5c15a2b7 committer 1112912113 -0700 commit: other-modifications simple/.git/logs/refs/heads/side1000064400000000000000000000004711046102023000152430ustar 000000000000000000000000000000000000000000000000000000 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112911993 -0700 branch: Created from main b8f70c8124cce398e5ec255d7704f9be827fe178 01b0ab9ec793698774e27548b9d0fd5f08806804 committer 1112912053 -0700 commit: modify-stuff simple/.git/logs/HEAD000064400000000000000000000036661046102023000127250ustar 000000000000000000000000000000000000000000000000000000 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112911993 -0700 commit (initial): initial b8f70c8124cce398e5ec255d7704f9be827fe178 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112911993 -0700 checkout: moving from main to side1 b8f70c8124cce398e5ec255d7704f9be827fe178 01b0ab9ec793698774e27548b9d0fd5f08806804 committer 1112912053 -0700 commit: modify-stuff 01b0ab9ec793698774e27548b9d0fd5f08806804 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112912053 -0700 checkout: moving from side1 to side2 b8f70c8124cce398e5ec255d7704f9be827fe178 bac05a18a999e047be725b72ba2fba5a5c15a2b7 committer 1112912113 -0700 commit: other-modifications bac05a18a999e047be725b72ba2fba5a5c15a2b7 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112912113 -0700 checkout: moving from side2 to side3 b8f70c8124cce398e5ec255d7704f9be827fe178 d0d15aac124a3ec8b48d145c160d67c776b55c38 committer 1112912173 -0700 commit: rename-numbers d0d15aac124a3ec8b48d145c160d67c776b55c38 b8f70c8124cce398e5ec255d7704f9be827fe178 committer 1112912173 -0700 checkout: moving from side3 to side4 b8f70c8124cce398e5ec255d7704f9be827fe178 e8ad12b03cafae65f93846f861e3cff749d803c6 committer 1112912233 -0700 commit: other-content-modifications 0000000000000000000000000000000000000000 e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c committer 1112912293 -0700 commit (initial): first-commit e8ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c 01b0ab9ec793698774e27548b9d0fd5f08806804 committer 1112912293 -0700 checkout: moving from unrelated to tweak1 01b0ab9ec793698774e27548b9d0fd5f08806804 9c0e5177bb92038c5d78abcb144b9398417cf5ab committer 1112912293 -0700 commit: Renamed numbers simple/.git/resolve-side1-side2-with-ancestor.tree000064400000000000000000000000511046102023000204520ustar 00000000000000e7b945e70d471073d262c420b41eb2490f92c41d simple/.git/info000075500000000000000000000000001046102023000121765ustar 00000000000000simple/.git/info/exclude000064400000000000000000000003601046102023000136300ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ simple/.git/HEAD000064400000000000000000000000271046102023000117450ustar 00000000000000ref: refs/heads/tweak1 simple/.git/objects000075500000000000000000000000001046102023000126745ustar 00000000000000simple/.git/objects/25000075500000000000000000000000001046102023000131225ustar 00000000000000simple/.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99000064400000000000000000000000231046102023000205020ustar 00000000000000xKOR0aHUBsimple/.git/objects/8e000075500000000000000000000000001046102023000132105ustar 00000000000000simple/.git/objects/8e/ec46003fa72b5153b91de1cfefe5603daed4dc000064400000000000000000000001641046102023000207650ustar 00000000000000x+)JMU040g040031QHK28Ͼ_r !Qw}+MJ-*fxa.ϐ0x䊻[,jM*)H,I-K-bP9qAȇS ].simple/.git/objects/7f000075500000000000000000000000001046102023000132105ustar 00000000000000simple/.git/objects/7f/7f7a98e623e55117e06e05c3b47e4adce3c447000064400000000000000000000002041046102023000204260ustar 00000000000000xKOR041`̔T#ܤԢb.PHH37HBWUjQ>(&fZx|˹5 U|۹֟{n@v*un'P`m@z׹\\F\\&\\f\C?Bsimple/.git/objects/2e000075500000000000000000000000001046102023000132025ustar 00000000000000simple/.git/objects/2e/3fad3310f5bf8c258de104f54ceea4267bd2e0000064400000000000000000000001641046102023000206210ustar 00000000000000x+)JMU040g040031QHK2VLrfR?jJsR8J묉_\L;J3KRRNEYSa߲Tt۟j-4simple/.git/objects/40000075500000000000000000000000001046102023000131175ustar 00000000000000simple/.git/objects/40/3af0093cbc06f63aa0823ff27760a0a4cab031000064400000000000000000000001641046102023000203450ustar 00000000000000x+)JMU040g040031QHK2\w63nqgΞ9To+MJ-*f|qɫ3Kst*)H,I-K-b;~gmVO}Sm /simple/.git/objects/49000075500000000000000000000000001046102023000131305ustar 00000000000000simple/.git/objects/49/2d8924a84c785871a4faa47884a30d75b16913000064400000000000000000000003041046102023000200550ustar 00000000000000x+)JMU04f040031QHK2/>W` [}?NByFbIjYjc (/LZ8x>7lCpSfoTطl=gP&o=rn¹=oU8vnn/P|㹝 v X{nun#C}}ՌgORuw"Sbsimple/.git/objects/49/bf5a5c5059d2946c6c1f6fe73bd7c614657ed4000064400000000000000000000002401046102023000204370ustar 00000000000000x+)JMU045d040031QHK2\w63nqgΞ9To)H,I-K-b;~gmVO}SmUsn-(snVm6[n7۩pn׹@]62ɒSUmIO}simple/.git/objects/41000075500000000000000000000000001046102023000131205ustar 00000000000000simple/.git/objects/41/7c01c8795a35b8e835113a85a5c0c1c77f67fb000064400000000000000000000000621046102023000202560ustar 00000000000000x+)JMU06f040031QH-(dx6M9{wk+qIOD6Tsimple/.git/objects/79000075500000000000000000000000001046102023000131335ustar 00000000000000simple/.git/objects/79/9ae51f245c30e3dc680693bc4d747745e584f7000064400000000000000000000000731046102023000202310ustar 00000000000000xKOR03a̔TCLPHH37HH粅|.;0simple/.git/objects/ce000075500000000000000000000000001046102023000132635ustar 00000000000000simple/.git/objects/ce/013625030ba8dba906f756967f9e9ca394464a000064400000000000000000000000251046102023000202640ustar 00000000000000xKOR0cHsimple/.git/objects/f8000075500000000000000000000000001046102023000132115ustar 00000000000000simple/.git/objects/f8/01a62deed900f8a80ff35e3339474ad6352a93000064400000000000000000000001701046102023000203400ustar 00000000000000xKOR044c̔T#ܤԢb..[J-粃lCsϷo9FܞsϷ*o;s{?(Ns = H:ːˈ˘˄˔ˌ *6simple/.git/objects/e7000075500000000000000000000000001046102023000132075ustar 00000000000000simple/.git/objects/e7/b945e70d471073d262c420b41eb2490f92c41d000064400000000000000000000001641046102023000201640ustar 00000000000000x+)JMU040g040031QHK2枬Eٌ.hηjJsR8J묉_\L;J3KRRTkl\焽vf|-simple/.git/objects/e7/6e7d0c4b5f92d5a82444d7ec00089e35a1c9e6000064400000000000000000000001641046102023000204300ustar 00000000000000x+)JMU040g040031QHK212s{شysOq+MJ-*fX䥨m̢?? *)H,I-K-bP9qAȇS 0+simple/.git/objects/c2000075500000000000000000000000001046102023000132005ustar 00000000000000simple/.git/objects/c2/465e206af9491829e524a2d3498f8bbdd255dc000064400000000000000000000001661046102023000203550ustar 00000000000000x+)JMU040c040031QHK28Ͼ_r !Qw}+MJ-*fxa.ϐ0x䊻[,jM61ĒԲ"Q;^ Z.=px}o-simple/.git/objects/c2/c67a6c7036d9eb87aa9dc9d5981f2614bea2b3000064400000000000000000000002411046102023000205630ustar 00000000000000x+)JMU045d040031QHK2^iܹM}JؐX3<#$,Ah!zNN ko&T͹[Ϸ[pnϹ[ηxn xn¹]v֞wq ?V3tf5i|Osimple/.git/objects/e8000075500000000000000000000000001046102023000132105ustar 00000000000000simple/.git/objects/e8/ce47b6a34b33ff6cb0c94b0dc05c6e32aa247c000064400000000000000000000001751046102023000207010ustar 00000000000000xK 1D]}0WI7"<#tEUzkp 1tP/(RHDx )`yWn;KogpyrSɢfK3?gldOyм9simple/.git/objects/e8/371f00609f33a59378dd2f6bb4385a7df8bd63000064400000000000000000000000341046102023000203520ustar 00000000000000xKOR04b022222/9simple/.git/objects/e8/ad12b03cafae65f93846f861e3cff749d803c6000064400000000000000000000002471046102023000206000ustar 00000000000000xA ^ ů1W1' v  &NJ-Y3A`eb@#=TlM>9Şt 3zX6:4%"|qɫ3K61ĒԲ"Q;^ Z.=px}o)05uř) b"Oꩰo{*`?ysimple/.git/objects/01/b0ab9ec793698774e27548b9d0fd5f08806804000064400000000000000000000002361046102023000201450ustar 00000000000000xA 0E]@e24 *dcKLAooAѥǥiDshUD'p<$!Yxe43%r[ӓ7hc>x!H$]]?<˃zc\Ic0u@~I?'VeIs~v^Gsimple/.git/objects/54000075500000000000000000000000001046102023000131245ustar 00000000000000simple/.git/objects/54/2802a799ded74fa01c47ba2f8925e284a369e2000064400000000000000000000001701046102023000202670ustar 00000000000000xKOR044clCsϷo9FܞsϷ*o;s{?(Ns = H:*( @83%*47)ːˈ˘˄˔ˌ 6simple/.git/objects/65000075500000000000000000000000001046102023000131265ustar 00000000000000simple/.git/objects/65/bc6a1e238f4bf05b28fd05240636e2cfb657e0000064400000000000000000000000411046102023000204010ustar 00000000000000xKOR04gJ-222222Vcsimple/.git/objects/info000075500000000000000000000000001046102023000136275ustar 00000000000000simple/.git/objects/31000075500000000000000000000000001046102023000131175ustar 00000000000000simple/.git/objects/31/51988e28a0765bc1c7bfd94de7650619b075d0000064400000000000000000000001661046102023000202120ustar 00000000000000x+)JMU040c040031QHK28Ͼ_r !Qw}+MJ-*f|qɫ3K61ĒԲ"Q;^ Z.=px}oo.Msimple/.git/objects/09000075500000000000000000000000001046102023000131245ustar 00000000000000simple/.git/objects/09/2bfb9bdf74dd8cfd22e812151281ee9aa6f01a000064400000000000000000000000221046102023000206210ustar 00000000000000xKOR0fsimple/.git/objects/09/c277aa66897c58157f57a374eacc63a407dcab000064400000000000000000000000361046102023000204260ustar 00000000000000xKOR04a02222226simple/.git/objects/26000075500000000000000000000000001046102023000131235ustar 00000000000000simple/.git/objects/26/7c413af85bbfaca0267fc719e52225ba87d3de000064400000000000000000000001641046102023000205520ustar 00000000000000x+)JMU040g040031QHK2j~g2k1NLɪ3 jJsR8J묉_\L;J3KRRNEYSa߲Tt۟`-simple/.git/objects/7e000075500000000000000000000000001046102023000132075ustar 00000000000000simple/.git/objects/7e/e0500b60d7a0682a8eee44369bb3df116054c7000064400000000000000000000002261046102023000203240ustar 00000000000000x+)JMU04`040031QHK2RVNr96?7C&3p*_Y!Zՙ%wVByFbIjYjc (/LZ8x>7̔TCpSfoTطl=gX?^simple/.git/objects/8a000075500000000000000000000000001046102023000132045ustar 00000000000000simple/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000203420ustar 00000000000000xKOR04`02222(-Rsimple/.git/objects/17000075500000000000000000000000001046102023000131235ustar 00000000000000simple/.git/objects/17/9c08bbeeb9ec3127b95dba77e422bbaede06d6000064400000000000000000000002311046102023000207670ustar 00000000000000x+)JMU04d040031QHK2\w63nqgΞ9To+MJ-*f""St/-.i @禖dM)Nex6M9{wk+qIODĒԲ"pSfoTطl=gXAHsimple/.git/objects/1a000075500000000000000000000000001046102023000131755ustar 00000000000000simple/.git/objects/1a/2664a9924754c698e323f756f9f87f3f2fb337000064400000000000000000000000511046102023000201560ustar 00000000000000xKOR01b̔T#|.[䲃!P simple/.git/objects/74000075500000000000000000000000001046102023000131265ustar 00000000000000simple/.git/objects/74/30e46a57b291f876bac22e03b2003e429a215c000064400000000000000000000000771046102023000201540ustar 00000000000000xKOR03elCLPHH37HH粅|.;P(LI5"C)simple/.git/objects/74/039b823957aa06c7f528bf5d7018315aca44cd000064400000000000000000000003051046102023000202520ustar 00000000000000x+)JMU04f040031QHK2^iܹM}JؐX33KRRkOTFxa*hպ鿡ԕ&f2l?6{¾ek?*=7|sk9|sϭ?s{T8Nsۀs~0.}w qƖ^L&"acsimple/.git/objects/87000075500000000000000000000000001046102023000131325ustar 00000000000000simple/.git/objects/87/7448693ced32f7ffdcfce007dff4a997b37784000064400000000000000000000000731046102023000205470ustar 00000000000000x+)JMU01b040031Q(M-KM)Nex6M9{wk+qIODÎ2simple/.git/objects/45000075500000000000000000000000001046102023000131245ustar 00000000000000simple/.git/objects/45/b983be36b73c0788dc9cbcb76cbb80fc7bb057000064400000000000000000000000221046102023000206410ustar 00000000000000xKOR0fsimple/.git/objects/7d000075500000000000000000000000001046102023000132065ustar 00000000000000simple/.git/objects/7d/e1f701fcb2d3057301d00945690d9325659871000064400000000000000000000000511046102023000177530ustar 00000000000000xKOR01b̔T|.[䲃!PT simple/.git/objects/7d/36f16dc4a79a397ceecf79247cc89d1735b9da000064400000000000000000000002041046102023000206070ustar 00000000000000xKOR041`lCsϷo9FܞsϷ*o;s{?(Ns = H:*(, -JsRl!ˀ3SR\F\\&\\f\ڃ?Bsimple/.git/objects/pack000075500000000000000000000000001046102023000136125ustar 00000000000000simple/.git/objects/c1000075500000000000000000000000001046102023000131775ustar 00000000000000simple/.git/objects/c1/1dc2169117c88621234eb6be9088487a4ede9b000064400000000000000000000000731046102023000202660ustar 00000000000000xKOR03a̔TCLPHH37HH粅|.;0simple/.git/objects/fe000075500000000000000000000000001046102023000132665ustar 00000000000000simple/.git/objects/fe/a400655ccdfdc4185f2bd380529ef53b7a4173000064400000000000000000000003041046102023000204670ustar 00000000000000x+)JMU04f040031QHK2J dol!=M vNcL @<#$,DeVK<^j LM]Iyjb!Cة?kz*[n3sϷo9FܞsϷ*o;s{?(Ns = H:c,kޝT91Wt-`~simple/.git/objects/c9000075500000000000000000000000001046102023000132075ustar 00000000000000simple/.git/objects/c9/4fc150aafabc649fd8bbb8feb3b73ae39f228c000064400000000000000000000002261046102023000211370ustar 00000000000000x+)JMU04`040031QHK2*g=W1x|'mߒrק-ߡjJsR8J묉_\L;M @<#$,DeVK<^j LM]qfJ!Cة?kz*[n3m?simple/.git/objects/c7000075500000000000000000000000001046102023000132055ustar 00000000000000simple/.git/objects/c7/92b7b783751ae40b0367fdbf44d08f575dd1e9000064400000000000000000000001641046102023000204340ustar 00000000000000x+)JMU040g040031QHK2RVNr96?7C&3p*_Y!Zՙ%wVCg$1Mٸ C {)vah.simple/.git/objects/e2000075500000000000000000000000001046102023000132025ustar 00000000000000simple/.git/objects/e2/a056b7cfbd041b1baec91bf06121859ec60d4c000064400000000000000000000000511046102023000206010ustar 00000000000000xKOR01b̔TCL.[粃 O simple/.git/objects/b4000075500000000000000000000000001046102023000132015ustar 00000000000000simple/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000200760ustar 00000000000000xKOR04b022222/csimple/.git/objects/d0000075500000000000000000000000001046102023000131775ustar 00000000000000simple/.git/objects/d0/d15aac124a3ec8b48d145c160d67c776b55c38000064400000000000000000000002361046102023000204030ustar 00000000000000xK 1D]H::`fo@ѥzTxֵЛv\0Ll|`def9fvAmd:ǂ#X,.E 6D;_צ?qzETyg 6tz2hN_3VÏL^zzHhsimple/.git/objects/a3000075500000000000000000000000001046102023000131775ustar 00000000000000simple/.git/objects/a3/4baf4034c9f2f690ca6b26b799f9d4badbb8e2000064400000000000000000000002411046102023000207160ustar 00000000000000x+)JMU045d040031QHK2sT] AՔg$1Mٸ C {)vä́97|sk9|sϭ?s{T8NsۀsB4ϼw.NG-3d"Nsimple/.git/objects/a4000075500000000000000000000000001046102023000132005ustar 00000000000000simple/.git/objects/a4/ae6e4709228b5da6001cb9d1cfa7736851e2a6000064400000000000000000000000551046102023000204050ustar 00000000000000xKOR01flCL.[粃̔T#.cP wsimple/.git/objects/a4/579c927a8fc104f6d8eedeaf18c3560e3363a3000064400000000000000000000001651046102023000205100ustar 00000000000000x+)JMU04`040031QHK2\w63nqgΞ9To)N-,MKNe""St/-.i @Քg$1l?6{¾ek?].simple/.git/objects/9c000075500000000000000000000000001046102023000132075ustar 00000000000000simple/.git/objects/9c/0e5177bb92038c5d78abcb144b9398417cf5ab000064400000000000000000000002411046102023000204200ustar 00000000000000xK 1]}Ii  ffxsimple/.git/objects/03000075500000000000000000000000001046102023000131165ustar 00000000000000simple/.git/objects/03/acf9ed3525e41ea20f83db841f5b5a7cdd5cdd000064400000000000000000000003041046102023000207620ustar 00000000000000x+)JMU04f040031QHK2sT] ByFbIjYjc (/LZ8x>7lCpSfoTطl=gP&o=rn¹=oU8vnn/P|㹝 v X{nun#C/qߥߩeq#TT_simple/.git/objects/57000075500000000000000000000000001046102023000131275ustar 00000000000000simple/.git/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6000064400000000000000000000000231046102023000205720ustar 00000000000000xKOR0aHJ,!3simple/.git/objects/68000075500000000000000000000000001046102023000131315ustar 00000000000000simple/.git/objects/68/7a00d2de0fcdf6aa42ccef1110b433f02de3db000064400000000000000000000001641046102023000207350ustar 00000000000000x+)JMU040g040031QHK2-~~/[+MJ-*f|qɫ3Kst*)H,I-K-b;~gmVO}Sm.2simple/.git/resolve-side1-side2-with-ours.tree000064400000000000000000000000511046102023000176240ustar 00000000000000403af0093cbc06f63aa0823ff27760a0a4cab031 simple/.git/config000064400000000000000000000002111046102023000125040ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true simple/.git/resolve-side2-side1-with-ancestor.tree000064400000000000000000000000511046102023000204520ustar 00000000000000c792b7b783751ae40b0367fdbf44d08f575dd1e9 simple/.git/resolve-side2-tweak1-with-ancestor.tree000064400000000000000000000000511046102023000206410ustar 00000000000000c2c67a6c7036d9eb87aa9dc9d5981f2614bea2b3 simple/side-1-3-without-conflict-reversed.merge-info000064400000000000000000000000511046102023000207660ustar 00000000000000a4579c927a8fc104f6d8eedeaf18c3560e3363a3simple/side-1-unrelated-diff3-reversed.merge-info000064400000000000000000000000511046102023000203000ustar 00000000000000179c08bbeeb9ec3127b95dba77e422bbaede06d6simple/single-content-conflict.merge-info000064400000000000000000000006061046102023000171650ustar 00000000000000687a00d2de0fcdf6aa42ccef1110b433f02de3db100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 2 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 3 greeting1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers simple/tweak1-side2.merge-info000064400000000000000000000026161046102023000146400ustar 0000000000000003acf9ed3525e41ea20f83db841f5b5a7cdd5cdd100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 2 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~tweak1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 2 whatever~tweak1100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 Αυτά μου φαίνονται κινέζικα100644 65bc6a1e238f4bf05b28fd05240636e2cfb657e0 2 Αυτά μου φαίνονται κινέζικα100644 e8371f00609f33a59378dd2f6bb4385a7df8bd63 3 Αυτά μου φαίνονται κινέζικα1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 2whatever~tweak1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from tweak1; moving it to whatever~tweak1 instead. 1whatever~tweak1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~tweak1 deleted in side2 and modified in tweak1. Version tweak1 of whatever~tweak1 left in tree. 1Αυτά μου φαίνονται κινέζικαAuto-mergingAuto-merging Αυτά μου φαίνονται κινέζικα 1Αυτά μου φαίνονται κινέζικαCONFLICT (contents)CONFLICT (content): Merge conflict in Αυτά μου φαίνονται κινέζικα simple/tweak1-side2-diff3-reversed.merge-info000064400000000000000000000026161046102023000174460ustar 00000000000000492d8924a84c785871a4faa47884a30d75b16913100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 2 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~tweak1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 3 whatever~tweak1100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 Αυτά μου φαίνονται κινέζικα100644 e8371f00609f33a59378dd2f6bb4385a7df8bd63 2 Αυτά μου φαίνονται κινέζικα100644 65bc6a1e238f4bf05b28fd05240636e2cfb657e0 3 Αυτά μου φαίνονται κινέζικα1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 2whatever~tweak1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from tweak1; moving it to whatever~tweak1 instead. 1whatever~tweak1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~tweak1 deleted in side2 and modified in tweak1. Version tweak1 of whatever~tweak1 left in tree. 1Αυτά μου φαίνονται κινέζικαAuto-mergingAuto-merging Αυτά μου φαίνονται κινέζικα 1Αυτά μου φαίνονται κινέζικαCONFLICT (contents)CONFLICT (content): Merge conflict in Αυτά μου φαίνονται κινέζικα simple/side-1-2-various-conflicts-reversed.merge-info000064400000000000000000000015251046102023000211440ustar 000000000000007ee0500b60d7a0682a8eee44369bb3df116054c7100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 2 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~side1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 3 whatever~side11greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers 2whatever~side1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from side1; moving it to whatever~side1 instead. 1whatever~side1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~side1 deleted in side2 and modified in side1. Version side1 of whatever~side1 left in tree. simple/side-1-unrelated-reversed.merge-info000064400000000000000000000000511046102023000173070ustar 00000000000000179c08bbeeb9ec3127b95dba77e422bbaede06d6simple/whatever000064400000000000000000000000041046102023000122230ustar 00000000000000bar simple/single-content-conflict-diff3-reversed.merge-info000064400000000000000000000006061046102023000217730ustar 000000000000002e3fad3310f5bf8c258de104f54ceea4267bd2e0100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 2 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 3 greeting1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers simple/tweak1-side2-diff3.merge-info000064400000000000000000000026161046102023000156310ustar 00000000000000fea400655ccdfdc4185f2bd380529ef53b7a4173100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 2 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~tweak1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 2 whatever~tweak1100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 Αυτά μου φαίνονται κινέζικα100644 65bc6a1e238f4bf05b28fd05240636e2cfb657e0 2 Αυτά μου φαίνονται κινέζικα100644 e8371f00609f33a59378dd2f6bb4385a7df8bd63 3 Αυτά μου φαίνονται κινέζικα1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 2whatever~tweak1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from tweak1; moving it to whatever~tweak1 instead. 1whatever~tweak1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~tweak1 deleted in side2 and modified in tweak1. Version tweak1 of whatever~tweak1 left in tree. 1Αυτά μου φαίνονται κινέζικαAuto-mergingAuto-merging Αυτά μου φαίνονται κινέζικα 1Αυτά μου φαίνονται κινέζικαCONFLICT (contents)CONFLICT (content): Merge conflict in Αυτά μου φαίνονται κινέζικα simple/side-1-3-without-conflict-diff3-reversed.merge-info000064400000000000000000000000511046102023000217570ustar 00000000000000a4579c927a8fc104f6d8eedeaf18c3560e3363a3simple/single-content-conflict-diff3.merge-info000064400000000000000000000006061046102023000201560ustar 000000000000009039d6f9207011fb9d51629b76f9132fd549fab5100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 2 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 3 greeting1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers simple/side-1-3-without-conflict.merge-info000064400000000000000000000000511046102023000171510ustar 00000000000000a4579c927a8fc104f6d8eedeaf18c3560e3363a3simple/no-change-reversed.merge-info000064400000000000000000000000511046102023000161030ustar 00000000000000e76e7d0c4b5f92d5a82444d7ec00089e35a1c9e6simple/fast-forward-reversed.merge-info000064400000000000000000000000511046102023000166430ustar 00000000000000693507a6da26d4799b9ab4d455f21a25d0afa05dsimple/side-1-2-various-conflicts.merge-info000064400000000000000000000015251046102023000173270ustar 00000000000000699215e88ad15d36aa120f23f20bad04d392d3cf100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 2 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~side1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 2 whatever~side11greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers 2whatever~side1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from side1; moving it to whatever~side1 instead. 1whatever~side1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~side1 deleted in side2 and modified in side1. Version side1 of whatever~side1 left in tree. simple/side-1-unrelated.merge-info000064400000000000000000000000511046102023000154720ustar 00000000000000179c08bbeeb9ec3127b95dba77e422bbaede06d6simple/no-change.merge-info000064400000000000000000000000511046102023000142660ustar 00000000000000e76e7d0c4b5f92d5a82444d7ec00089e35a1c9e6simple/side-1-unrelated-diff3.merge-info000064400000000000000000000000511046102023000164630ustar 00000000000000179c08bbeeb9ec3127b95dba77e422bbaede06d6simple/side-1-2-various-conflicts-diff3-reversed.merge-info000064400000000000000000000015251046102023000221350ustar 0000000000000001d037404f1e7eef4c95c70617f483eb898612db100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 2 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~side1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 3 whatever~side11greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 1numbersAuto-mergingAuto-merging numbers 2whatever~side1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from side1; moving it to whatever~side1 instead. 1whatever~side1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~side1 deleted in side2 and modified in side1. Version side1 of whatever~side1 left in tree. simple/tweak1-side2-reversed.merge-info000064400000000000000000000026161046102023000164550ustar 0000000000000074039b823957aa06c7f528bf5d7018315aca44cd100644 ce013625030ba8dba906f756967f9e9ca394464a 1 greeting100644 092bfb9bdf74dd8cfd22e812151281ee9aa6f01a 2 greeting100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 3 greeting100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 1 whatever~tweak1100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 3 whatever~tweak1100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 Αυτά μου φαίνονται κινέζικα100644 e8371f00609f33a59378dd2f6bb4385a7df8bd63 2 Αυτά μου φαίνονται κινέζικα100644 65bc6a1e238f4bf05b28fd05240636e2cfb657e0 3 Αυτά μου φαίνονται κινέζικα1greetingAuto-mergingAuto-merging greeting 1greetingCONFLICT (contents)CONFLICT (content): Merge conflict in greeting 2whatever~tweak1whateverCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of whatever from tweak1; moving it to whatever~tweak1 instead. 1whatever~tweak1CONFLICT (modify/delete)CONFLICT (modify/delete): whatever~tweak1 deleted in side2 and modified in tweak1. Version tweak1 of whatever~tweak1 left in tree. 1Αυτά μου φαίνονται κινέζικαAuto-mergingAuto-merging Αυτά μου φαίνονται κινέζικα 1Αυτά μου φαίνονται κινέζικαCONFLICT (contents)CONFLICT (content): Merge conflict in Αυτά μου φαίνονται κινέζικα simple/greeting000064400000000000000000000000031046102023000122010ustar 00000000000000hi simple/fast-forward.merge-info000064400000000000000000000000511046102023000150260ustar 00000000000000693507a6da26d4799b9ab4d455f21a25d0afa05drename-add-same-symlink000075500000000000000000000000001046102023000135155ustar 00000000000000rename-add-same-symlink/A-B.merge-info000064400000000000000000000000511046102023000161010ustar 00000000000000b6083502557e43acf33a843bce1f0bc348851d20rename-add-same-symlink/A-B-reversed.merge-info000064400000000000000000000000511046102023000177160ustar 00000000000000b6083502557e43acf33a843bce1f0bc348851d20rename-add-same-symlink/.git000075500000000000000000000000001046102023000143565ustar 00000000000000rename-add-same-symlink/.git/COMMIT_EDITMSG000064400000000000000000000000201046102023000165140ustar 00000000000000create link-new rename-add-same-symlink/.git/index000064400000000000000000000004311046102023000154650ustar 00000000000000DIRCgU gU  2e;Lue _Z/linkgU e8gU e8 2e;Lue _Z/link-newgUrgUr 2⛲CK)wZStargetTREE3 0 3_T$8[/Fh ]Fn#NNrename-add-same-symlink/.git/refs000075500000000000000000000000001046102023000153155ustar 00000000000000rename-add-same-symlink/.git/refs/tags000075500000000000000000000000001046102023000162535ustar 00000000000000rename-add-same-symlink/.git/refs/heads000075500000000000000000000000001046102023000164015ustar 00000000000000rename-add-same-symlink/.git/refs/heads/B000064400000000000000000000000511046102023000165600ustar 00000000000000cf7e0510d951edab8b3023e7979a3ecf8ae0e3a2 rename-add-same-symlink/.git/refs/heads/main000064400000000000000000000000511046102023000173230ustar 00000000000000a54e6e03e36f878778878f011418246014d9a0c0 rename-add-same-symlink/.git/refs/heads/A000064400000000000000000000000511046102023000165570ustar 00000000000000fa185d1df68d36f299d1be7ccebe85039459c0fa rename-add-same-symlink/.git/hooks000075500000000000000000000000001046102023000155015ustar 00000000000000rename-add-same-symlink/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000222000ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-add-same-symlink/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000205370ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-add-same-symlink/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000217200ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-add-same-symlink/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000221370ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-add-same-symlink/.git/hooks/post-update.sample000075500000000000000000000002751046102023000212370ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-add-same-symlink/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000225030ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-add-same-symlink/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000211670ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-add-same-symlink/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000226130ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-add-same-symlink/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000217250ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-add-same-symlink/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000210440ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-add-same-symlink/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000210150ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-add-same-symlink/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000210370ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-add-same-symlink/.git/description000064400000000000000000000001111046102023000166740ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-add-same-symlink/.git/logs000075500000000000000000000000001046102023000153225ustar 00000000000000rename-add-same-symlink/.git/logs/refs000075500000000000000000000000001046102023000162615ustar 00000000000000rename-add-same-symlink/.git/logs/refs/heads000075500000000000000000000000001046102023000173455ustar 00000000000000rename-add-same-symlink/.git/logs/refs/heads/B000064400000000000000000000004721046102023000175330ustar 000000000000000000000000000000000000000000000000000000 a54e6e03e36f878778878f011418246014d9a0c0 committer 946771200 +0000 branch: Created from main a54e6e03e36f878778878f011418246014d9a0c0 cf7e0510d951edab8b3023e7979a3ecf8ae0e3a2 committer 946771200 +0000 commit: create link-new rename-add-same-symlink/.git/logs/refs/heads/main000064400000000000000000000002371046102023000202750ustar 000000000000000000000000000000000000000000000000000000 a54e6e03e36f878778878f011418246014d9a0c0 committer 946771200 +0000 commit (initial): original rename-add-same-symlink/.git/logs/refs/heads/A000064400000000000000000000005021046102023000175240ustar 000000000000000000000000000000000000000000000000000000 a54e6e03e36f878778878f011418246014d9a0c0 committer 946771200 +0000 branch: Created from main a54e6e03e36f878778878f011418246014d9a0c0 fa185d1df68d36f299d1be7ccebe85039459c0fa committer 946771200 +0000 commit: rename link to link-new rename-add-same-symlink/.git/logs/HEAD000064400000000000000000000014441046102023000160300ustar 000000000000000000000000000000000000000000000000000000 a54e6e03e36f878778878f011418246014d9a0c0 committer 946771200 +0000 commit (initial): original a54e6e03e36f878778878f011418246014d9a0c0 a54e6e03e36f878778878f011418246014d9a0c0 committer 946771200 +0000 checkout: moving from main to A a54e6e03e36f878778878f011418246014d9a0c0 fa185d1df68d36f299d1be7ccebe85039459c0fa committer 946771200 +0000 commit: rename link to link-new fa185d1df68d36f299d1be7ccebe85039459c0fa a54e6e03e36f878778878f011418246014d9a0c0 committer 946771200 +0000 checkout: moving from A to B a54e6e03e36f878778878f011418246014d9a0c0 cf7e0510d951edab8b3023e7979a3ecf8ae0e3a2 committer 946771200 +0000 commit: create link-new rename-add-same-symlink/.git/info000075500000000000000000000000001046102023000153115ustar 00000000000000rename-add-same-symlink/.git/info/exclude000064400000000000000000000003601046102023000167430ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-add-same-symlink/.git/HEAD000064400000000000000000000000221046102023000150530ustar 00000000000000ref: refs/heads/B rename-add-same-symlink/.git/objects000075500000000000000000000000001046102023000160075ustar 00000000000000rename-add-same-symlink/.git/objects/1d000075500000000000000000000000001046102023000163135ustar 00000000000000rename-add-same-symlink/.git/objects/1d/e565933b05f74c75ff9a6520af5f9f8a5a2f1d000064400000000000000000000000251046102023000236240ustar 00000000000000xKOR0c(I,JO-X}rename-add-same-symlink/.git/objects/fa000075500000000000000000000000001046102023000163755ustar 00000000000000rename-add-same-symlink/.git/objects/fa/185d1df68d36f299d1be7ccebe85039459c0fa000064400000000000000000000002461046102023000237740ustar 00000000000000xe 0D=+.&IV(⯤qiD * RΪ輏ʔ@j3Gf+$I) %Fi>lq@]Œ&iÃ>S]u ,& -ouִw(\fԇybpHrename-add-same-symlink/.git/objects/e6000075500000000000000000000000001046102023000163215ustar 00000000000000rename-add-same-symlink/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000236250ustar 00000000000000xKOR0` rename-add-same-symlink/.git/objects/b6000075500000000000000000000000001046102023000163165ustar 00000000000000rename-add-same-symlink/.git/objects/b6/083502557e43acf33a843bce1f0bc348851d20000064400000000000000000000001271046102023000233470ustar 00000000000000x+)JMU07`042̼lݼr٧Y>~~WBIbQzj ófoxٻ[s]yԍCOz'5akrename-add-same-symlink/.git/objects/90000075500000000000000000000000001046102023000162375ustar 00000000000000rename-add-same-symlink/.git/objects/90/df1f4a27f3c1df554a9a341a4b94af9b955e2f000064400000000000000000000001231046102023000236710ustar 00000000000000x+)JMU03c042̼l٧Y>~~WBIbQzj ófoxٻ[s]yԍCOz'1rename-add-same-symlink/.git/objects/info000075500000000000000000000000001046102023000167425ustar 00000000000000rename-add-same-symlink/.git/objects/pack000075500000000000000000000000001046102023000167255ustar 00000000000000rename-add-same-symlink/.git/objects/cf000075500000000000000000000000001046102023000163775ustar 00000000000000rename-add-same-symlink/.git/objects/cf/7e0510d951edab8b3023e7979a3ecf8ae0e3a2000064400000000000000000000002431046102023000237420ustar 00000000000000xe 0D=+rel-WvŦ-!o@0ayRk}Y,jT#) Ec#SԩK IlReȎq~~W,n^j9v5f&& %E% >5gnuQ7= }+urename-add-same-symlink/.git/config000064400000000000000000000002111046102023000156170ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-add-same-symlink/link000075500000000000000000000000001046102023000156562targetustar 00000000000000rename-add-same-symlink/target000064400000000000000000000000001046102023000147730ustar 00000000000000rename-add-same-symlink/link-new000075500000000000000000000000001046102023000164452targetustar 00000000000000rename-add-symlink000075500000000000000000000000001046102023000125725ustar 00000000000000rename-add-symlink/A-B.merge-info000064400000000000000000000005341046102023000151640ustar 000000000000009c1f40262f357228d3e89f04c511aa2d7e868060120000 19102815663d23f8b75a47e7a01965dcdc96468c 2 bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 bar~B2barbar~BCONFLICT (distinct modes)CONFLICT (distinct types): bar had different types on each side; renamed one of them so each can be recorded somewhere. 1fooAuto-mergingAuto-merging foo rename-add-symlink/A-B-reversed.merge-info000064400000000000000000000005341046102023000170010ustar 000000000000009c1f40262f357228d3e89f04c511aa2d7e868060120000 19102815663d23f8b75a47e7a01965dcdc96468c 3 bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 bar~B2barbar~BCONFLICT (distinct modes)CONFLICT (distinct types): bar had different types on each side; renamed one of them so each can be recorded somewhere. 1fooAuto-mergingAuto-merging foo rename-add-symlink/.git000075500000000000000000000000001046102023000134335ustar 00000000000000rename-add-symlink/.git/COMMIT_EDITMSG000064400000000000000000000000221046102023000155730ustar 00000000000000rename foo to bar rename-add-symlink/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000211700ustar 000000000000004b825dc642cb6eb9a060e54bf8d69288fbee4904 rename-add-symlink/.git/index000064400000000000000000000001011046102023000145340ustar 00000000000000DIRCTREE0 0 K]Bn`K֒Ir?x}2Z76Frename-add-symlink/.git/refs000075500000000000000000000000001046102023000143725ustar 00000000000000rename-add-symlink/.git/refs/tags000075500000000000000000000000001046102023000153305ustar 00000000000000rename-add-symlink/.git/refs/heads000075500000000000000000000000001046102023000154565ustar 00000000000000rename-add-symlink/.git/refs/heads/B000064400000000000000000000000511046102023000156350ustar 000000000000002084a7daccbc3c1b906e6f20ba6c8efd188fa8ae rename-add-symlink/.git/refs/heads/main000064400000000000000000000000511046102023000164000ustar 00000000000000f93f0f31af52062323943046cecf524930cb346f rename-add-symlink/.git/refs/heads/A000064400000000000000000000000511046102023000156340ustar 00000000000000b65c25978715c1a1d2dfad9fb1da0a441df8db06 rename-add-symlink/.git/hooks000075500000000000000000000000001046102023000145565ustar 00000000000000rename-add-symlink/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000212550ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-add-symlink/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000176140ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-add-symlink/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000207750ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-add-symlink/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000212140ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-add-symlink/.git/hooks/post-update.sample000075500000000000000000000002751046102023000203140ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-add-symlink/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000215600ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-add-symlink/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000202440ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-add-symlink/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000216700ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-add-symlink/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000210020ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-add-symlink/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000201210ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-add-symlink/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000200720ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-add-symlink/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000201140ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-add-symlink/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000203420ustar 00000000000000bb25fd1d24d87470a30c3d7bd25ccb22f94bee05 rename-add-symlink/.git/description000064400000000000000000000001111046102023000157510ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-add-symlink/.git/logs000075500000000000000000000000001046102023000143775ustar 00000000000000rename-add-symlink/.git/logs/refs000075500000000000000000000000001046102023000153365ustar 00000000000000rename-add-symlink/.git/logs/refs/heads000075500000000000000000000000001046102023000164225ustar 00000000000000rename-add-symlink/.git/logs/refs/heads/B000064400000000000000000000004741046102023000166120ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 branch: Created from main f93f0f31af52062323943046cecf524930cb346f 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae committer 946771200 +0000 commit: rename foo to bar rename-add-symlink/.git/logs/refs/heads/main000064400000000000000000000002371046102023000173520ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 commit (initial): original rename-add-symlink/.git/logs/refs/heads/A000064400000000000000000000005061046102023000166050ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 branch: Created from main f93f0f31af52062323943046cecf524930cb346f b65c25978715c1a1d2dfad9fb1da0a441df8db06 committer 946771200 +0000 commit: Modify foo, add symlink bar rename-add-symlink/.git/logs/HEAD000064400000000000000000000014521046102023000151040ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 commit (initial): original f93f0f31af52062323943046cecf524930cb346f f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 checkout: moving from main to A f93f0f31af52062323943046cecf524930cb346f b65c25978715c1a1d2dfad9fb1da0a441df8db06 committer 946771200 +0000 commit: Modify foo, add symlink bar b65c25978715c1a1d2dfad9fb1da0a441df8db06 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 checkout: moving from A to B f93f0f31af52062323943046cecf524930cb346f 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae committer 946771200 +0000 commit: rename foo to bar rename-add-symlink/.git/info000075500000000000000000000000001046102023000143665ustar 00000000000000rename-add-symlink/.git/info/exclude000064400000000000000000000003601046102023000160200ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-add-symlink/.git/HEAD000064400000000000000000000000221046102023000141300ustar 00000000000000ref: refs/heads/B rename-add-symlink/.git/objects000075500000000000000000000000001046102023000150645ustar 00000000000000rename-add-symlink/.git/objects/f9000075500000000000000000000000001046102023000154025ustar 00000000000000rename-add-symlink/.git/objects/f9/3f0f31af52062323943046cecf524930cb346f000064400000000000000000000002001046102023000223460ustar 00000000000000xeK 1D]$0W鉭&FB2.+ [e]癭lL g`%^+~[I^\rGH({\qצ!hr-w^T6rename-add-symlink/.git/objects/b6000075500000000000000000000000001046102023000153735ustar 00000000000000rename-add-symlink/.git/objects/b6/5c25978715c1a1d2dfad9fb1da0a441df8db06000064400000000000000000000002571046102023000230160ustar 00000000000000xeAjC1 D)o(8J.CK8 kHI "[o IلrlYm !L.27 lSĈSA()UqCj1&w?ߺ6Og|v!>X`nrZ0ssKGrename-add-symlink/.git/objects/63000075500000000000000000000000001046102023000153145ustar 00000000000000rename-add-symlink/.git/objects/63/ab700fa28671450d699ed2fedfcb55734a9608000064400000000000000000000000601046102023000225340ustar 00000000000000x+)JMU06d040031QHJ,bxÒƆ'EƼ_$O];yMrename-add-symlink/.git/objects/98000075500000000000000000000000001046102023000153245ustar 00000000000000rename-add-symlink/.git/objects/98/5badfa7a966612b9f9adadbaa6a30aa3e0b1f5000064400000000000000000000000561046102023000232310ustar 00000000000000x+)JMU06d042"I 4[ۣܟ/Lsg[ Nrename-add-symlink/.git/objects/info000075500000000000000000000000001046102023000160175ustar 00000000000000rename-add-symlink/.git/objects/9a000075500000000000000000000000001046102023000153755ustar 00000000000000rename-add-symlink/.git/objects/9a/3f3ca4c14ceec9bfc49946d400af9c8521118f000064400000000000000000000001161046102023000227470ustar 00000000000000x+)JMU03b042"I 4[ۣܟ/Lsg[BZ~>CB&/Eͷ mcyMrename-add-symlink/.git/objects/9a/cba321a26d60972390b500904873ec2f586a51000064400000000000000000000000601046102023000222670ustar 00000000000000x+)JMU06d040031QHgpa j1{5y+Zl rename-add-symlink/.git/objects/44000075500000000000000000000000001046102023000153135ustar 00000000000000rename-add-symlink/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000223440ustar 00000000000000xKOR0d/LK22222pSrename-add-symlink/.git/objects/19000075500000000000000000000000001046102023000153155ustar 00000000000000rename-add-symlink/.git/objects/19/102815663d23f8b75a47e7a01965dcdc96468c000064400000000000000000000000221046102023000223150ustar 00000000000000xKOR0fH7rename-add-symlink/.git/objects/8a000075500000000000000000000000001046102023000153745ustar 00000000000000rename-add-symlink/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000225320ustar 00000000000000xKOR04`02222(-Rrename-add-symlink/.git/objects/pack000075500000000000000000000000001046102023000160025ustar 00000000000000rename-add-symlink/.git/objects/4b000075500000000000000000000000001046102023000153715ustar 00000000000000rename-add-symlink/.git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904000064400000000000000000000000171046102023000227020ustar 00000000000000x+)JMU0` ,rename-add-symlink/.git/objects/20000075500000000000000000000000001046102023000153055ustar 00000000000000rename-add-symlink/.git/objects/20/84a7daccbc3c1b906e6f20ba6c8efd188fa8ae000064400000000000000000000002441046102023000232360ustar 00000000000000xej1 D{WZK+!+B]B?йcVǀmt3=!M+k",v5DX g²YG_GΥw,' s߆u )-N=6G4rename-add-symlink/.git/objects/ec000075500000000000000000000000001046102023000154535ustar 00000000000000rename-add-symlink/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000225300ustar 00000000000000xKOR02d/LK222222}rename-add-symlink/.git/objects/b4000075500000000000000000000000001046102023000153715ustar 00000000000000rename-add-symlink/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000222660ustar 00000000000000xKOR04b022222/crename-add-symlink/.git/objects/bb000075500000000000000000000000001046102023000154475ustar 00000000000000rename-add-symlink/.git/objects/bb/25fd1d24d87470a30c3d7bd25ccb22f94bee05000064400000000000000000000000601046102023000230000ustar 00000000000000x+)JMU06d040031QHJ,b""St/-.i  ^rename-add-symlink/.git/objects/9c000075500000000000000000000000001046102023000153775ustar 00000000000000rename-add-symlink/.git/objects/9c/1f40262f357228d3e89f04c511aa2d7e868060000064400000000000000000000001161046102023000223050ustar 00000000000000x+)JMU03a042"I 4[ۣܟ/Lsg[ HΉa@_SNӽ$"\-P_B=rename-add-symlink/.git/config000064400000000000000000000002111046102023000146740ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-add-symlink/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000211700ustar 000000000000004b825dc642cb6eb9a060e54bf8d69288fbee4904 rename-add-symlink/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000203420ustar 00000000000000985badfa7a966612b9f9adadbaa6a30aa3e0b1f5 rename-add-symlink/bar000064400000000000000000000000251046102023000133350ustar 00000000000000original 1 2 3 4 5 6 rename-add-symlink/A-B-diff3.merge-info000064400000000000000000000005341046102023000161550ustar 000000000000009c1f40262f357228d3e89f04c511aa2d7e868060120000 19102815663d23f8b75a47e7a01965dcdc96468c 2 bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 bar~B2barbar~BCONFLICT (distinct modes)CONFLICT (distinct types): bar had different types on each side; renamed one of them so each can be recorded somewhere. 1fooAuto-mergingAuto-merging foo rename-add-symlink/A-B-diff3-reversed.merge-info000064400000000000000000000005341046102023000177720ustar 000000000000009c1f40262f357228d3e89f04c511aa2d7e868060120000 19102815663d23f8b75a47e7a01965dcdc96468c 3 bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 bar~B2barbar~BCONFLICT (distinct modes)CONFLICT (distinct types): bar had different types on each side; renamed one of them so each can be recorded somewhere. 1fooAuto-mergingAuto-merging foo rename-within-rename000075500000000000000000000000001046102023000131255ustar 00000000000000rename-within-rename/.git000075500000000000000000000000001046102023000137665ustar 00000000000000rename-within-rename/.git/COMMIT_EDITMSG000064400000000000000000000001571046102023000161370ustar 00000000000000we also have duplication just like Git, but we are consistent independently of the side, hence the expectation rename-within-rename/.git/rename-within-rename-A-B-deviates.index000064400000000000000000000015001046102023000232450ustar 00000000000000DIRC  JX+pa-renamed/sub-renamed/y.f⛲CK)wZSa-renamed/sub-renamed/z JX+p a-renamed/sub/y.f⛲CK)wZS a-renamed/sub/z⛲CK)wZS a-renamed/w JX+p a-renamed/x.f JX+p0a/sub-renamed/y.f⛲CK)wZS0a/sub-renamed/zDRCgG!8?ه a/sub/y.f⛲CK)wZSa/sub/z%rˏוrename-within-rename/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000215230ustar 0000000000000051fd75cde9a98200a052a8af2f8244f2de49ec49 rename-within-rename/.git/rename-within-rename-A-B-deviates-reversed.index000064400000000000000000000015001046102023000250620ustar 00000000000000DIRC  JX+pa-renamed/sub-renamed/y.f⛲CK)wZSa-renamed/sub-renamed/z JX+p0a-renamed/sub/y.f⛲CK)wZS0a-renamed/sub/z⛲CK)wZS a-renamed/w JX+p a-renamed/x.f JX+p a/sub-renamed/y.f⛲CK)wZS a/sub-renamed/zDRCgG!8?ه a/sub/y.f⛲CK)wZSa/sub/z"ύQWP9.9rename-within-rename/.git/index000064400000000000000000000007271046102023000151050ustar 00000000000000DIRC JX+pa-renamed/sub-renamed/y.f⛲CK)wZSa-renamed/sub-renamed/z⛲CK)wZS a-renamed/w JX+p a-renamed/x.fTREE_4 1 ݌Gw-l[~a-renamed4 1 Uz"fAґ-q^ ?{sub-renamed2 0 v=ynp*)ԡ1~:5-rename-within-rename/.git/refs000075500000000000000000000000001046102023000147255ustar 00000000000000rename-within-rename/.git/refs/tags000075500000000000000000000000001046102023000156635ustar 00000000000000rename-within-rename/.git/refs/heads000075500000000000000000000000001046102023000160115ustar 00000000000000rename-within-rename/.git/refs/heads/B000064400000000000000000000000511046102023000161700ustar 000000000000007c93c7c953f7aac0ce6ecd73a2201efee8c62f58 rename-within-rename/.git/refs/heads/main000064400000000000000000000000511046102023000167330ustar 0000000000000081a81b561f72d779aefb47ab475c363fbb8bb6bc rename-within-rename/.git/refs/heads/A000064400000000000000000000000511046102023000161670ustar 00000000000000beb102ac2dffaede3cb6e968466fe50a7cb4d7aa rename-within-rename/.git/refs/heads/expected000064400000000000000000000000511046102023000176100ustar 000000000000001048436e3598b186e49f633849a7102b6b34e0bf rename-within-rename/.git/hooks000075500000000000000000000000001046102023000151115ustar 00000000000000rename-within-rename/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000216100ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-within-rename/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000201470ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-within-rename/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000213300ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-within-rename/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000215470ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-within-rename/.git/hooks/post-update.sample000075500000000000000000000002751046102023000206470ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-within-rename/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000221130ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-within-rename/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000205770ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-within-rename/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000222230ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-within-rename/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000213350ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-within-rename/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000204540ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-within-rename/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000204250ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-within-rename/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000204470ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-within-rename/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000206750ustar 0000000000000082dd8cac8e9da105477708c0a62d6c155b7ee0ac rename-within-rename/.git/description000064400000000000000000000001111046102023000163040ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-within-rename/.git/logs000075500000000000000000000000001046102023000147325ustar 00000000000000rename-within-rename/.git/logs/refs000075500000000000000000000000001046102023000156715ustar 00000000000000rename-within-rename/.git/logs/refs/heads000075500000000000000000000000001046102023000167555ustar 00000000000000rename-within-rename/.git/logs/refs/heads/B000064400000000000000000000005361046102023000171440ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-renamed rename-within-rename/.git/logs/refs/heads/main000064400000000000000000000002371046102023000177050ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original rename-within-rename/.git/logs/refs/heads/A000064400000000000000000000005261046102023000171420ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc beb102ac2dffaede3cb6e968466fe50a7cb4d7aa committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed rename-within-rename/.git/logs/refs/heads/expected000064400000000000000000000006311046102023000205600ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 branch: Created from main 81a81b561f72d779aefb47ab475c363fbb8bb6bc 1048436e3598b186e49f633849a7102b6b34e0bf committer 946771200 +0000 commit: we also have duplication just like Git, but we are consistent independently of the side, hence the expectation rename-within-rename/.git/logs/HEAD000064400000000000000000000023771046102023000154460ustar 000000000000000000000000000000000000000000000000000000 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 commit (initial): original 81a81b561f72d779aefb47ab475c363fbb8bb6bc 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from main to A 81a81b561f72d779aefb47ab475c363fbb8bb6bc beb102ac2dffaede3cb6e968466fe50a7cb4d7aa committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed beb102ac2dffaede3cb6e968466fe50a7cb4d7aa 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from A to B 81a81b561f72d779aefb47ab475c363fbb8bb6bc 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 committer 946771200 +0000 commit: changed all content, renamed a/sub -> a/sub-renamed 7c93c7c953f7aac0ce6ecd73a2201efee8c62f58 81a81b561f72d779aefb47ab475c363fbb8bb6bc committer 946771200 +0000 checkout: moving from B to expected 81a81b561f72d779aefb47ab475c363fbb8bb6bc 1048436e3598b186e49f633849a7102b6b34e0bf committer 946771200 +0000 commit: we also have duplication just like Git, but we are consistent independently of the side, hence the expectation rename-within-rename/.git/info000075500000000000000000000000001046102023000147215ustar 00000000000000rename-within-rename/.git/info/exclude000064400000000000000000000003601046102023000163530ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-within-rename/.git/HEAD000064400000000000000000000000311046102023000144630ustar 00000000000000ref: refs/heads/expected rename-within-rename/.git/objects000075500000000000000000000000001046102023000154175ustar 00000000000000rename-within-rename/.git/objects/8e000075500000000000000000000000001046102023000157335ustar 00000000000000rename-within-rename/.git/objects/8e/5b5c26ab5f2a824c123846adceaf811f538231000064400000000000000000000001111046102023000231200ustar 00000000000000x+)JMU03`040031QKcX䥨m̢?? JW1?7s#{U_trename-within-rename/.git/objects/ce000075500000000000000000000000001046102023000160065ustar 00000000000000rename-within-rename/.git/objects/ce/c4bd5ac392ba3ceabfbef5f84878a3de6540f4000064400000000000000000000000531046102023000236610ustar 00000000000000x+)JMU0`01Ds:Ȫ" R+=o: rename-within-rename/.git/objects/e6000075500000000000000000000000001046102023000157315ustar 00000000000000rename-within-rename/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000232350ustar 00000000000000xKOR0` rename-within-rename/.git/objects/ba000075500000000000000000000000001046102023000160015ustar 00000000000000rename-within-rename/.git/objects/ba/185e921f848f2b5db2cad1312950f1283b8e34000064400000000000000000000000531046102023000230470ustar 00000000000000x+)JMU0`01DUх%S$h&x?5 rename-within-rename/.git/objects/ba/60ed76e9e04b8fce99f3810cad83bfbdb678db000064400000000000000000000001471046102023000236210ustar 00000000000000x+)JMU4`01$?ޓ*b{ce󂏆f&& >5gnuQ7= Kc""St/-.i 7(:rename-within-rename/.git/objects/55000075500000000000000000000000001046102023000156505ustar 00000000000000rename-within-rename/.git/objects/55/7af822956641d2912d71955e0ba214a80e3f7b000064400000000000000000000001571046102023000226450ustar 00000000000000x+)JMU`01$ݢԼ?ޓ*b{ce󂏆f&& >5gnuQ7= Kc""St/-.i +Krename-within-rename/.git/objects/info000075500000000000000000000000001046102023000163525ustar 00000000000000rename-within-rename/.git/objects/2f000075500000000000000000000000001046102023000157265ustar 00000000000000rename-within-rename/.git/objects/2f/ce6da220e49ac105241d525014704d1b918e97000064400000000000000000000001571046102023000227020ustar 00000000000000x+)JMU`01$ݢԼF7[XNG4v(3Bnkϭon2440031Q(gx6M9{wk+qIODd^CB&/Eͷ mcyM%Lrename-within-rename/.git/objects/10000075500000000000000000000000001046102023000156375ustar 00000000000000rename-within-rename/.git/objects/10/48436e3598b186e49f633849a7102b6b34e0bf000064400000000000000000000003421046102023000225710ustar 00000000000000xeON0 ܯJڴIw8$j]X삖[?(k}BF9bK5+&Ao nFC?ɶy bBp! ̉0mj Æjrename-within-rename/.git/objects/8a000075500000000000000000000000001046102023000157275ustar 00000000000000rename-within-rename/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000230650ustar 00000000000000xKOR04`02222(-Rrename-within-rename/.git/objects/74000075500000000000000000000000001046102023000156515ustar 00000000000000rename-within-rename/.git/objects/74/47ff05163f5fb4f29b025410f8e6e22eaa0e96000064400000000000000000000001141046102023000230570ustar 00000000000000x+)JMU03a01DݢԼ] o^>?7s#{U܆a}=BRKELoDrename-within-rename/.git/objects/80000075500000000000000000000000001046102023000156465ustar 00000000000000rename-within-rename/.git/objects/80/ae1408ce7ca91c2e90e00595cfc7b144ad9995000064400000000000000000000000631046102023000231440ustar 00000000000000x+)JMU06c01DݢԼw)2}=KU$rename-within-rename/.git/objects/7c000075500000000000000000000000001046102023000157305ustar 00000000000000rename-within-rename/.git/objects/7c/93c7c953f7aac0ce6ecd73a2201efee8c62f58000064400000000000000000000002641046102023000234540ustar 00000000000000xe @ D}ޯȻ{-HW4B-u?>00dxJ閡a`aCEmCY"I1^5U4jE PuuM}x,D+|jiS5Ε7U۪*aٖen]W/CA}Urename-within-rename/.git/objects/pack000075500000000000000000000000001046102023000163355ustar 00000000000000rename-within-rename/.git/objects/4b000075500000000000000000000000001046102023000157245ustar 00000000000000rename-within-rename/.git/objects/4b/fb393c2b3e9f23698737b561fd04eddffcbf42000064400000000000000000000000551046102023000233750ustar 00000000000000x+)JMU06`01$9yxN|bJcQ'rename-within-rename/.git/objects/ec000075500000000000000000000000001046102023000160065ustar 00000000000000rename-within-rename/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000230630ustar 00000000000000xKOR02d/LK222222}rename-within-rename/.git/objects/fc000075500000000000000000000000001046102023000160075ustar 00000000000000rename-within-rename/.git/objects/fc/0f90c085de1b1a769f843ddffc01796ee770f1000064400000000000000000000001111046102023000233060ustar 00000000000000x+)JMU03`040031QKc""St/-.i @}4{kݚʣnz< rename-within-rename/.git/objects/e5000075500000000000000000000000001046102023000157305ustar 00000000000000rename-within-rename/.git/objects/e5/fcfa8380466dbf3f664f73229b8eb14933271f000064400000000000000000000000631046102023000231020ustar 00000000000000x+)JMU06c01DݢԼI}۫&G9oO͆v0 rename-within-rename/.git/objects/b4000075500000000000000000000000001046102023000157245ustar 00000000000000rename-within-rename/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000226210ustar 00000000000000xKOR04b022222/crename-within-rename/.git/objects/be000075500000000000000000000000001046102023000160055ustar 00000000000000rename-within-rename/.git/objects/be/b102ac2dffaede3cb6e968466fe50a7cb4d7aa000064400000000000000000000002611046102023000237270ustar 00000000000000xe 0 S_%m >E/ sr/ϥ*No IL.i@$/YSb2wF#j `2#1B>b.( :[|s9A^&nZ*sǯh췫 Sm;hX^!OϩǻQ0rename-within-rename/.git/objects/a3000075500000000000000000000000001046102023000157225ustar 00000000000000rename-within-rename/.git/objects/a3/dcd62102f5c8e082efc6ed0b28a56106108262000064400000000000000000000001641046102023000230360ustar 00000000000000x+)JMU04`01$ݢԼ?ޓ*b{cepUXe LL}4{kݚʣnz<*YưED)^[.\/8rename-within-rename/.git/objects/9c000075500000000000000000000000001046102023000157325ustar 00000000000000rename-within-rename/.git/objects/9c/48b30d5e977c4991e9ba3894817253b0adc876000064400000000000000000000001111046102023000227460ustar 00000000000000x+)JMU03`040031QKcpa j1{5y+Zl bx6M9{wk+qIODUrename-within-rename/.git/objects/9d000075500000000000000000000000001046102023000157335ustar 00000000000000rename-within-rename/.git/objects/9d/0bd758192a8a11004805e88c9948f110ed769f000064400000000000000000000000651046102023000226630ustar 00000000000000x+)JMU0`01$ݢԼ?ޓ*b{cejwrename-within-rename/.git/objects/5f000075500000000000000000000000001046102023000157315ustar 00000000000000rename-within-rename/.git/objects/5f/648142ecb5c4c8ad6fe1dbcf60ed42c42932b9000064400000000000000000000001111046102023000233520ustar 00000000000000x+)JMU03`040031QKcxÒƆ'EƼ_$O];y*]lٛ.^s\WuГl2rename-within-rename/.git/objects/51000075500000000000000000000000001046102023000156445ustar 00000000000000rename-within-rename/.git/objects/51/fd75cde9a98200a052a8af2f8244f2de49ec49000064400000000000000000000001131046102023000232240ustar 00000000000000x+)JMU03a01DݢԼrn7^Nx+0+E|vY s/rename-within-rename/.git/objects/3b000075500000000000000000000000001046102023000157235ustar 00000000000000rename-within-rename/.git/objects/3b/76aa085b717495c060282da9b61b5d61df5a37000064400000000000000000000001471046102023000227750ustar 00000000000000x+)JMU4`01$9yxN|bJcQ' LL}4{kݚʣnz<*Yck.=IwWlG)Jrename-within-rename/.git/config000064400000000000000000000002111046102023000152270ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-within-rename/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000215230ustar 0000000000000051fd75cde9a98200a052a8af2f8244f2de49ec49 rename-within-rename/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000206750ustar 000000000000002c03c8a79fdd1f4f9f1b1ac71ad878a43bba87df rename-within-rename/a-renamed000075500000000000000000000000001046102023000147565ustar 00000000000000rename-within-rename/a-renamed/w000064400000000000000000000000001046102023000152140ustar 00000000000000rename-within-rename/a-renamed/x.f000064400000000000000000000000141046102023000154460ustar 000000000000001 2 3 4 5 6 rename-within-rename/a-renamed/sub-renamed000075500000000000000000000000001046102023000171605ustar 00000000000000rename-within-rename/a-renamed/sub-renamed/z000064400000000000000000000000001046102023000174210ustar 00000000000000rename-within-rename/a-renamed/sub-renamed/y.f000064400000000000000000000000141046102023000176510ustar 000000000000001 2 3 4 5 6 rename-within-rename/a-renamed/sub000075500000000000000000000000001046102023000155475ustar 00000000000000rename-within-rename/a-renamed/sub/z000064400000000000000000000000001046102023000160100ustar 00000000000000rename-within-rename/a-renamed/sub/y.f000064400000000000000000000000141046102023000162400ustar 000000000000001 2 3 4 5 6 rename-within-rename/A-B-deviates-reversed.merge-info000064400000000000000000000010071046102023000211320ustar 000000000000007447ff05163f5fb4f29b025410f8e6e22eaa0e96100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a-renamed/sub/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a/sub-renamed/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f1a-renamed/x.fAuto-mergingAuto-merging a-renamed/x.f 1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa/sub-renamed/y.fa-renamed/sub/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a/sub-renamed/y.f in B and to a-renamed/sub/y.f in A. rename-within-rename/A-B-deviates.merge-info000064400000000000000000000010071046102023000173150ustar 000000000000007447ff05163f5fb4f29b025410f8e6e22eaa0e96100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a-renamed/sub/y.f100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/sub-renamed/y.f100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/y.f1a-renamed/x.fAuto-mergingAuto-merging a-renamed/x.f 1a/sub/y.fAuto-mergingAuto-merging a/sub/y.f 3a/sub/y.fa-renamed/sub/y.fa/sub-renamed/y.fCONFLICT (rename/rename)CONFLICT (rename/rename): a/sub/y.f renamed to a-renamed/sub/y.f in A and to a/sub-renamed/y.f in B. renamed-symlink-with-conflict000075500000000000000000000000001046102023000147605ustar 00000000000000renamed-symlink-with-conflict/A-B.merge-info000064400000000000000000000006371046102023000173560ustar 00000000000000dedc00c192f667ebc5c7468df403da3bbca32d41120000 e29fa63dae4ccf0788897a7025da868083178fdf 1 link120000 e29fa63dae4ccf0788897a7025da868083178fdf 3 link-different120000 e29fa63dae4ccf0788897a7025da868083178fdf 2 link-renamed1a/x.fAuto-mergingAuto-merging a/x.f 3linklink-renamedlink-differentCONFLICT (rename/rename)CONFLICT (rename/rename): link renamed to link-renamed in A and to link-different in B. renamed-symlink-with-conflict/A-B-reversed.merge-info000064400000000000000000000006371046102023000211730ustar 00000000000000dedc00c192f667ebc5c7468df403da3bbca32d41120000 e29fa63dae4ccf0788897a7025da868083178fdf 1 link120000 e29fa63dae4ccf0788897a7025da868083178fdf 2 link-different120000 e29fa63dae4ccf0788897a7025da868083178fdf 3 link-renamed1a/x.fAuto-mergingAuto-merging a/x.f 3linklink-differentlink-renamedCONFLICT (rename/rename)CONFLICT (rename/rename): link renamed to link-different in B and to link-renamed in A. renamed-symlink-with-conflict/.git000075500000000000000000000000001046102023000156215ustar 00000000000000renamed-symlink-with-conflict/.git/COMMIT_EDITMSG000064400000000000000000000000571046102023000177710ustar 00000000000000change content, renamed link -> link-different renamed-symlink-with-conflict/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000233560ustar 00000000000000f2906a3d94ed7ad3ab11fbce8101e87b6dd69d59 renamed-symlink-with-conflict/.git/index000064400000000000000000000003631046102023000167340ustar 00000000000000DIRC JX+pa/x.f⟦=Lzp%چlink-differentTREE32 1 W+9caYS,~X#a1 0 3ܞ@Z\ iHZ#\WT0%vGrenamed-symlink-with-conflict/.git/refs000075500000000000000000000000001046102023000165605ustar 00000000000000renamed-symlink-with-conflict/.git/refs/tags000075500000000000000000000000001046102023000175165ustar 00000000000000renamed-symlink-with-conflict/.git/refs/heads000075500000000000000000000000001046102023000176445ustar 00000000000000renamed-symlink-with-conflict/.git/refs/heads/B000064400000000000000000000000511046102023000200230ustar 00000000000000f7789e9d5f95a4abe51fcc29a04b828da44633a2 renamed-symlink-with-conflict/.git/refs/heads/main000064400000000000000000000000511046102023000205660ustar 00000000000000e11ce6b1f4da042deca2cdfe8b19ab7f7799079f renamed-symlink-with-conflict/.git/refs/heads/A000064400000000000000000000000511046102023000200220ustar 00000000000000b3ea3182ff893372e7e4ffdce2a77361f4f031b6 renamed-symlink-with-conflict/.git/hooks000075500000000000000000000000001046102023000167445ustar 00000000000000renamed-symlink-with-conflict/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000234430ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 renamed-symlink-with-conflict/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000220020ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 renamed-symlink-with-conflict/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000231630ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : renamed-symlink-with-conflict/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000234020ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : renamed-symlink-with-conflict/.git/hooks/post-update.sample000075500000000000000000000002751046102023000225020ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info renamed-symlink-with-conflict/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000237460ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi renamed-symlink-with-conflict/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000224320ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi renamed-symlink-with-conflict/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000240560ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } renamed-symlink-with-conflict/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000231700ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : renamed-symlink-with-conflict/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000223070ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- renamed-symlink-with-conflict/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000222600ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END renamed-symlink-with-conflict/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000223020ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } renamed-symlink-with-conflict/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000225300ustar 00000000000000572bf93963eb1c6159f7ba53e12c7ea058dbc723 renamed-symlink-with-conflict/.git/description000064400000000000000000000001111046102023000201370ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. renamed-symlink-with-conflict/.git/logs000075500000000000000000000000001046102023000165655ustar 00000000000000renamed-symlink-with-conflict/.git/logs/refs000075500000000000000000000000001046102023000175245ustar 00000000000000renamed-symlink-with-conflict/.git/logs/refs/heads000075500000000000000000000000001046102023000206105ustar 00000000000000renamed-symlink-with-conflict/.git/logs/refs/heads/B000064400000000000000000000005311046102023000207720ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 branch: Created from main e11ce6b1f4da042deca2cdfe8b19ab7f7799079f f7789e9d5f95a4abe51fcc29a04b828da44633a2 committer 946771200 +0000 commit: change content, renamed link -> link-different renamed-symlink-with-conflict/.git/logs/refs/heads/main000064400000000000000000000002371046102023000215400ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 commit (initial): original renamed-symlink-with-conflict/.git/logs/refs/heads/A000064400000000000000000000005261046102023000207750ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 branch: Created from main e11ce6b1f4da042deca2cdfe8b19ab7f7799079f b3ea3182ff893372e7e4ffdce2a77361f4f031b6 committer 946771200 +0000 commit: changed a/x.f, renamed link -> link-renamed renamed-symlink-with-conflict/.git/logs/HEAD000064400000000000000000000015271046102023000172750ustar 000000000000000000000000000000000000000000000000000000 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 commit (initial): original e11ce6b1f4da042deca2cdfe8b19ab7f7799079f e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 checkout: moving from main to A e11ce6b1f4da042deca2cdfe8b19ab7f7799079f b3ea3182ff893372e7e4ffdce2a77361f4f031b6 committer 946771200 +0000 commit: changed a/x.f, renamed link -> link-renamed b3ea3182ff893372e7e4ffdce2a77361f4f031b6 e11ce6b1f4da042deca2cdfe8b19ab7f7799079f committer 946771200 +0000 checkout: moving from A to B e11ce6b1f4da042deca2cdfe8b19ab7f7799079f f7789e9d5f95a4abe51fcc29a04b828da44633a2 committer 946771200 +0000 commit: change content, renamed link -> link-different renamed-symlink-with-conflict/.git/info000075500000000000000000000000001046102023000165545ustar 00000000000000renamed-symlink-with-conflict/.git/info/exclude000064400000000000000000000003601046102023000202060ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ renamed-symlink-with-conflict/.git/HEAD000064400000000000000000000000221046102023000163160ustar 00000000000000ref: refs/heads/B renamed-symlink-with-conflict/.git/objects000075500000000000000000000000001046102023000172525ustar 00000000000000renamed-symlink-with-conflict/.git/objects/f7000075500000000000000000000000001046102023000175665ustar 00000000000000renamed-symlink-with-conflict/.git/objects/f7/789e9d5f95a4abe51fcc29a04b828da44633a2000064400000000000000000000002701046102023000250700ustar 00000000000000xeKj1D)z8HcrTf C僳Ho^Ql-w4RAY {Ts"Zsk'8Wӹ}E_"eǒl#[?o;W|H^\v"CHs83ʱctn]Sβak;hJe}雇 ʛTrenamed-symlink-with-conflict/.git/objects/e1000075500000000000000000000000001046102023000175575ustar 00000000000000renamed-symlink-with-conflict/.git/objects/e1/1ce6b1f4da042deca2cdfe8b19ab7f7799079f000064400000000000000000000002001046102023000253520ustar 00000000000000xeK 1D]$I0Wi&FBo@2@9[2ɡrH*kvINs: z[_Tbg@\AJ815ï{sWzwEZ7*7"renamed-symlink-with-conflict/.git/objects/de000075500000000000000000000000001046102023000176425ustar 00000000000000renamed-symlink-with-conflict/.git/objects/de/dc00c192f667ebc5c7468df403da3bbca32d41000064400000000000000000000001361046102023000252540ustar 00000000000000x+)JMU044`01D㞦w9\ezs93ǖsF`ɜ̼lݔ̴ԢԼGٮ9YUzY>Jx/renamed-symlink-with-conflict/.git/objects/b7000075500000000000000000000000001046102023000175625ustar 00000000000000renamed-symlink-with-conflict/.git/objects/b7/8203667d6f536956ca347d51b20cf94a21a5fd000064400000000000000000000000601046102023000246330ustar 00000000000000x+)JMU06d040031QKcxÒƆ'EƼ_$O];y^renamed-symlink-with-conflict/.git/objects/91000075500000000000000000000000001046102023000175035ustar 00000000000000renamed-symlink-with-conflict/.git/objects/91/a33cf0bef88bd6f9f6faef22ed9d2297379e00000064400000000000000000000001231046102023000252340ustar 00000000000000x+)JMU07`01DMiaLj7R\,ZWh2u>;: To54#zrenamed-symlink-with-conflict/.git/objects/info000075500000000000000000000000001046102023000202055ustar 00000000000000renamed-symlink-with-conflict/.git/objects/44000075500000000000000000000000001046102023000175015ustar 00000000000000renamed-symlink-with-conflict/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000245320ustar 00000000000000xKOR0d/LK22222pSrenamed-symlink-with-conflict/.git/objects/8a000075500000000000000000000000001046102023000175625ustar 00000000000000renamed-symlink-with-conflict/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000247200ustar 00000000000000xKOR04`02222(-Rrenamed-symlink-with-conflict/.git/objects/pack000075500000000000000000000000001046102023000201705ustar 00000000000000renamed-symlink-with-conflict/.git/objects/ec000075500000000000000000000000001046102023000176415ustar 00000000000000renamed-symlink-with-conflict/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000247160ustar 00000000000000xKOR02d/LK222222}renamed-symlink-with-conflict/.git/objects/c6000075500000000000000000000000001046102023000175625ustar 00000000000000renamed-symlink-with-conflict/.git/objects/c6/5fa907e7a6916330491f23945d9f32dacf842d000064400000000000000000000001111046102023000246440ustar 00000000000000x+)JMU03`01Dj3%NR#renamed-symlink-with-conflict/.git/objects/fb000075500000000000000000000000001046102023000176415ustar 00000000000000renamed-symlink-with-conflict/.git/objects/fb/75240037129c7c3a1f1d863a2a9ec716866a54000064400000000000000000000000601046102023000245450ustar 00000000000000x+)JMU06d040031QKcX䥨m̢?? 5 Nrenamed-symlink-with-conflict/.git/objects/f2000075500000000000000000000000001046102023000175615ustar 00000000000000renamed-symlink-with-conflict/.git/objects/f2/906a3d94ed7ad3ab11fbce8101e87b6dd69d59000064400000000000000000000001111046102023000252130ustar 00000000000000x+)JMU03`01D㞦w9\ezs93ǖsF`ɜ̼lGٮ9YUzY>VBrenamed-symlink-with-conflict/.git/objects/fd000075500000000000000000000000001046102023000176435ustar 00000000000000renamed-symlink-with-conflict/.git/objects/fd/269b6918c9c52c15fb4ae75497178979ebb071000064400000000000000000000000601046102023000246660ustar 00000000000000x+)JMU06d040031QKcpa j1{5y+Zl renamed-symlink-with-conflict/.git/objects/e2000075500000000000000000000000001046102023000175605ustar 00000000000000renamed-symlink-with-conflict/.git/objects/e2/9fa63dae4ccf0788897a7025da868083178fdf000064400000000000000000000000241046102023000250240ustar 00000000000000xKOR0eHԯKNrenamed-symlink-with-conflict/.git/objects/bd000075500000000000000000000000001046102023000176375ustar 00000000000000renamed-symlink-with-conflict/.git/objects/bd/a6f17eef8755faf36f5763ed970e0a435ba3d3000064400000000000000000000001211046102023000252210ustar 00000000000000x+)JMU0`01D㞦w9\ezs93ǖsF`ɜ̼lݢԼGٮ9YUzY>-@Srenamed-symlink-with-conflict/.git/objects/b4000075500000000000000000000000001046102023000175575ustar 00000000000000renamed-symlink-with-conflict/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000244540ustar 00000000000000xKOR04b022222/crenamed-symlink-with-conflict/.git/objects/b3000075500000000000000000000000001046102023000175565ustar 00000000000000renamed-symlink-with-conflict/.git/objects/b3/ea3182ff893372e7e4ffdce2a77361f4f031b6000064400000000000000000000002621046102023000250630ustar 00000000000000xeK 1D]Od"^thfd *6Tʹ̐a9Hąn0H#ٌ]F>fU'renamed-symlink-with-conflict/.git/config000064400000000000000000000002111046102023000170620ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true renamed-symlink-with-conflict/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000233560ustar 00000000000000f2906a3d94ed7ad3ab11fbce8101e87b6dd69d59 renamed-symlink-with-conflict/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000225300ustar 00000000000000bda6f17eef8755faf36f5763ed970e0a435ba3d3 renamed-symlink-with-conflict/a000075500000000000000000000000001046102023000152005ustar 00000000000000renamed-symlink-with-conflict/a/x.f000064400000000000000000000000251046102023000156720ustar 00000000000000original 1 2 3 4 5 6 renamed-symlink-with-conflict/link-different000075500000000000000000000000001046102023000205122a/x.fustar 00000000000000symlink-addition000075500000000000000000000000001046102023000123705ustar 00000000000000symlink-addition/b000064400000000000000000000000001046102023000126010ustar 00000000000000symlink-addition/A-B.merge-info000064400000000000000000000003371046102023000147630ustar 00000000000000b22e19aed9f7b7639fbc373cf45288689c2e8f69120000 2e65efe2a145dda7ee51d1741299f848e5bf752e 2 link120000 63d8dbd40c23542e740659a7168a0ce3138ea748 3 link1linkCONFLICT (contents)CONFLICT (add/add): Merge conflict in link symlink-addition/A-B-reversed.merge-info000064400000000000000000000003371046102023000166000ustar 00000000000000fb3766d3ab6bb4bbe6d8d66833758312bb10e191120000 63d8dbd40c23542e740659a7168a0ce3138ea748 2 link120000 2e65efe2a145dda7ee51d1741299f848e5bf752e 3 link1linkCONFLICT (contents)CONFLICT (add/add): Merge conflict in link symlink-addition/.git000075500000000000000000000000001046102023000132315ustar 00000000000000symlink-addition/.git/COMMIT_EDITMSG000064400000000000000000000000311046102023000153710ustar 00000000000000new link to point to 'b' symlink-addition/.git/index000064400000000000000000000004111046102023000143360ustar 00000000000000DIRCgUtgUt ?⛲CK)wZSagUu8gUu8 ?⛲CK)wZSbgU! gU!  @ c #T.tY HlinkTREE3 0 7fӫkh3uzgDOk9symlink-addition/.git/refs000075500000000000000000000000001046102023000141705ustar 00000000000000symlink-addition/.git/refs/tags000075500000000000000000000000001046102023000151265ustar 00000000000000symlink-addition/.git/refs/heads000075500000000000000000000000001046102023000152545ustar 00000000000000symlink-addition/.git/refs/heads/B000064400000000000000000000000511046102023000154330ustar 0000000000000096790124d8523a74bdce179602c7f6eba7a0f736 symlink-addition/.git/refs/heads/main000064400000000000000000000000511046102023000161760ustar 00000000000000d601750bfcf87359c61110915906f87c720ead7b symlink-addition/.git/refs/heads/A000064400000000000000000000000511046102023000154320ustar 00000000000000dee465281ff47aa01465d6a71f094975f79433d7 symlink-addition/.git/hooks000075500000000000000000000000001046102023000143545ustar 00000000000000symlink-addition/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000210530ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 symlink-addition/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000174120ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 symlink-addition/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000205730ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : symlink-addition/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000210120ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : symlink-addition/.git/hooks/post-update.sample000075500000000000000000000002751046102023000201120ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info symlink-addition/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000213560ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi symlink-addition/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000200420ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi symlink-addition/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000214660ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } symlink-addition/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000206000ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : symlink-addition/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000177170ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- symlink-addition/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000176700ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END symlink-addition/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000177120ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } symlink-addition/.git/description000064400000000000000000000001111046102023000155470ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. symlink-addition/.git/logs000075500000000000000000000000001046102023000141755ustar 00000000000000symlink-addition/.git/logs/refs000075500000000000000000000000001046102023000151345ustar 00000000000000symlink-addition/.git/logs/refs/heads000075500000000000000000000000001046102023000162205ustar 00000000000000symlink-addition/.git/logs/refs/heads/B000064400000000000000000000005031046102023000164010ustar 000000000000000000000000000000000000000000000000000000 d601750bfcf87359c61110915906f87c720ead7b committer 946771200 +0000 branch: Created from main d601750bfcf87359c61110915906f87c720ead7b 96790124d8523a74bdce179602c7f6eba7a0f736 committer 946771200 +0000 commit: new link to point to 'b' symlink-addition/.git/logs/refs/heads/main000064400000000000000000000002571046102023000171520ustar 000000000000000000000000000000000000000000000000000000 d601750bfcf87359c61110915906f87c720ead7b committer 946771200 +0000 commit (initial): original without symlink symlink-addition/.git/logs/refs/heads/A000064400000000000000000000005031046102023000164000ustar 000000000000000000000000000000000000000000000000000000 d601750bfcf87359c61110915906f87c720ead7b committer 946771200 +0000 branch: Created from main d601750bfcf87359c61110915906f87c720ead7b dee465281ff47aa01465d6a71f094975f79433d7 committer 946771200 +0000 commit: new link to point to 'a' symlink-addition/.git/logs/HEAD000064400000000000000000000014761046102023000147100ustar 000000000000000000000000000000000000000000000000000000 d601750bfcf87359c61110915906f87c720ead7b committer 946771200 +0000 commit (initial): original without symlink d601750bfcf87359c61110915906f87c720ead7b d601750bfcf87359c61110915906f87c720ead7b committer 946771200 +0000 checkout: moving from main to A d601750bfcf87359c61110915906f87c720ead7b dee465281ff47aa01465d6a71f094975f79433d7 committer 946771200 +0000 commit: new link to point to 'a' dee465281ff47aa01465d6a71f094975f79433d7 d601750bfcf87359c61110915906f87c720ead7b committer 946771200 +0000 checkout: moving from A to B d601750bfcf87359c61110915906f87c720ead7b 96790124d8523a74bdce179602c7f6eba7a0f736 committer 946771200 +0000 commit: new link to point to 'b' symlink-addition/.git/info000075500000000000000000000000001046102023000141645ustar 00000000000000symlink-addition/.git/info/exclude000064400000000000000000000003601046102023000156160ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ symlink-addition/.git/HEAD000064400000000000000000000000221046102023000137260ustar 00000000000000ref: refs/heads/B symlink-addition/.git/objects000075500000000000000000000000001046102023000146625ustar 00000000000000symlink-addition/.git/objects/2e000075500000000000000000000000001046102023000151705ustar 00000000000000symlink-addition/.git/objects/2e/65efe2a145dda7ee51d1741299f848e5bf752e000064400000000000000000000000201046102023000224750ustar 00000000000000xKOR0dH Rsymlink-addition/.git/objects/e6000075500000000000000000000000001046102023000151745ustar 00000000000000symlink-addition/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000225000ustar 00000000000000xKOR0` symlink-addition/.git/objects/de000075500000000000000000000000001046102023000152525ustar 00000000000000symlink-addition/.git/objects/de/e465281ff47aa01465d6a71f094975f79433d7000064400000000000000000000002521046102023000222100ustar 00000000000000xe 0=)փ iY($)!o@2 L2WFja5+&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 no-merge-base/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000165540ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 no-merge-base/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000177350ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : no-merge-base/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000201540ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : no-merge-base/.git/hooks/post-update.sample000075500000000000000000000002751046102023000172540ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info no-merge-base/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000205200ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi no-merge-base/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000172040ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi no-merge-base/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000206300ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } no-merge-base/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000177420ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : no-merge-base/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000170610ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- no-merge-base/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000170320ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END no-merge-base/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000170540ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } no-merge-base/.git/description000064400000000000000000000001111046102023000147110ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. no-merge-base/.git/logs000075500000000000000000000000001046102023000133375ustar 00000000000000no-merge-base/.git/logs/refs000075500000000000000000000000001046102023000142765ustar 00000000000000no-merge-base/.git/logs/refs/heads000075500000000000000000000000001046102023000153625ustar 00000000000000no-merge-base/.git/logs/refs/heads/B000064400000000000000000000002401046102023000155410ustar 000000000000000000000000000000000000000000000000000000 2fee72c3a50786500087a553d0551da889ae2728 committer 946771200 +0000 commit (initial): content B no-merge-base/.git/logs/refs/heads/A000064400000000000000000000002401046102023000155400ustar 000000000000000000000000000000000000000000000000000000 39d2172cec25e3e71aef2ab793af717d4f7621e8 committer 946771200 +0000 commit (initial): content A no-merge-base/.git/logs/refs/heads/expectation000064400000000000000000000002361046102023000177100ustar 000000000000000000000000000000000000000000000000000000 2fee72c3a50786500087a553d0551da889ae2728 committer 946771200 +0000 branch: Created from HEAD no-merge-base/.git/logs/HEAD000064400000000000000000000007531046102023000140470ustar 000000000000000000000000000000000000000000000000000000 39d2172cec25e3e71aef2ab793af717d4f7621e8 committer 946771200 +0000 commit (initial): content A 0000000000000000000000000000000000000000 2fee72c3a50786500087a553d0551da889ae2728 committer 946771200 +0000 commit (initial): content B 2fee72c3a50786500087a553d0551da889ae2728 2fee72c3a50786500087a553d0551da889ae2728 committer 946771200 +0000 checkout: moving from B to expectation no-merge-base/.git/info000075500000000000000000000000001046102023000133265ustar 00000000000000no-merge-base/.git/info/exclude000064400000000000000000000003601046102023000147600ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ no-merge-base/.git/HEAD000064400000000000000000000000341046102023000130730ustar 00000000000000ref: refs/heads/expectation no-merge-base/.git/objects000075500000000000000000000000001046102023000140245ustar 00000000000000no-merge-base/.git/objects/22000075500000000000000000000000001046102023000142475ustar 00000000000000no-merge-base/.git/objects/22/3b7836fb19fdf64ba2d3cd6173c6a283141f78000064400000000000000000000000211046102023000214600ustar 00000000000000xKOR0bp&>no-merge-base/.git/objects/1d000075500000000000000000000000001046102023000143305ustar 00000000000000no-merge-base/.git/objects/1d/12bd6b16b7b6b2f16baeecb9424e4e43914a60000064400000000000000000000000421046102023000216560ustar 00000000000000xKOR06b'.'.[r䲃G.no-merge-base/.git/objects/4f000075500000000000000000000000001046102023000143355ustar 00000000000000no-merge-base/.git/objects/4f/939a0a2154b43ca82abfec9822a945cbaf8f74000064400000000000000000000000641046102023000217060ustar 00000000000000x+)JMU06e040031QH+I+aڛ-}ۦts3no-merge-base/.git/objects/4a000075500000000000000000000000001046102023000143305ustar 00000000000000no-merge-base/.git/objects/4a/5328472f3178d0f9c64179ece3c4be189a4e13000064400000000000000000000000611046102023000214150ustar 00000000000000xKOR05d'.'PH-(T()JM岅.G.;Pp,no-merge-base/.git/objects/e8000075500000000000000000000000001046102023000143405ustar 00000000000000no-merge-base/.git/objects/e8/46129bd7d6d182d1f2a3b72ae7d99b669c3fad000064400000000000000000000000641046102023000217240ustar 00000000000000x+)JMU06e040031QH+I+a p7cGI,no-merge-base/.git/objects/f7000075500000000000000000000000001046102023000143405ustar 00000000000000no-merge-base/.git/objects/f7/0f10e4db19068f79bc43844b49f3eece45c4e8000064400000000000000000000000211046102023000216410ustar 00000000000000xKOR0bp$=no-merge-base/.git/objects/39000075500000000000000000000000001046102023000142575ustar 00000000000000no-merge-base/.git/objects/39/d2172cec25e3e71aef2ab793af717d4f7621e8000064400000000000000000000002001046102023000216240ustar 00000000000000xe 1 D=+rM`ئ(])| zp.oxL^Z)"lRRx1<+!#đGF=>/6m YeV87B6no-merge-base/.git/objects/75000075500000000000000000000000001046102023000142575ustar 00000000000000no-merge-base/.git/objects/75/513a0e11f1d3afdb09fe1303df933585000f13000064400000000000000000000000641046102023000213540ustar 00000000000000x+)JMU06e040031QH+I+a _J.no-merge-base/.git/objects/8a000075500000000000000000000000001046102023000143345ustar 00000000000000no-merge-base/.git/objects/8a/0603ef9bf9a9d3ec64d85cd9a8df97dac18f3a000064400000000000000000000000641046102023000221550ustar 00000000000000x+)JMU06e040031QH+I+a/$[oιy4o6no-merge-base/.git/objects/80000075500000000000000000000000001046102023000142535ustar 00000000000000no-merge-base/.git/objects/80/3d00a2deed0ea9e2731a38b796d1be4c2f6175000064400000000000000000000000611046102023000216100ustar 00000000000000xKOR05dG.GPH-(T()JM岅.'.;Pp,no-merge-base/.git/objects/11000075500000000000000000000000001046102023000142455ustar 00000000000000no-merge-base/.git/objects/11/3401892d4397beffec0d00428bc5dd088ed165000064400000000000000000000000641046102023000214600ustar 00000000000000x+)JMU06e040031QH+I+aheXt-GRۧ]磟X 5(8no-merge-base/.git/objects/pack000075500000000000000000000000001046102023000147425ustar 00000000000000no-merge-base/.git/objects/fd000075500000000000000000000000001046102023000144155ustar 00000000000000no-merge-base/.git/objects/fd/f874cf08edd229fcf236103d1fd1280c920a52000064400000000000000000000000421046102023000216140ustar 00000000000000xKOR06bG.G.[rⲃ'.no-merge-base/.git/config000064400000000000000000000002111046102023000136340ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true no-merge-base/A-B-diff3.merge-info000064400000000000000000000004301046102023000151100ustar 00000000000000113401892d4397beffec0d00428bc5dd088ed165100644 f70f10e4db19068f79bc43844b49f3eece45c4e8 2 content100644 223b7836fb19fdf64ba2d3cd6173c6a283141f78 3 content1contentAuto-mergingAuto-merging content 1contentCONFLICT (contents)CONFLICT (add/add): Merge conflict in content no-merge-base/content000064400000000000000000000000021046102023000131760ustar 00000000000000B no-merge-base/A-B-diff3-reversed.merge-info000064400000000000000000000004301046102023000167250ustar 00000000000000e846129bd7d6d182d1f2a3b72ae7d99b669c3fad100644 223b7836fb19fdf64ba2d3cd6173c6a283141f78 2 content100644 f70f10e4db19068f79bc43844b49f3eece45c4e8 3 content1contentAuto-mergingAuto-merging content 1contentCONFLICT (contents)CONFLICT (add/add): Merge conflict in content rename-rename-delete-delete000075500000000000000000000000001046102023000143255ustar 00000000000000rename-rename-delete-delete/A-B.merge-info000064400000000000000000000007221046102023000167160ustar 00000000000000de32b958eda718ad1b56f4f3d072552c9199b51a100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 2 baz100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 3 baz2bazbarCONFLICT (rename/delete)CONFLICT (rename/delete): bar renamed to baz in B, but deleted in A. 2bazfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to baz in A, but deleted in B. 1bazAuto-mergingAuto-merging baz 1bazCONFLICT (contents)CONFLICT (add/add): Merge conflict in baz rename-rename-delete-delete/A-B-reversed.merge-info000064400000000000000000000007221046102023000205330ustar 000000000000009a7676edebe155944fa3519dd73c8f7484235662100644 5716ca5987cbf97d6bb54920bea6adde242d87e6 2 baz100644 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 3 baz2bazbarCONFLICT (rename/delete)CONFLICT (rename/delete): bar renamed to baz in B, but deleted in A. 2bazfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to baz in A, but deleted in B. 1bazAuto-mergingAuto-merging baz 1bazCONFLICT (contents)CONFLICT (add/add): Merge conflict in baz rename-rename-delete-delete/.git000075500000000000000000000000001046102023000151665ustar 00000000000000rename-rename-delete-delete/.git/COMMIT_EDITMSG000064400000000000000000000000271046102023000173330ustar 00000000000000Rename bar, remove foo rename-rename-delete-delete/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000227230ustar 0000000000000089ff1a2aefcbff0f09197f0fd8beeb19a7b6e51c rename-rename-delete-delete/.git/index000064400000000000000000000002111046102023000162710ustar 00000000000000DIRCWY}kI $-bazTREE1 0 HHehHQԕəɦ]+j*9krename-rename-delete-delete/.git/refs000075500000000000000000000000001046102023000161255ustar 00000000000000rename-rename-delete-delete/.git/refs/tags000075500000000000000000000000001046102023000170635ustar 00000000000000rename-rename-delete-delete/.git/refs/heads000075500000000000000000000000001046102023000172115ustar 00000000000000rename-rename-delete-delete/.git/refs/heads/B000064400000000000000000000000511046102023000173700ustar 0000000000000095e9b001b7f3007f274180cb0e413776012d3df5 rename-rename-delete-delete/.git/refs/heads/main000064400000000000000000000000511046102023000201330ustar 000000000000004326c797d590b7d8cceea3bb6350a2b5c975c321 rename-rename-delete-delete/.git/refs/heads/A000064400000000000000000000000511046102023000173670ustar 00000000000000d94014964b0b086b4fbea9df5a07c085872368bc rename-rename-delete-delete/.git/hooks000075500000000000000000000000001046102023000163115ustar 00000000000000rename-rename-delete-delete/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000230100ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-rename-delete-delete/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000213470ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-rename-delete-delete/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000225300ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-rename-delete-delete/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000227470ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-rename-delete-delete/.git/hooks/post-update.sample000075500000000000000000000002751046102023000220470ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-rename-delete-delete/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000233130ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-rename-delete-delete/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000217770ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-rename-delete-delete/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000234230ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-rename-delete-delete/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000225350ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-rename-delete-delete/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000216540ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-rename-delete-delete/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000216250ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-rename-delete-delete/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000216470ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-rename-delete-delete/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000220750ustar 000000000000007f4883d0486568a818804851fbc9d49585058bc9 rename-rename-delete-delete/.git/description000064400000000000000000000001111046102023000175040ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-rename-delete-delete/.git/logs000075500000000000000000000000001046102023000161325ustar 00000000000000rename-rename-delete-delete/.git/logs/refs000075500000000000000000000000001046102023000170715ustar 00000000000000rename-rename-delete-delete/.git/logs/refs/heads000075500000000000000000000000001046102023000201555ustar 00000000000000rename-rename-delete-delete/.git/logs/refs/heads/B000064400000000000000000000005011046102023000203340ustar 000000000000000000000000000000000000000000000000000000 4326c797d590b7d8cceea3bb6350a2b5c975c321 committer 946771200 +0000 branch: Created from main 4326c797d590b7d8cceea3bb6350a2b5c975c321 95e9b001b7f3007f274180cb0e413776012d3df5 committer 946771200 +0000 commit: Rename bar, remove foo rename-rename-delete-delete/.git/logs/refs/heads/main000064400000000000000000000002301046102023000210760ustar 000000000000000000000000000000000000000000000000000000 4326c797d590b7d8cceea3bb6350a2b5c975c321 committer 946771200 +0000 commit (initial): O rename-rename-delete-delete/.git/logs/refs/heads/A000064400000000000000000000005011046102023000203330ustar 000000000000000000000000000000000000000000000000000000 4326c797d590b7d8cceea3bb6350a2b5c975c321 committer 946771200 +0000 branch: Created from main 4326c797d590b7d8cceea3bb6350a2b5c975c321 d94014964b0b086b4fbea9df5a07c085872368bc committer 946771200 +0000 commit: Rename foo, remove bar rename-rename-delete-delete/.git/logs/HEAD000064400000000000000000000014431046102023000166370ustar 000000000000000000000000000000000000000000000000000000 4326c797d590b7d8cceea3bb6350a2b5c975c321 committer 946771200 +0000 commit (initial): O 4326c797d590b7d8cceea3bb6350a2b5c975c321 4326c797d590b7d8cceea3bb6350a2b5c975c321 committer 946771200 +0000 checkout: moving from main to A 4326c797d590b7d8cceea3bb6350a2b5c975c321 d94014964b0b086b4fbea9df5a07c085872368bc committer 946771200 +0000 commit: Rename foo, remove bar d94014964b0b086b4fbea9df5a07c085872368bc 4326c797d590b7d8cceea3bb6350a2b5c975c321 committer 946771200 +0000 checkout: moving from A to B 4326c797d590b7d8cceea3bb6350a2b5c975c321 95e9b001b7f3007f274180cb0e413776012d3df5 committer 946771200 +0000 commit: Rename bar, remove foo rename-rename-delete-delete/.git/info000075500000000000000000000000001046102023000161215ustar 00000000000000rename-rename-delete-delete/.git/info/exclude000064400000000000000000000003601046102023000175530ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-rename-delete-delete/.git/HEAD000064400000000000000000000000221046102023000156630ustar 00000000000000ref: refs/heads/B rename-rename-delete-delete/.git/objects000075500000000000000000000000001046102023000166175ustar 00000000000000rename-rename-delete-delete/.git/objects/25000075500000000000000000000000001046102023000170455ustar 00000000000000rename-rename-delete-delete/.git/objects/25/7cc5642cb1a054f08cc83f2d943e56fd3ebe99000064400000000000000000000000231046102023000244250ustar 00000000000000xKOR0aHUBrename-rename-delete-delete/.git/objects/7f000075500000000000000000000000001046102023000171335ustar 00000000000000rename-rename-delete-delete/.git/objects/7f/4883d0486568a818804851fbc9d49585058bc9000064400000000000000000000000601046102023000237460ustar 00000000000000x+)JMU06d040031QHJb;~gmVO}SmOrename-rename-delete-delete/.git/objects/de000075500000000000000000000000001046102023000172075ustar 00000000000000rename-rename-delete-delete/.git/objects/de/32b958eda718ad1b56f4f3d072552c9199b51a000064400000000000000000000000601046102023000243420ustar 00000000000000x+)JMU06d040031QHJb(7iJsWW?_rename-rename-delete-delete/.git/objects/info000075500000000000000000000000001046102023000175525ustar 00000000000000rename-rename-delete-delete/.git/objects/9a000075500000000000000000000000001046102023000171305ustar 00000000000000rename-rename-delete-delete/.git/objects/9a/7676edebe155944fa3519dd73c8f7484235662000064400000000000000000000000571046102023000241610ustar 00000000000000x+)JMU06d040031QHJbNK䝱WW] rename-rename-delete-delete/.git/objects/43000075500000000000000000000000001046102023000170455ustar 00000000000000rename-rename-delete-delete/.git/objects/43/26c797d590b7d8cceea3bb6350a2b5c975c321000064400000000000000000000001731046102023000243410ustar 00000000000000xeA 1 E] c 35AR)q߼χϵ{M"L2qƤ%$GN~ X>886en4m75rename-rename-delete-delete/.git/objects/81000075500000000000000000000000001046102023000170475ustar 00000000000000rename-rename-delete-delete/.git/objects/81/cff998d662b01fcbee71d39ac31b5387719b4b000064400000000000000000000000601046102023000244310ustar 00000000000000x+)JMU06d040031QHJbP9qAȇS rename-rename-delete-delete/.git/objects/75000075500000000000000000000000001046102023000170525ustar 00000000000000rename-rename-delete-delete/.git/objects/75/58fe92948f69d0ced5fc16477be7abe6e5e6ab000064400000000000000000000000461046102023000246230ustar 00000000000000xKOR06cG|.[JJ,ⲃ'.j rename-rename-delete-delete/.git/objects/89000075500000000000000000000000001046102023000170575ustar 00000000000000rename-rename-delete-delete/.git/objects/89/ff1a2aefcbff0f09197f0fd8beeb19a7b6e51c000064400000000000000000000001131046102023000250660ustar 00000000000000x+)JMU03b040031QHJ,b;~gmVO}SmNgP9qAȇS  rename-rename-delete-delete/.git/objects/pack000075500000000000000000000000001046102023000175355ustar 00000000000000rename-rename-delete-delete/.git/objects/d9000075500000000000000000000000001046102023000171335ustar 00000000000000rename-rename-delete-delete/.git/objects/d9/4014964b0b086b4fbea9df5a07c085872368bc000064400000000000000000000002511046102023000242630ustar 00000000000000xeK 1D]W$ɧA3xtO f"!w@֦k)7H 1!Xfbft.hRd088b=jcbɎ(8%=;kT~KmçO~=rBHCzZ[?:.̹ꪳLIOMRIrename-rename-delete-delete/.git/objects/3b000075500000000000000000000000001046102023000171235ustar 00000000000000rename-rename-delete-delete/.git/objects/3b/6665d7424b68aecb15b0643364452060eac667000064400000000000000000000000461046102023000240320ustar 00000000000000xKOR06c'".[J粃G. rename-rename-delete-delete/.git/objects/57000075500000000000000000000000001046102023000170525ustar 00000000000000rename-rename-delete-delete/.git/objects/57/16ca5987cbf97d6bb54920bea6adde242d87e6000064400000000000000000000000231046102023000245150ustar 00000000000000xKOR0aHJ,!3rename-rename-delete-delete/.git/objects/95000075500000000000000000000000001046102023000170545ustar 00000000000000rename-rename-delete-delete/.git/objects/95/e9b001b7f3007f274180cb0e413776012d3df5000064400000000000000000000002501046102023000240170ustar 00000000000000xe !E[o_>}}C rĢO(Ews.Tr5PZe7"=IC-0'P"uk40Z伛&J9FT&Z*|1~xW띏xc-Gk\g[mŅb˓a.ETHrename-rename-delete-delete/.git/config000064400000000000000000000002111046102023000164270ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-rename-delete-delete/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000227230ustar 0000000000000089ff1a2aefcbff0f09197f0fd8beeb19a7b6e51c rename-rename-delete-delete/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000220750ustar 0000000000000081cff998d662b01fcbee71d39ac31b5387719b4b rename-rename-delete-delete/baz000064400000000000000000000000041046102023000150750ustar 00000000000000bar rename-add000075500000000000000000000000001046102023000111065ustar 00000000000000rename-add/A-B.merge-info000064400000000000000000000004451046102023000135010ustar 0000000000000089f41b8375e72f7434c1d760058e4806fb2e7133100644 f286e5cdd97ac6895438ea4548638bb98ac9bd6b 2 bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 bar1barAuto-mergingAuto-merging bar 1barCONFLICT (contents)CONFLICT (add/add): Merge conflict in bar 1fooAuto-mergingAuto-merging foo rename-add/A-B-reversed.merge-info000064400000000000000000000004451046102023000153160ustar 000000000000005e3f226f4ffbb4790d4916516cee52d84135e203100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 bar100644 f286e5cdd97ac6895438ea4548638bb98ac9bd6b 3 bar1barAuto-mergingAuto-merging bar 1barCONFLICT (contents)CONFLICT (add/add): Merge conflict in bar 1fooAuto-mergingAuto-merging foo rename-add/.git000075500000000000000000000000001046102023000117475ustar 00000000000000rename-add/.git/COMMIT_EDITMSG000064400000000000000000000000221046102023000141070ustar 00000000000000rename foo to bar rename-add/.git/index000064400000000000000000000002111046102023000130520ustar 00000000000000DIRCgU)gU) 1mذTpr3 ubarTREE1 0 cpqE iUsJDTN/ ;rename-add/.git/refs000075500000000000000000000000001046102023000127065ustar 00000000000000rename-add/.git/refs/tags000075500000000000000000000000001046102023000136445ustar 00000000000000rename-add/.git/refs/heads000075500000000000000000000000001046102023000137725ustar 00000000000000rename-add/.git/refs/heads/B000064400000000000000000000000511046102023000141510ustar 000000000000002084a7daccbc3c1b906e6f20ba6c8efd188fa8ae rename-add/.git/refs/heads/main000064400000000000000000000000511046102023000147140ustar 00000000000000f93f0f31af52062323943046cecf524930cb346f rename-add/.git/refs/heads/A000064400000000000000000000000511046102023000141500ustar 00000000000000d3bb807308fa4859a3f2c85607741fd06607a8a0 rename-add/.git/hooks000075500000000000000000000000001046102023000130725ustar 00000000000000rename-add/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000175710ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-add/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000161300ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-add/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000173110ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-add/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000175300ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-add/.git/hooks/post-update.sample000075500000000000000000000002751046102023000166300ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-add/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000200740ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-add/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000165600ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-add/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000202040ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-add/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000173160ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-add/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000164350ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-add/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000164060ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-add/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000164300ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-add/.git/description000064400000000000000000000001111046102023000142650ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-add/.git/logs000075500000000000000000000000001046102023000127135ustar 00000000000000rename-add/.git/logs/refs000075500000000000000000000000001046102023000136525ustar 00000000000000rename-add/.git/logs/refs/heads000075500000000000000000000000001046102023000147365ustar 00000000000000rename-add/.git/logs/refs/heads/B000064400000000000000000000004741046102023000151260ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 branch: Created from main f93f0f31af52062323943046cecf524930cb346f 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae committer 946771200 +0000 commit: rename foo to bar rename-add/.git/logs/refs/heads/main000064400000000000000000000002371046102023000156660ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 commit (initial): original rename-add/.git/logs/refs/heads/A000064400000000000000000000004761046102023000151270ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 branch: Created from main f93f0f31af52062323943046cecf524930cb346f d3bb807308fa4859a3f2c85607741fd06607a8a0 committer 946771200 +0000 commit: Modify foo, add bar rename-add/.git/logs/HEAD000064400000000000000000000014421046102023000134170ustar 000000000000000000000000000000000000000000000000000000 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 commit (initial): original f93f0f31af52062323943046cecf524930cb346f f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 checkout: moving from main to A f93f0f31af52062323943046cecf524930cb346f d3bb807308fa4859a3f2c85607741fd06607a8a0 committer 946771200 +0000 commit: Modify foo, add bar d3bb807308fa4859a3f2c85607741fd06607a8a0 f93f0f31af52062323943046cecf524930cb346f committer 946771200 +0000 checkout: moving from A to B f93f0f31af52062323943046cecf524930cb346f 2084a7daccbc3c1b906e6f20ba6c8efd188fa8ae committer 946771200 +0000 commit: rename foo to bar rename-add/.git/info000075500000000000000000000000001046102023000127025ustar 00000000000000rename-add/.git/info/exclude000064400000000000000000000003601046102023000143340ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-add/.git/HEAD000064400000000000000000000000221046102023000124440ustar 00000000000000ref: refs/heads/B rename-add/.git/objects000075500000000000000000000000001046102023000134005ustar 00000000000000rename-add/.git/objects/f9000075500000000000000000000000001046102023000137165ustar 00000000000000rename-add/.git/objects/f9/3f0f31af52062323943046cecf524930cb346f000064400000000000000000000002001046102023000206620ustar 00000000000000xeK 1D]$0W鉭&FB2.+ [e]癭lL g`%^+~[I^\rGH({\qצ!hr-w^T6rename-add/.git/objects/d4000075500000000000000000000000001046102023000137075ustar 00000000000000rename-add/.git/objects/d4/d67f362277be2380a04eabd539a54efcb1f6ba000064400000000000000000000000711046102023000213300ustar 00000000000000xKOR05e'.C.#.c..S.3.[JLKK-J+QHI岃G.ˑrename-add/.git/objects/d3000075500000000000000000000000001046102023000137065ustar 00000000000000rename-add/.git/objects/d3/bb807308fa4859a3f2c85607741fd06607a8a0000064400000000000000000000002471046102023000207050ustar 00000000000000xeA 0E]Wd2I "M2Xz{ J]7eDk5g`Bw8IJѡfRK@tL-zq4EG >}0/|e>:D뷖+h{M.%M)!%CUoGhrename-add/.git/objects/0f000075500000000000000000000000001046102023000137055ustar 00000000000000rename-add/.git/objects/0f/3e8615b468480184cccc268cb8dc55fa810d94000064400000000000000000000000711046102023000210500ustar 00000000000000xKOR05eG̴ԢԼ̜T.[222222㲃'.Arename-add/.git/objects/63000075500000000000000000000000001046102023000136305ustar 00000000000000rename-add/.git/objects/63/ab700fa28671450d699ed2fedfcb55734a9608000064400000000000000000000000601046102023000210500ustar 00000000000000x+)JMU06d040031QHJ,bxÒƆ'EƼ_$O];yMrename-add/.git/objects/5e000075500000000000000000000000001046102023000137115ustar 00000000000000rename-add/.git/objects/5e/3f226f4ffbb4790d4916516cee52d84135e203000064400000000000000000000000601046102023000207620ustar 00000000000000x+)JMU06d040031QHJ,brL|rW-m rename-add/.git/objects/info000075500000000000000000000000001046102023000143335ustar 00000000000000rename-add/.git/objects/5c000075500000000000000000000000001046102023000137075ustar 00000000000000rename-add/.git/objects/5c/b03d2fc5ea53dcf61c816a9743424f1bbe15d3000064400000000000000000000000601046102023000212400ustar 00000000000000x+)JMU06d040031QHJ,b8pb/k2*S]Ԝurename-add/.git/objects/9a000075500000000000000000000000001046102023000137115ustar 00000000000000rename-add/.git/objects/9a/cba321a26d60972390b500904873ec2f586a51000064400000000000000000000000601046102023000206030ustar 00000000000000x+)JMU06d040031QHgpa j1{5y+Zl rename-add/.git/objects/44000075500000000000000000000000001046102023000136275ustar 00000000000000rename-add/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000206600ustar 00000000000000xKOR0d/LK22222pSrename-add/.git/objects/10000075500000000000000000000000001046102023000136205ustar 00000000000000rename-add/.git/objects/10/2a5c6a2b40767b77fe596b92374f0ac9e5c6e8000064400000000000000000000001051046102023000210500ustar 00000000000000xKOR07d'.C.#.c..S.3PH4N3H3沅̴ԢԼ̜T.;Pprename-add/.git/objects/8a000075500000000000000000000000001046102023000137105ustar 00000000000000rename-add/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000210460ustar 00000000000000xKOR04`02222(-Rrename-add/.git/objects/89000075500000000000000000000000001046102023000136405ustar 00000000000000rename-add/.git/objects/89/f41b8375e72f7434c1d760058e4806fb2e7133000064400000000000000000000000601046102023000205550ustar 00000000000000x+)JMU06d040031QHJ,bkݒrZώ;y rename-add/.git/objects/pack000075500000000000000000000000001046102023000143165ustar 00000000000000rename-add/.git/objects/20000075500000000000000000000000001046102023000136215ustar 00000000000000rename-add/.git/objects/20/84a7daccbc3c1b906e6f20ba6c8efd188fa8ae000064400000000000000000000002441046102023000215520ustar 00000000000000xej1 D{WZK+!+B]B?йcVǀmt3=!M+k",v5DX g²YG_GΥw,' s߆u )-N=6G4rename-add/.git/objects/ec000075500000000000000000000000001046102023000137675ustar 00000000000000rename-add/.git/objects/ec/046db5d8b05470e472330d75f419c81ed6c9d3000064400000000000000000000000451046102023000210440ustar 00000000000000xKOR02d/LK222222}rename-add/.git/objects/f5000075500000000000000000000000001046102023000137125ustar 00000000000000rename-add/.git/objects/f5/82baa0fc8926ed539bcc8d3be0e7b5835ea566000064400000000000000000000000571046102023000213570ustar 00000000000000x+)JMU06d040031QHJ,bЊv(.=ܟc/ޣ rename-add/.git/objects/f2000075500000000000000000000000001046102023000137075ustar 00000000000000rename-add/.git/objects/f2/86e5cdd97ac6895438ea4548638bb98ac9bd6b000064400000000000000000000000371046102023000212460ustar 00000000000000xKOR04eHLKK-J+QHI[Erename-add/.git/objects/c0000075500000000000000000000000001046102023000137025ustar 00000000000000rename-add/.git/objects/c0/c98f0a75d171382e17a3f4ac68796545ec7cce000064400000000000000000000001051046102023000211330ustar 00000000000000xKOR07dG̴ԢԼ̜TPH4N3H3沅.C.#.c..S.3.;Pprename-add/.git/objects/b4000075500000000000000000000000001046102023000137055ustar 00000000000000rename-add/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000206020ustar 00000000000000xKOR04b022222/crename-add/.git/objects/69000075500000000000000000000000001046102023000136365ustar 00000000000000rename-add/.git/objects/69/dae129898f07490b6153f20ac5c58fddc80162000064400000000000000000000001131046102023000207670ustar 00000000000000x+)JMU03b040031QHJ,bͪc!\=wvܛ NgX䥨m̢?? rename-add/.git/config000064400000000000000000000002111046102023000132100ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-add/bar000064400000000000000000000000251046102023000116510ustar 00000000000000original 1 2 3 4 5 6 rename-add/A-B-diff3.merge-info000064400000000000000000000004451046102023000144720ustar 000000000000005cb03d2fc5ea53dcf61c816a9743424f1bbe15d3100644 f286e5cdd97ac6895438ea4548638bb98ac9bd6b 2 bar100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 bar1barAuto-mergingAuto-merging bar 1barCONFLICT (contents)CONFLICT (add/add): Merge conflict in bar 1fooAuto-mergingAuto-merging foo rename-add/A-B-diff3-reversed.merge-info000064400000000000000000000004451046102023000163070ustar 00000000000000f582baa0fc8926ed539bcc8d3be0e7b5835ea566100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 bar100644 f286e5cdd97ac6895438ea4548638bb98ac9bd6b 3 bar1barAuto-mergingAuto-merging bar 1barCONFLICT (contents)CONFLICT (add/add): Merge conflict in bar 1fooAuto-mergingAuto-merging foo tree-to-non-tree000075500000000000000000000000001046102023000122155ustar 00000000000000tree-to-non-tree/A-B.merge-info000064400000000000000000000007301046102023000146050ustar 00000000000000a8207e6ea6f4f9c58832fa1b3000b2dee122a08a100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/b100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 a/sub/b100644 fa49b077972391ad58037050f2a75f74e3671e92 3 a~B1a/sub/bCONFLICT (modify/delete)CONFLICT (modify/delete): a/sub/b deleted in B and modified in A. Version A of a/sub/b left in tree. 2a~BaCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of a from B; moving it to a~B instead. tree-to-non-tree/A-B-reversed.merge-info000064400000000000000000000007301046102023000164220ustar 00000000000000a8207e6ea6f4f9c58832fa1b3000b2dee122a08a100644 44065282f89b9bd6439ed2e4674721383fd987eb 1 a/sub/b100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 a/sub/b100644 fa49b077972391ad58037050f2a75f74e3671e92 2 a~B1a/sub/bCONFLICT (modify/delete)CONFLICT (modify/delete): a/sub/b deleted in B and modified in A. Version A of a/sub/b left in tree. 2a~BaCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of a from B; moving it to a~B instead. tree-to-non-tree/.git000075500000000000000000000000001046102023000130565ustar 00000000000000tree-to-non-tree/.git/COMMIT_EDITMSG000064400000000000000000000000371046102023000152240ustar 00000000000000rm -Rf a/ && add non-empty 'a' tree-to-non-tree/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000206130ustar 000000000000009a41ba54e914316dee2a65475f1d0e0890f9ddfb tree-to-non-tree/.git/index000064400000000000000000000002011046102023000141600ustar 00000000000000DIRCIw#XpP_tgaTREE1 0 J0P+ %=5OZul2\X⎒.ҝ8XEZtree-to-non-tree/.git/refs000075500000000000000000000000001046102023000140155ustar 00000000000000tree-to-non-tree/.git/refs/tags000075500000000000000000000000001046102023000147535ustar 00000000000000tree-to-non-tree/.git/refs/heads000075500000000000000000000000001046102023000151015ustar 00000000000000tree-to-non-tree/.git/refs/heads/B000064400000000000000000000000511046102023000152600ustar 000000000000007f7724fe3bb9152a2eb126f95a8ca8f5780edc9b tree-to-non-tree/.git/refs/heads/main000064400000000000000000000000511046102023000160230ustar 000000000000009fa918ebcb4e71d65111bf426d3bb20463c8a9a6 tree-to-non-tree/.git/refs/heads/A000064400000000000000000000000511046102023000152570ustar 000000000000004b223685fb54ccf8e390739440ddd65f69ead854 tree-to-non-tree/.git/hooks000075500000000000000000000000001046102023000142015ustar 00000000000000tree-to-non-tree/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000207000ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 tree-to-non-tree/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000172370ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 tree-to-non-tree/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000204200ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : tree-to-non-tree/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000206370ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : tree-to-non-tree/.git/hooks/post-update.sample000075500000000000000000000002751046102023000177370ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info tree-to-non-tree/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000212030ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi tree-to-non-tree/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000176670ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi tree-to-non-tree/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000213130ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } tree-to-non-tree/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000204250ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : tree-to-non-tree/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000175440ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- tree-to-non-tree/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000175150ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END tree-to-non-tree/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000175370ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } tree-to-non-tree/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000177650ustar 000000000000004afb30502b0df0253d354f1ed4f2e95a75df6c32 tree-to-non-tree/.git/description000064400000000000000000000001111046102023000153740ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. tree-to-non-tree/.git/logs000075500000000000000000000000001046102023000140225ustar 00000000000000tree-to-non-tree/.git/logs/refs000075500000000000000000000000001046102023000147615ustar 00000000000000tree-to-non-tree/.git/logs/refs/heads000075500000000000000000000000001046102023000160455ustar 00000000000000tree-to-non-tree/.git/logs/refs/heads/B000064400000000000000000000005111046102023000162250ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 branch: Created from main 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 7f7724fe3bb9152a2eb126f95a8ca8f5780edc9b committer 946771200 +0000 commit: rm -Rf a/ && add non-empty 'a' tree-to-non-tree/.git/logs/refs/heads/main000064400000000000000000000002331046102023000167710ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 commit (initial): init tree-to-non-tree/.git/logs/refs/heads/A000064400000000000000000000005001046102023000162220ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 branch: Created from main 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 4b223685fb54ccf8e390739440ddd65f69ead854 committer 946771200 +0000 commit: 'A' changes 'a/sub/b' tree-to-non-tree/.git/logs/HEAD000064400000000000000000000014551046102023000145320ustar 000000000000000000000000000000000000000000000000000000 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 commit (initial): init 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 checkout: moving from main to A 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 4b223685fb54ccf8e390739440ddd65f69ead854 committer 946771200 +0000 commit: 'A' changes 'a/sub/b' 4b223685fb54ccf8e390739440ddd65f69ead854 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 committer 946771200 +0000 checkout: moving from A to B 9fa918ebcb4e71d65111bf426d3bb20463c8a9a6 7f7724fe3bb9152a2eb126f95a8ca8f5780edc9b committer 946771200 +0000 commit: rm -Rf a/ && add non-empty 'a' tree-to-non-tree/.git/info000075500000000000000000000000001046102023000140115ustar 00000000000000tree-to-non-tree/.git/info/exclude000064400000000000000000000003601046102023000154430ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ tree-to-non-tree/.git/HEAD000064400000000000000000000000221046102023000135530ustar 00000000000000ref: refs/heads/B tree-to-non-tree/.git/objects000075500000000000000000000000001046102023000145075ustar 00000000000000tree-to-non-tree/.git/objects/7f000075500000000000000000000000001046102023000150235ustar 00000000000000tree-to-non-tree/.git/objects/7f/7724fe3bb9152a2eb126f95a8ca8f5780edc9b000064400000000000000000000002611046102023000224070ustar 00000000000000xeM 0]o.4 KiK|R rV@c.OK2: J:KIF%ق>#49BM*ɵUqD] <r]v#k:U÷ uY-030%i'سGJtree-to-non-tree/.git/objects/85000075500000000000000000000000001046102023000147435ustar 00000000000000tree-to-non-tree/.git/objects/85/f97d1749104d0d9624b7a3c687f8bfd514a1b9000064400000000000000000000001071046102023000221110ustar 00000000000000x+)JMU0`040031QHb""St/-.i @%}4{kݚʣnz<Ntree-to-non-tree/.git/objects/4a000075500000000000000000000000001046102023000150135ustar 00000000000000tree-to-non-tree/.git/objects/4a/fb30502b0df0253d354f1ed4f2e95a75df6c32000064400000000000000000000000561046102023000222710ustar 00000000000000x+)JMU0d040031QHd幡|ĵǗ2Y:PBVJMQ iԌsT Hmtree-to-non-tree/.git/objects/fb000075500000000000000000000000001046102023000150765ustar 00000000000000tree-to-non-tree/.git/objects/fb/8347d2649a3d93079ae7906bc24a3b85d04576000064400000000000000000000000551046102023000220260ustar 00000000000000x+)JMU06`01$QWTQ }s٢eIVtree-to-non-tree/.git/objects/a2000075500000000000000000000000001046102023000150115ustar 00000000000000tree-to-non-tree/.git/objects/a2/1cbd21058106b06371ae02d7258eb20c015dec000064400000000000000000000001201046102023000220670ustar 00000000000000x+)JMU`040031QHax6M9{wk+qIODd*VI P(.MbX寤βdɏMc ]=(Ttree-to-non-tree/.git/objects/b4000075500000000000000000000000001046102023000150145ustar 00000000000000tree-to-non-tree/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000217110ustar 00000000000000xKOR04b022222/ctree-to-non-tree/.git/objects/5f000075500000000000000000000000001046102023000150215ustar 00000000000000tree-to-non-tree/.git/objects/5f/6dd75af7ab507972ec2252fbd9bb36a2977662000064400000000000000000000000561046102023000222510ustar 00000000000000x+)JMU0d040031QHb""St/-.i Y tree-to-non-tree/.git/objects/60000075500000000000000000000000001046102023000147345ustar 00000000000000tree-to-non-tree/.git/objects/60/2c8b837694ec0eb26afe65e98e5e9747464dde000064400000000000000000000000531046102023000222700ustar 00000000000000x+)JMU0`01D)p~)s}Ft [tree-to-non-tree/.git/config000064400000000000000000000002111046102023000143170ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true tree-to-non-tree/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000206130ustar 000000000000009a41ba54e914316dee2a65475f1d0e0890f9ddfb tree-to-non-tree/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000177650ustar 00000000000000c4d29f3ba5ef7a7eb8e13c756b98ca8e208b8543 tree-to-non-tree/a000064400000000000000000000000111046102023000124270ustar 00000000000000new file same-rename-different-mode000075500000000000000000000000001046102023000141715ustar 00000000000000same-rename-different-mode/A-B.merge-info000064400000000000000000000004641046102023000165650ustar 0000000000000005209c13a7736c3c40fb7e55c73ce37af06c01ab100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 a-renamed/w100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 3 a-renamed/w1a-renamed/wCONFLICT (contents)CONFLICT (add/add): Merge conflict in a-renamed/w 1a-renamed/x.fAuto-mergingAuto-merging a-renamed/x.f same-rename-different-mode/A-B-reversed.merge-info000064400000000000000000000004641046102023000204020ustar 000000000000004fe6c406ac3b25f978003c6c0d7a92e90c27b32f100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 a-renamed/w100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 3 a-renamed/w1a-renamed/wCONFLICT (contents)CONFLICT (add/add): Merge conflict in a-renamed/w 1a-renamed/x.fAuto-mergingAuto-merging a-renamed/x.f same-rename-different-mode/.git000075500000000000000000000000001046102023000150325ustar 00000000000000same-rename-different-mode/.git/COMMIT_EDITMSG000064400000000000000000000001431046102023000171760ustar 00000000000000Git, when branches are reversed, doesn't keep the +x flag on a/w so we specify our own expectation same-rename-different-mode/.git/index000064400000000000000000000004031046102023000161400ustar 00000000000000DIRCgULLgUF 8⛲CK)wZS a-renamed/wgU'gU' 8  JX+p a-renamed/x.fTREE;2 1  sl<@~U&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 same-rename-different-mode/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000212130ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 same-rename-different-mode/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000223740ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : same-rename-different-mode/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000226130ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : same-rename-different-mode/.git/hooks/post-update.sample000075500000000000000000000002751046102023000217130ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info same-rename-different-mode/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000231570ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi same-rename-different-mode/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000216430ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi same-rename-different-mode/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000232670ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } same-rename-different-mode/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000224010ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : same-rename-different-mode/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000215200ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- same-rename-different-mode/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000214710ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END same-rename-different-mode/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000215130ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } same-rename-different-mode/.git/description000064400000000000000000000001111046102023000173500ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. same-rename-different-mode/.git/logs000075500000000000000000000000001046102023000157765ustar 00000000000000same-rename-different-mode/.git/logs/refs000075500000000000000000000000001046102023000167355ustar 00000000000000same-rename-different-mode/.git/logs/refs/heads000075500000000000000000000000001046102023000200215ustar 00000000000000same-rename-different-mode/.git/logs/refs/heads/B000064400000000000000000000005261046102023000202070ustar 000000000000000000000000000000000000000000000000000000 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 branch: Created from main 485010655d6ceebbde1db981be5fd91dee22a038 429d0fdcf8bb6651338467e5d785a8a5bd30de06 committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed same-rename-different-mode/.git/logs/refs/heads/main000064400000000000000000000002371046102023000207510ustar 000000000000000000000000000000000000000000000000000000 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 commit (initial): original same-rename-different-mode/.git/logs/refs/heads/A000064400000000000000000000005421046102023000202040ustar 000000000000000000000000000000000000000000000000000000 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 branch: Created from main 485010655d6ceebbde1db981be5fd91dee22a038 8e75814cfd9d503b00605595866c56a245ebb345 committer 946771200 +0000 commit: changed a/xf, add +x everywhere, renamed a -> a-renamed same-rename-different-mode/.git/logs/refs/heads/expected000064400000000000000000000006151046102023000216260ustar 000000000000000000000000000000000000000000000000000000 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 branch: Created from main 485010655d6ceebbde1db981be5fd91dee22a038 151d9aa9de31ce12b32954a897289caf6358a723 committer 946771200 +0000 commit: Git, when branches are reversed, doesn't keep the +x flag on a/w so we specify our own expectation same-rename-different-mode/.git/logs/HEAD000064400000000000000000000023671046102023000165110ustar 000000000000000000000000000000000000000000000000000000 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 commit (initial): original 485010655d6ceebbde1db981be5fd91dee22a038 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 checkout: moving from main to A 485010655d6ceebbde1db981be5fd91dee22a038 8e75814cfd9d503b00605595866c56a245ebb345 committer 946771200 +0000 commit: changed a/xf, add +x everywhere, renamed a -> a-renamed 8e75814cfd9d503b00605595866c56a245ebb345 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 checkout: moving from A to B 485010655d6ceebbde1db981be5fd91dee22a038 429d0fdcf8bb6651338467e5d785a8a5bd30de06 committer 946771200 +0000 commit: changed all content, renamed a -> a-renamed 429d0fdcf8bb6651338467e5d785a8a5bd30de06 485010655d6ceebbde1db981be5fd91dee22a038 committer 946771200 +0000 checkout: moving from B to expected 485010655d6ceebbde1db981be5fd91dee22a038 151d9aa9de31ce12b32954a897289caf6358a723 committer 946771200 +0000 commit: Git, when branches are reversed, doesn't keep the +x flag on a/w so we specify our own expectation same-rename-different-mode/.git/info000075500000000000000000000000001046102023000157655ustar 00000000000000same-rename-different-mode/.git/info/exclude000064400000000000000000000003601046102023000174170ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ same-rename-different-mode/.git/HEAD000064400000000000000000000000311046102023000155270ustar 00000000000000ref: refs/heads/expected same-rename-different-mode/.git/objects000075500000000000000000000000001046102023000164635ustar 00000000000000same-rename-different-mode/.git/objects/8e000075500000000000000000000000001046102023000167775ustar 00000000000000same-rename-different-mode/.git/objects/8e/75814cfd9d503b00605595866c56a245ebb345000064400000000000000000000002751046102023000237220ustar 00000000000000xeNAn0 ٯн&9cEȑ ;RIpZKyo`}jUl}Ƥ(2l&uiY\\깁 &՜EIrϽCTe϶tWݸ\>yZ !;0ٷ5/;dY3-|~S~=6/Ec p? T9same-rename-different-mode/.git/objects/7a000075500000000000000000000000001046102023000167725ustar 00000000000000same-rename-different-mode/.git/objects/7a/b2e11bd8be120e9c7df451c448cdd5f23fe745000064400000000000000000000001111046102023000244140ustar 00000000000000x+)JMU03`040075U(gx6M9{wk+qIODd^Ƨ{IDlpI[2 same-rename-different-mode/.git/objects/15000075500000000000000000000000001046102023000167105ustar 00000000000000same-rename-different-mode/.git/objects/15/1d9aa9de31ce12b32954a897289caf6358a723000064400000000000000000000003361046102023000240560ustar 00000000000000xeN0=sm)l7?KYeL%&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-and-modification/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000206050ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-and-modification/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000217660ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-and-modification/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000222050ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-and-modification/.git/hooks/post-update.sample000075500000000000000000000002751046102023000213050ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-and-modification/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000225510ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-and-modification/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000212350ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-and-modification/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000226610ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-and-modification/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000217730ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-and-modification/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000211120ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-and-modification/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000210630ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-and-modification/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000211050ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-and-modification/.git/description000064400000000000000000000001111046102023000167420ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-and-modification/.git/logs000075500000000000000000000000001046102023000153705ustar 00000000000000rename-and-modification/.git/logs/refs000075500000000000000000000000001046102023000163275ustar 00000000000000rename-and-modification/.git/logs/refs/heads000075500000000000000000000000001046102023000174135ustar 00000000000000rename-and-modification/.git/logs/refs/heads/B000064400000000000000000000004701046102023000175770ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 branch: Created from main a80891d88650998268c93a07b48dff45fc8fbcfd 01543f61899d828adc10ae50d9475e0d7ee497b3 committer 946771200 +0000 commit: changed a/x.f rename-and-modification/.git/logs/refs/heads/main000064400000000000000000000002371046102023000203430ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 commit (initial): original rename-and-modification/.git/logs/refs/heads/A000064400000000000000000000005061046102023000175760ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 branch: Created from main a80891d88650998268c93a07b48dff45fc8fbcfd d6034e249b070a3f621d250f284299ef549af72a committer 946771200 +0000 commit: move a/x.f to the top-level rename-and-modification/.git/logs/HEAD000064400000000000000000000014461046102023000161000ustar 000000000000000000000000000000000000000000000000000000 a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 commit (initial): original a80891d88650998268c93a07b48dff45fc8fbcfd a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 checkout: moving from main to A a80891d88650998268c93a07b48dff45fc8fbcfd d6034e249b070a3f621d250f284299ef549af72a committer 946771200 +0000 commit: move a/x.f to the top-level d6034e249b070a3f621d250f284299ef549af72a a80891d88650998268c93a07b48dff45fc8fbcfd committer 946771200 +0000 checkout: moving from A to B a80891d88650998268c93a07b48dff45fc8fbcfd 01543f61899d828adc10ae50d9475e0d7ee497b3 committer 946771200 +0000 commit: changed a/x.f rename-and-modification/.git/info000075500000000000000000000000001046102023000153575ustar 00000000000000rename-and-modification/.git/info/exclude000064400000000000000000000003601046102023000170110ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-and-modification/.git/HEAD000064400000000000000000000000221046102023000151210ustar 00000000000000ref: refs/heads/B rename-and-modification/.git/objects000075500000000000000000000000001046102023000160555ustar 00000000000000rename-and-modification/.git/objects/a8000075500000000000000000000000001046102023000163655ustar 00000000000000rename-and-modification/.git/objects/a8/0891d88650998268c93a07b48dff45fc8fbcfd000064400000000000000000000002011046102023000236360ustar 00000000000000xe 0D=+.H6.WHPa`KΩkUc EY&4 8HAȳJ/X0|!'kaoLV ?7nۏkJMtռ*7#rename-and-modification/.git/objects/01000075500000000000000000000000001046102023000162755ustar 00000000000000rename-and-modification/.git/objects/01/543f61899d828adc10ae50d9475e0d7ee497b3000064400000000000000000000002421046102023000234510ustar 00000000000000xe 0E]+dEt}" (uÅy~T5jY\D3Z}{gh2X"&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 non-tree-to-tree/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000172370ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 non-tree-to-tree/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000204200ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : non-tree-to-tree/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000206370ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : non-tree-to-tree/.git/hooks/post-update.sample000075500000000000000000000002751046102023000177370ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info non-tree-to-tree/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000212030ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi non-tree-to-tree/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000176670ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi non-tree-to-tree/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000213130ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } non-tree-to-tree/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000204250ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : non-tree-to-tree/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000175440ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- non-tree-to-tree/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000175150ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END non-tree-to-tree/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000175370ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } non-tree-to-tree/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000177650ustar 000000000000002673061650b1a3328dcfffcc036f585d9829ab73 non-tree-to-tree/.git/description000064400000000000000000000001111046102023000153740ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. non-tree-to-tree/.git/logs000075500000000000000000000000001046102023000140225ustar 00000000000000non-tree-to-tree/.git/logs/refs000075500000000000000000000000001046102023000147615ustar 00000000000000non-tree-to-tree/.git/logs/refs/heads000075500000000000000000000000001046102023000160455ustar 00000000000000non-tree-to-tree/.git/logs/refs/heads/B000064400000000000000000000005361046102023000162340ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 branch: Created from main 07922b1229e4b3c7f55eadc5d759618997f820a5 417f665bb59cf77d66148f6d23b2af70ea934c09 committer 946771200 +0000 commit: mv 'a' to 'a/sub/b', populate 'a/' with empty files non-tree-to-tree/.git/logs/refs/heads/main000064400000000000000000000002331046102023000167710ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 commit (initial): init non-tree-to-tree/.git/logs/refs/heads/A000064400000000000000000000004721046102023000162320ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 branch: Created from main 07922b1229e4b3c7f55eadc5d759618997f820a5 02ce1376dec77fa0bec1ac442b7480c8ebefa664 committer 946771200 +0000 commit: 'A' changes 'a' non-tree-to-tree/.git/logs/HEAD000064400000000000000000000014741046102023000145330ustar 000000000000000000000000000000000000000000000000000000 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 commit (initial): init 07922b1229e4b3c7f55eadc5d759618997f820a5 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 checkout: moving from main to A 07922b1229e4b3c7f55eadc5d759618997f820a5 02ce1376dec77fa0bec1ac442b7480c8ebefa664 committer 946771200 +0000 commit: 'A' changes 'a' 02ce1376dec77fa0bec1ac442b7480c8ebefa664 07922b1229e4b3c7f55eadc5d759618997f820a5 committer 946771200 +0000 checkout: moving from A to B 07922b1229e4b3c7f55eadc5d759618997f820a5 417f665bb59cf77d66148f6d23b2af70ea934c09 committer 946771200 +0000 commit: mv 'a' to 'a/sub/b', populate 'a/' with empty files non-tree-to-tree/.git/info000075500000000000000000000000001046102023000140115ustar 00000000000000non-tree-to-tree/.git/info/exclude000064400000000000000000000003601046102023000154430ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ non-tree-to-tree/.git/HEAD000064400000000000000000000000221046102023000135530ustar 00000000000000ref: refs/heads/B non-tree-to-tree/.git/objects000075500000000000000000000000001046102023000145075ustar 00000000000000non-tree-to-tree/.git/objects/23000075500000000000000000000000001046102023000147335ustar 00000000000000non-tree-to-tree/.git/objects/23/ec07147738552204dbc9ebcd7e4a5a5e0d9573000064400000000000000000000000561046102023000221510ustar 00000000000000x+)JMU0d040031QHd""St/-.i C non-tree-to-tree/.git/objects/41000075500000000000000000000000001046102023000147335ustar 00000000000000non-tree-to-tree/.git/objects/41/7f665bb59cf77d66148f6d23b2af70ea934c09000064400000000000000000000003011046102023000221630ustar 00000000000000xej0EW΋FyP+<"+!!]nj)s$Wf@c4ʐ*hnJ9甤6MޡjʗzĨ=Q'8L&K(e ~+|uCޠն- 53piU Qnon-tree-to-tree/.git/objects/e6000075500000000000000000000000001046102023000150215ustar 00000000000000non-tree-to-tree/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000223250ustar 00000000000000xKOR0` non-tree-to-tree/.git/objects/6d000075500000000000000000000000001046102023000150205ustar 00000000000000non-tree-to-tree/.git/objects/6d/64e6ce6982fe066d23fb83fb7958b2e40c18fd000064400000000000000000000000561046102023000223430ustar 00000000000000x+)JMU0d040031QHdpa j1{5y+Zl ޶6non-tree-to-tree/.git/objects/info000075500000000000000000000000001046102023000154425ustar 00000000000000non-tree-to-tree/.git/objects/07000075500000000000000000000000001046102023000147355ustar 00000000000000non-tree-to-tree/.git/objects/07/922b1229e4b3c7f55eadc5d759618997f820a5000064400000000000000000000001751046102023000220370ustar 00000000000000xeQ !{W{ٺ;]I ك~~Bq=400Z Ǹ cd d3kdҰgZ-; 外Mn7O^O HR_~4}ʣz6non-tree-to-tree/.git/objects/44000075500000000000000000000000001046102023000147365ustar 00000000000000non-tree-to-tree/.git/objects/44/065282f89b9bd6439ed2e4674721383fd987eb000064400000000000000000000000431046102023000217670ustar 00000000000000xKOR0d/LK22222pSnon-tree-to-tree/.git/objects/72000075500000000000000000000000001046102023000147375ustar 00000000000000non-tree-to-tree/.git/objects/72/e4c66605ede5e5e96acd8c1aba33004b0a2c89000064400000000000000000000001211046102023000223510ustar 00000000000000x+)JMU`040031QHax6M9{wk+qIODd*VI P(.Mb{b븾_@$~]T +Nnon-tree-to-tree/.git/objects/26000075500000000000000000000000001046102023000147365ustar 00000000000000non-tree-to-tree/.git/objects/26/73061650b1a3328dcfffcc036f585d9829ab73000064400000000000000000000000531046102023000220720ustar 00000000000000x+)JMU0`01D'X>}2l.co.N non-tree-to-tree/.git/objects/7e000075500000000000000000000000001046102023000150225ustar 00000000000000non-tree-to-tree/.git/objects/7e/e5a8b39be5ae0af7d7b50de01465df7e5a8a18000064400000000000000000000000631046102023000225340ustar 00000000000000x+)JMU0`040031QHbx6M9{wk+qIODd2VI|non-tree-to-tree/.git/objects/pack000075500000000000000000000000001046102023000154255ustar 00000000000000non-tree-to-tree/.git/objects/b4000075500000000000000000000000001046102023000150145ustar 00000000000000non-tree-to-tree/.git/objects/b4/14108e81e5091fe0974a1858b4d0d22b107f70000064400000000000000000000000341046102023000217110ustar 00000000000000xKOR04b022222/cnon-tree-to-tree/.git/objects/02000075500000000000000000000000001046102023000147305ustar 00000000000000non-tree-to-tree/.git/objects/02/ce1376dec77fa0bec1ac442b7480c8ebefa664000064400000000000000000000002451046102023000225200ustar 00000000000000xe 0=)փ 6M>6٪`|| J=8o`<+Yhv̍'B.1hRqc:1JB[xh}2l.co.NC3:G-"}O9Lrᒶ@}*non-tree-to-tree/.git/config000064400000000000000000000002111046102023000143170ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true non-tree-to-tree/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000206130ustar 000000000000006d64e6ce6982fe066d23fb83fb7958b2e40c18fd non-tree-to-tree/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000177650ustar 0000000000000023ec07147738552204dbc9ebcd7e4a5a5e0d9573 non-tree-to-tree/a000075500000000000000000000000001046102023000124355ustar 00000000000000non-tree-to-tree/a/e000064400000000000000000000000001046102023000126510ustar 00000000000000non-tree-to-tree/a/d000064400000000000000000000000001046102023000126500ustar 00000000000000non-tree-to-tree/a/sub000075500000000000000000000000001046102023000132265ustar 00000000000000non-tree-to-tree/a/sub/b000064400000000000000000000000001046102023000134370ustar 00000000000000non-tree-to-tree/a/sub/c000064400000000000000000000000001046102023000134400ustar 00000000000000both-modify-binary000075500000000000000000000000001046102023000126145ustar 00000000000000both-modify-binary/A-B.merge-info000064400000000000000000000006231046102023000152050ustar 00000000000000c31ccfdf54c7507a197f140aacf868466d6aeb2f100644 c3a4a22dbc10394da3b7829479d7cbc878e3f57a 1 a/x.f100644 ac56aa625fe7aa05a3d362fb1bb97540309db2f5 2 a/x.f100644 3fde2f0602118ecf0b1b14d4afcbffb491ad7a33 3 a/x.f1a/x.fCONFLICT (binary)warning: Cannot merge binary files: a/x.f (A vs. B) 1a/x.fAuto-mergingAuto-merging a/x.f 1a/x.fCONFLICT (contents)CONFLICT (content): Merge conflict in a/x.f both-modify-binary/A-B-reversed.merge-info000064400000000000000000000006231046102023000170220ustar 000000000000000c309141d0d70f030d2a3202c2df02181c93f258100644 c3a4a22dbc10394da3b7829479d7cbc878e3f57a 1 a/x.f100644 3fde2f0602118ecf0b1b14d4afcbffb491ad7a33 2 a/x.f100644 ac56aa625fe7aa05a3d362fb1bb97540309db2f5 3 a/x.f1a/x.fCONFLICT (binary)warning: Cannot merge binary files: a/x.f (B vs. A) 1a/x.fAuto-mergingAuto-merging a/x.f 1a/x.fCONFLICT (contents)CONFLICT (content): Merge conflict in a/x.f both-modify-binary/.git000075500000000000000000000000001046102023000134555ustar 00000000000000both-modify-binary/.git/COMMIT_EDITMSG000064400000000000000000000000371046102023000156230ustar 00000000000000change binary file differently both-modify-binary/.git/index000064400000000000000000000002431046102023000145650ustar 00000000000000DIRCgU#(vgU#(v <?/ ԯz3a/x.fTREE31 1 0A *2Xa1 0 Hv:FZ0T14{rRfoD uEboth-modify-binary/.git/refs000075500000000000000000000000001046102023000144145ustar 00000000000000both-modify-binary/.git/refs/tags000075500000000000000000000000001046102023000153525ustar 00000000000000both-modify-binary/.git/refs/heads000075500000000000000000000000001046102023000155005ustar 00000000000000both-modify-binary/.git/refs/heads/B000064400000000000000000000000511046102023000156570ustar 000000000000007a5528d43f13ed1af81d881479e93bbd92a45529 both-modify-binary/.git/refs/heads/main000064400000000000000000000000511046102023000164220ustar 0000000000000072d2727e70b906de668f1c73a3d3a19dd452811f both-modify-binary/.git/refs/heads/A000064400000000000000000000000511046102023000156560ustar 000000000000005b1bbb91e22922cc099c7def751ca1ee42dec330 both-modify-binary/.git/hooks000075500000000000000000000000001046102023000146005ustar 00000000000000both-modify-binary/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000212770ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 both-modify-binary/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000176360ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 both-modify-binary/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000210170ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : both-modify-binary/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000212360ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : both-modify-binary/.git/hooks/post-update.sample000075500000000000000000000002751046102023000203360ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info both-modify-binary/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000216020ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi both-modify-binary/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000202660ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi both-modify-binary/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000217120ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } both-modify-binary/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000210240ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : both-modify-binary/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000201430ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- both-modify-binary/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000201140ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END both-modify-binary/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000201360ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } both-modify-binary/.git/description000064400000000000000000000001111046102023000157730ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. both-modify-binary/.git/logs000075500000000000000000000000001046102023000144215ustar 00000000000000both-modify-binary/.git/logs/refs000075500000000000000000000000001046102023000153605ustar 00000000000000both-modify-binary/.git/logs/refs/heads000075500000000000000000000000001046102023000164445ustar 00000000000000both-modify-binary/.git/logs/refs/heads/B000064400000000000000000000005111046102023000166240ustar 000000000000000000000000000000000000000000000000000000 72d2727e70b906de668f1c73a3d3a19dd452811f committer 946771200 +0000 branch: Created from main 72d2727e70b906de668f1c73a3d3a19dd452811f 7a5528d43f13ed1af81d881479e93bbd92a45529 committer 946771200 +0000 commit: change binary file differently both-modify-binary/.git/logs/refs/heads/main000064400000000000000000000002371046102023000173740ustar 000000000000000000000000000000000000000000000000000000 72d2727e70b906de668f1c73a3d3a19dd452811f committer 946771200 +0000 commit (initial): original both-modify-binary/.git/logs/refs/heads/A000064400000000000000000000004751046102023000166340ustar 000000000000000000000000000000000000000000000000000000 72d2727e70b906de668f1c73a3d3a19dd452811f committer 946771200 +0000 branch: Created from main 72d2727e70b906de668f1c73a3d3a19dd452811f 5b1bbb91e22922cc099c7def751ca1ee42dec330 committer 946771200 +0000 commit: change binary file both-modify-binary/.git/logs/HEAD000064400000000000000000000014561046102023000151320ustar 000000000000000000000000000000000000000000000000000000 72d2727e70b906de668f1c73a3d3a19dd452811f committer 946771200 +0000 commit (initial): original 72d2727e70b906de668f1c73a3d3a19dd452811f 72d2727e70b906de668f1c73a3d3a19dd452811f committer 946771200 +0000 checkout: moving from main to A 72d2727e70b906de668f1c73a3d3a19dd452811f 5b1bbb91e22922cc099c7def751ca1ee42dec330 committer 946771200 +0000 commit: change binary file 5b1bbb91e22922cc099c7def751ca1ee42dec330 72d2727e70b906de668f1c73a3d3a19dd452811f committer 946771200 +0000 checkout: moving from A to B 72d2727e70b906de668f1c73a3d3a19dd452811f 7a5528d43f13ed1af81d881479e93bbd92a45529 committer 946771200 +0000 commit: change binary file differently both-modify-binary/.git/info000075500000000000000000000000001046102023000144105ustar 00000000000000both-modify-binary/.git/info/exclude000064400000000000000000000003601046102023000160420ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ both-modify-binary/.git/HEAD000064400000000000000000000000221046102023000141520ustar 00000000000000ref: refs/heads/B both-modify-binary/.git/objects000075500000000000000000000000001046102023000151065ustar 00000000000000both-modify-binary/.git/objects/7a000075500000000000000000000000001046102023000154155ustar 00000000000000both-modify-binary/.git/objects/7a/5528d43f13ed1af81d881479e93bbd92a45529000064400000000000000000000002561046102023000225130ustar 00000000000000xe͊0 {S^X$9l(˾cm ?xaMiI;o`:crh 0{ԑ <#gւLrORWP(O^}ڝ8~uKm"q[ v?Wxw]b0Kw(dc)|=tLboth-modify-binary/.git/objects/f6000075500000000000000000000000001046102023000154215ustar 00000000000000both-modify-binary/.git/objects/f6/3e836eb33bfcd6d9f0de48baacf71c957beea7000064400000000000000000000000531046102023000233640ustar 00000000000000x+)JMU0`01DcZ,Y`[h}J]eJt ,both-modify-binary/.git/objects/c3000075500000000000000000000000001046102023000154135ustar 00000000000000both-modify-binary/.git/objects/c3/1ccfdf54c7507a197f140aacf868466d6aeb2f000064400000000000000000000000531046102023000230500ustar 00000000000000x+)JMU0`01D{Z.46bn{both-modify-binary/.git/objects/c3/a4a22dbc10394da3b7829479d7cbc878e3f57a000064400000000000000000000000271046102023000227140ustar 00000000000000xKOR``PHK,"both-modify-binary/.git/objects/de000075500000000000000000000000001046102023000154765ustar 00000000000000both-modify-binary/.git/objects/de/2afcd31fb9376b37f3843347a2fdaa9846bc0e000064400000000000000000000000601046102023000230460ustar 00000000000000x+)JMU06d040031QKcX*)*ŗ~K,u0+scboth-modify-binary/.git/objects/5b000075500000000000000000000000001046102023000154145ustar 00000000000000both-modify-binary/.git/objects/5b/1bbb91e22922cc099c7def751ca1ee42dec330000064400000000000000000000002451046102023000230320ustar 00000000000000xe 0=).H*Goo@27 o2=,S[d:Li"N}$Mj,kѢEA=tG>$P ZIe2|M\x[pU[ E4`i4͢2Hboth-modify-binary/.git/objects/3f000075500000000000000000000000001046102023000154165ustar 00000000000000both-modify-binary/.git/objects/3f/de2f0602118ecf0b1b14d4afcbffb491ad7a33000064400000000000000000000000221046102023000231470ustar 00000000000000xKOR0f`PpUboth-modify-binary/.git/objects/info000075500000000000000000000000001046102023000160415ustar 00000000000000both-modify-binary/.git/objects/72000075500000000000000000000000001046102023000153365ustar 00000000000000both-modify-binary/.git/objects/72/d2727e70b906de668f1c73a3d3a19dd452811f000064400000000000000000000001771046102023000225010ustar 00000000000000xe B!E[BG+%<3ĠO(^\.nlntfVӖ!d2q(fTџ00 z[_T+bgZg3bkp_["˵io8both-modify-binary/.git/objects/pack000075500000000000000000000000001046102023000160245ustar 00000000000000both-modify-binary/.git/objects/c6000075500000000000000000000000001046102023000154165ustar 00000000000000both-modify-binary/.git/objects/c6/2aeeeca4a3603e6d713bca27249246e3790467000064400000000000000000000000601046102023000225370ustar 00000000000000x+)JMU06d040031QKc8dKۛT^?}*}5both-modify-binary/.git/objects/ed000075500000000000000000000000001046102023000154765ustar 00000000000000both-modify-binary/.git/objects/ed/4876170e3a46e35afb30b354dc31347bb8a972000064400000000000000000000000601046102023000225360ustar 00000000000000x+)JMU06d040031QKc$w[ZL\[e R xboth-modify-binary/.git/objects/ac000075500000000000000000000000001046102023000154715ustar 00000000000000both-modify-binary/.git/objects/ac/56aa625fe7aa05a3d362fb1bb97540309db2f5000064400000000000000000000000221046102023000227370ustar 00000000000000xKOR0f`PpTboth-modify-binary/.git/objects/0c000075500000000000000000000000001046102023000154105ustar 00000000000000both-modify-binary/.git/objects/0c/309141d0d70f030d2a3202c2df02181c93f258000064400000000000000000000000531046102023000222560ustar 00000000000000x+)JMU0`01De|Vn~lchRce? both-modify-binary/.git/config000064400000000000000000000002111046102023000147160ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true both-modify-binary/a000075500000000000000000000000001046102023000130345ustar 00000000000000both-modify-binary/a/x.f000064400000000000000000000000031046102023000135220ustar 00000000000000 Bsuper-2000075500000000000000000000000001046102023000104065ustar 00000000000000super-2/olddir000075500000000000000000000000001046102023000116635ustar 00000000000000super-2/olddir/b000064400000000000000000000000021046102023000120760ustar 00000000000000b super-2/olddir/c000064400000000000000000000000021046102023000120770ustar 00000000000000c super-2/olddir/bar000064400000000000000000000000141046102023000124240ustar 000000000000001 2 3 4 5 6 super-2/olddir/a000064400000000000000000000000021046102023000120750ustar 00000000000000a super-2/A-B.merge-info000064400000000000000000000014561046102023000130040ustar 000000000000003dee430b0e2b292e516587cabdaa79db5c053b37100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 newdir/bar~B100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 newdir/bar~B2newdir/barolddir/barCONFLICT (directory rename suggested)CONFLICT (file location): foo renamed to olddir/bar in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to newdir/bar. 2newdir/barfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to newdir/bar in B, but deleted in A. 2newdir/bar~Bnewdir/barCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of newdir/bar from B; moving it to newdir/bar~B instead. 1newdir/bar~BCONFLICT (modify/delete)CONFLICT (modify/delete): newdir/bar~B deleted in A and modified in B. Version B of newdir/bar~B left in tree. super-2/A-B-reversed.merge-info000064400000000000000000000014561046102023000146210ustar 000000000000003dee430b0e2b292e516587cabdaa79db5c053b37100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 newdir/bar~B100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 newdir/bar~B2newdir/barolddir/barCONFLICT (directory rename suggested)CONFLICT (file location): foo renamed to olddir/bar in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to newdir/bar. 2newdir/barfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to newdir/bar in B, but deleted in A. 2newdir/bar~Bnewdir/barCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of newdir/bar from B; moving it to newdir/bar~B instead. 1newdir/bar~BCONFLICT (modify/delete)CONFLICT (modify/delete): newdir/bar~B deleted in A and modified in B. Version B of newdir/bar~B left in tree. super-2/.git000075500000000000000000000000001046102023000112475ustar 00000000000000super-2/.git/super-2-A-B-diff3-reversed.index000064400000000000000000000006301046102023000170160ustar 00000000000000DIRCx"a;*`%/Nnewdir/aax"-4ϽUV$rnewdir/b⛲CK)wZSnewdir/bar/file JX+p newdir/bar~BlvZkVI~ newdir/c olddir/bar super-2/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000170040ustar 00000000000000f2b089a50cf0b4e7e55cb0b4f903459d999efab1 super-2/.git/index000064400000000000000000000006101046102023000123550ustar 00000000000000DIRCx"a;*`%/Nnewdir/aax"-4ϽUV$rnewdir/b JX+p newdir/barlvZkVI~ newdir/cTREE84 1 y$]oDNz9newdir4 0 &`'2;Gב-Wɝ]nP `super-2/.git/super-2-A-B-reversed.index000064400000000000000000000006301046102023000160250ustar 00000000000000DIRCx"a;*`%/Nnewdir/aax"-4ϽUV$rnewdir/b⛲CK)wZSnewdir/bar/file JX+p newdir/bar~BlvZkVI~ newdir/c&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 super-2/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000154300ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 super-2/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000166110ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : super-2/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000170300ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : super-2/.git/hooks/post-update.sample000075500000000000000000000002751046102023000161300ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info super-2/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000173740ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi super-2/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000160600ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi super-2/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000175040ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } super-2/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000166160ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : super-2/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000157350ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- super-2/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000157060ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END super-2/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000157300ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } super-2/.git/resolve-B-A-with-ours.tree000064400000000000000000000000511046102023000161560ustar 0000000000000006b679248dccd05d6f44844ef19380ef7a398dd5 super-2/.git/description000064400000000000000000000001111046102023000135650ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. super-2/.git/logs000075500000000000000000000000001046102023000122135ustar 00000000000000super-2/.git/logs/refs000075500000000000000000000000001046102023000131525ustar 00000000000000super-2/.git/logs/refs/heads000075500000000000000000000000001046102023000142365ustar 00000000000000super-2/.git/logs/refs/heads/B000064400000000000000000000005201046102023000144160ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 branch: Created from main 2dbefd673e079505f55702aa7d5bf923e173e756 d870598997d8b735d8cabd57dc4d980a4860410a committer 946771200 +0000 commit: Modify foo & rename foo -> olddir/bar super-2/.git/logs/refs/heads/main000064400000000000000000000002371046102023000151660ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 commit (initial): original super-2/.git/logs/refs/heads/A000064400000000000000000000005301046102023000144160ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 branch: Created from main 2dbefd673e079505f55702aa7d5bf923e173e756 a1ea379c9ac17994b650f34e47de4b86a9e652fd committer 946771200 +0000 commit: rm foo, olddir/ -> newdir/, + newdir/bar/file super-2/.git/logs/HEAD000064400000000000000000000015201046102023000127140ustar 000000000000000000000000000000000000000000000000000000 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 commit (initial): original 2dbefd673e079505f55702aa7d5bf923e173e756 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 checkout: moving from main to A 2dbefd673e079505f55702aa7d5bf923e173e756 a1ea379c9ac17994b650f34e47de4b86a9e652fd committer 946771200 +0000 commit: rm foo, olddir/ -> newdir/, + newdir/bar/file a1ea379c9ac17994b650f34e47de4b86a9e652fd 2dbefd673e079505f55702aa7d5bf923e173e756 committer 946771200 +0000 checkout: moving from A to B 2dbefd673e079505f55702aa7d5bf923e173e756 d870598997d8b735d8cabd57dc4d980a4860410a committer 946771200 +0000 commit: Modify foo & rename foo -> olddir/bar super-2/.git/info000075500000000000000000000000001046102023000122025ustar 00000000000000super-2/.git/info/exclude000064400000000000000000000003601046102023000136340ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ super-2/.git/HEAD000064400000000000000000000000221046102023000117440ustar 00000000000000ref: refs/heads/B super-2/.git/objects000075500000000000000000000000001046102023000127005ustar 00000000000000super-2/.git/objects/78000075500000000000000000000000001046102023000131365ustar 00000000000000super-2/.git/objects/78/981922613b2afb6025042ff6bd878ac1994e85000064400000000000000000000000211046102023000201350ustar 00000000000000xKOR0bHd]super-2/.git/objects/49000075500000000000000000000000001046102023000131345ustar 00000000000000super-2/.git/objects/49/4c39a7e6b41374e09659f632dc5fdee80b2470000064400000000000000000000001201046102023000202730ustar 00000000000000x+)JMU03a040031QHgX䥨m̢?? 21"[RW~ n_super-2/.git/objects/2d000075500000000000000000000000001046102023000132055ustar 00000000000000super-2/.git/objects/2d/befd673e079505f55702aa7d5bf923e173e756000064400000000000000000000002011046102023000203470ustar 00000000000000xe 0D=+.6f(⯤V7ԃsycb95,Z,v0 z;q]DΚUx[E^!?69ŒZGأؿTi.wW6+7#super-2/.git/objects/e6000075500000000000000000000000001046102023000132125ustar 00000000000000super-2/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391000064400000000000000000000000171046102023000205160ustar 00000000000000xKOR0` super-2/.git/objects/a1000075500000000000000000000000001046102023000132015ustar 00000000000000super-2/.git/objects/a1/ea379c9ac17994b650f34e47de4b86a9e652fd000064400000000000000000000002661046102023000205320ustar 00000000000000xeAj1 E)O؞eC=x̄qh.7!Oyck`4IH"Ě;3&ru.Ē )FA$mcIS]jg~b.9r0:G5tǾmtz?طZuuynG8aaQ"[Psuper-2/.git/objects/06000075500000000000000000000000001046102023000131255ustar 00000000000000super-2/.git/objects/06/b679248dccd05d6f44844ef19380ef7a398dd5000064400000000000000000000000601046102023000203670ustar 00000000000000x+)JMU06f01"%QitZfsuper-2/.git/objects/info000075500000000000000000000000001046102023000136335ustar 00000000000000super-2/.git/objects/86000075500000000000000000000000001046102023000131355ustar 00000000000000super-2/.git/objects/86/3765d6544e89e24b9c9269a5ac40351f4bda48000064400000000000000000000002311046102023000202230ustar 00000000000000x+)JMU045`040031QHd!h;AE3ZI 3zyr~аf" PHJ,brVEy *`Z5>0K"b˅KP }^%lg#_݁ 29super-2/.git/objects/4d000075500000000000000000000000001046102023000132075ustar 00000000000000super-2/.git/objects/4d/2aa51de537089c33bef55e25377f7cb0873e46000064400000000000000000000000601046102023000203470ustar 00000000000000x+)JMU06f01"%QitZfvsuper-2/.git/objects/8a000075500000000000000000000000001046102023000132105ustar 00000000000000super-2/.git/objects/8a/1218a1024a212bb3db30becd860315f9f3ac52000064400000000000000000000000321046102023000203460ustar 00000000000000xKOR04`02222(-Rsuper-2/.git/objects/pack000075500000000000000000000000001046102023000136165ustar 00000000000000super-2/.git/objects/18000075500000000000000000000000001046102023000131305ustar 00000000000000super-2/.git/objects/18/49a8afb07bcf8ffb706f2138614b1ec5eb2359000064400000000000000000000000601046102023000205020ustar 00000000000000x+)JMU06f01"[-LԍW֋w) tK F-super-2/.git/objects/df000075500000000000000000000000001046102023000132715ustar 00000000000000super-2/.git/objects/df/2b8fc99e1c1d4dbc0a854d9f72157f1d6ea078000064400000000000000000000000611046102023000206520ustar 00000000000000x+)JMU06b040031QHIex6M9{wk+qIOD$-super-2/.git/objects/d7000075500000000000000000000000001046102023000132125ustar 00000000000000super-2/.git/objects/d7/d726c260bd1c27e932c43b1cb01c47f4d79112000064400000000000000000000001721046102023000203220ustar 00000000000000x+)JMU04`040031QHd!h;AE3ZI 3zyr~аf"dbƧ{IDlpI[*imNXVx6X.Psuper-2/.git/objects/3d000075500000000000000000000000001046102023000132065ustar 00000000000000super-2/.git/objects/3d/ee430b0e2b292e516587cabdaa79db5c053b37000064400000000000000000000000601046102023000205370ustar 00000000000000x+)JMU06f01"6k!~L\T super-2/.git/objects/04000075500000000000000000000000001046102023000131235ustar 00000000000000super-2/.git/objects/04/a59185a0c5f4047e4fd3fa87b0c84e671b00ee000064400000000000000000000001371046102023000204140ustar 00000000000000x+)JMU0g040031QHd!h;AE3ZI 3zyr~аf"d2ç9en` [Ww`"super-2/.git/objects/61000075500000000000000000000000001046102023000131265ustar 00000000000000super-2/.git/objects/61/780798228d17af2d34fce4cfbdf35556832472000064400000000000000000000000211046102023000202140ustar 00000000000000xKOR0bHf^super-2/.git/config000064400000000000000000000002111046102023000125100ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true super-2/.git/super-2-A-B-diff3.index000064400000000000000000000006301046102023000152010ustar 00000000000000DIRCx"a;*`%/Nnewdir/aax"-4ϽUV$rnewdir/b⛲CK)wZSnewdir/bar/file JX+p0 newdir/bar~BlvZkVI~ newdir/cf_[[7ϼ+$[super-2/.git/super-2-A-B.index000064400000000000000000000006301046102023000142100ustar 00000000000000DIRCx"a;*`%/Nnewdir/aax"-4ϽUV$rnewdir/b⛲CK)wZSnewdir/bar/file JX+p0 newdir/bar~BlvZkVI~ newdir/cf_[[7ϼ+$[super-2/.git/resolve-B-A-with-ancestor.tree000064400000000000000000000000511046102023000170040ustar 00000000000000f2b089a50cf0b4e7e55cb0b4f903459d999efab1 super-2/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000161560ustar 000000000000001849a8afb07bcf8ffb706f2138614b1ec5eb2359 super-2/A-B-diff3.merge-info000064400000000000000000000014561046102023000137750ustar 000000000000003dee430b0e2b292e516587cabdaa79db5c053b37100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 newdir/bar~B100644 b414108e81e5091fe0974a1858b4d0d22b107f70 3 newdir/bar~B2newdir/barolddir/barCONFLICT (directory rename suggested)CONFLICT (file location): foo renamed to olddir/bar in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to newdir/bar. 2newdir/barfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to newdir/bar in B, but deleted in A. 2newdir/bar~Bnewdir/barCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of newdir/bar from B; moving it to newdir/bar~B instead. 1newdir/bar~BCONFLICT (modify/delete)CONFLICT (modify/delete): newdir/bar~B deleted in A and modified in B. Version B of newdir/bar~B left in tree. super-2/A-B-diff3-reversed.merge-info000064400000000000000000000014561046102023000156120ustar 000000000000003dee430b0e2b292e516587cabdaa79db5c053b37100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 newdir/bar~B100644 b414108e81e5091fe0974a1858b4d0d22b107f70 2 newdir/bar~B2newdir/barolddir/barCONFLICT (directory rename suggested)CONFLICT (file location): foo renamed to olddir/bar in B, inside a directory that was renamed in A, suggesting it should perhaps be moved to newdir/bar. 2newdir/barfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to newdir/bar in B, but deleted in A. 2newdir/bar~Bnewdir/barCONFLICT (file/directory)CONFLICT (file/directory): directory in the way of newdir/bar from B; moving it to newdir/bar~B instead. 1newdir/bar~BCONFLICT (modify/delete)CONFLICT (modify/delete): newdir/bar~B deleted in A and modified in B. Version B of newdir/bar~B left in tree. __gitoxide_meta__000075500000000000000000000000001046102023000125275ustar 00000000000000__gitoxide_meta__/identity000064400000000000000000000000171046102023000143600ustar 000000000000003163911692-unix__gitoxide_meta__/git-version000064400000000000000000000000431046102023000147740ustar 00000000000000git version 2.39.5 (Apple Git-154) rename-add-delete000075500000000000000000000000001046102023000123465ustar 00000000000000rename-add-delete/A-B.merge-info000064400000000000000000000005511046102023000147370ustar 00000000000000be95b6b94e30f1dcb6f13d593ab362088c0f20e6100644 f286e5cdd97ac6895438ea4548638bb98ac9bd6b 2 bar100644 78fa0f415ae2bdb5c0182c067eacaaf843699b39 3 bar2barfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to bar in B, but deleted in A. 1barAuto-mergingAuto-merging bar 1barCONFLICT (contents)CONFLICT (add/add): Merge conflict in bar rename-add-delete/A-B-reversed.merge-info000064400000000000000000000005511046102023000165540ustar 000000000000007e6333adf723af7f50b78e8ff5d1b74ca138cb65100644 78fa0f415ae2bdb5c0182c067eacaaf843699b39 2 bar100644 f286e5cdd97ac6895438ea4548638bb98ac9bd6b 3 bar2barfooCONFLICT (rename/delete)CONFLICT (rename/delete): foo renamed to bar in B, but deleted in A. 1barAuto-mergingAuto-merging bar 1barCONFLICT (contents)CONFLICT (add/add): Merge conflict in bar rename-add-delete/.git000075500000000000000000000000001046102023000132075ustar 00000000000000rename-add-delete/.git/COMMIT_EDITMSG000064400000000000000000000000221046102023000153470ustar 00000000000000rename foo to bar rename-add-delete/.git/resolve-A-B-with-ancestor.tree000064400000000000000000000000511046102023000207440ustar 00000000000000be95b6b94e30f1dcb6f13d593ab362088c0f20e6 rename-add-delete/.git/index000064400000000000000000000002111046102023000143120ustar 00000000000000DIRCzƉT8EHcɽkbarTREE1 0 ߬ t`9cbԮbwBn"K)@AN rename-add-delete/.git/refs000075500000000000000000000000001046102023000141465ustar 00000000000000rename-add-delete/.git/refs/tags000075500000000000000000000000001046102023000151045ustar 00000000000000rename-add-delete/.git/refs/heads000075500000000000000000000000001046102023000152325ustar 00000000000000rename-add-delete/.git/refs/heads/B000064400000000000000000000000511046102023000154110ustar 00000000000000fa3f30f20aefd91ac4ce876c13214b8dfba1eb42 rename-add-delete/.git/refs/heads/main000064400000000000000000000000511046102023000161540ustar 000000000000004a87ec8156891f4a16b044cd874c23938d81449d rename-add-delete/.git/refs/heads/A000064400000000000000000000000511046102023000154100ustar 0000000000000066c1c1414adb7ca3f6981a65d450fde297c03155 rename-add-delete/.git/hooks000075500000000000000000000000001046102023000143325ustar 00000000000000rename-add-delete/.git/hooks/push-to-checkout.sample000075500000000000000000000053371046102023000210310ustar 00000000000000#!/bin/sh # An example hook script to update a checked-out tree on a git push. # # This hook is invoked by git-receive-pack(1) when it reacts to git # push and updates reference(s) in its repository, and when the push # tries to update the branch that is currently checked out and the # receive.denyCurrentBranch configuration variable is set to # updateInstead. # # By default, such a push is refused if the working tree and the index # of the remote repository has any difference from the currently # checked out commit; when both the working tree and the index match # the current commit, they are updated to match the newly pushed tip # of the branch. This hook is to be used to override the default # behaviour; however the code below reimplements the default behaviour # as a starting point for convenient modification. # # The hook receives the commit with which the tip of the current # branch is going to be updated: commit=$1 # It can exit with a non-zero status to refuse the push (when it does # so, it must not modify the index or the working tree). die () { echo >&2 "$*" exit 1 } # Or it can make any necessary changes to the working tree and to the # index to bring them to the desired state when the tip of the current # branch is updated to the new commit, and exit with a zero status. # # For example, the hook can simply run git read-tree -u -m HEAD "$1" # in order to emulate git fetch that is run in the reverse direction # with git push, as the two-tree form of git read-tree -u -m is # essentially the same as git switch or git checkout that switches # branches while keeping the local changes in the working tree that do # not interfere with the difference between the branches. # The below is a more-or-less exact translation to shell of the C code # for the default behaviour for git's push-to-checkout hook defined in # the push_to_deploy() function in builtin/receive-pack.c. # # Note that the hook will be executed from the repository directory, # not from the working tree, so if you want to perform operations on # the working tree, you will have to adapt your code accordingly, e.g. # by adding "cd .." or using relative paths. if ! git update-index -q --ignore-submodules --refresh then die "Up-to-date check failed" fi if ! git diff-files --quiet --ignore-submodules -- then die "Working directory has unstaged changes" fi # This is a rough translation of: # # head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX if git cat-file -e HEAD 2>/dev/null then head=HEAD else head=$(git hash-object -t tree --stdin &2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --type=bool hooks.allowunannotated) allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) denycreatebranch=$(git config --type=bool hooks.denycreatebranch) allowdeletetag=$(git config --type=bool hooks.allowdeletetag) allowmodifytag=$(git config --type=bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero=$(git hash-object --stdin &2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 rename-add-delete/.git/hooks/pre-push.sample000075500000000000000000000025361046102023000173700ustar 00000000000000#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of the remote to which the push is being done # $2 -- URL to which the push is being done # # If pushing without using a named remote those arguments will be equal. # # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # # # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). remote="$1" url="$2" zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 fi fi done exit 0 rename-add-delete/.git/hooks/pre-applypatch.sample000075500000000000000000000006501046102023000205510ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup precommit="$(git rev-parse --git-path hooks/pre-commit)" test -x "$precommit" && exec "$precommit" ${1+"$@"} : rename-add-delete/.git/hooks/pre-merge-commit.sample000075500000000000000000000006401046102023000207700ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git merge" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message to # stderr if it wants to stop the merge commit. # # To enable this hook, rename this file to "pre-merge-commit". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" : rename-add-delete/.git/hooks/post-update.sample000075500000000000000000000002751046102023000200700ustar 00000000000000#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info rename-add-delete/.git/hooks/prepare-commit-msg.sample000075500000000000000000000027241046102023000213340ustar 00000000000000#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first one removes the # "# Please enter the commit message..." help message. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3 /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" # case "$COMMIT_SOURCE,$SHA1" in # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; # *) ;; # esac # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" # if test -z "$COMMIT_SOURCE" # then # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" # fi rename-add-delete/.git/hooks/pre-receive.sample000075500000000000000000000010401046102023000200200ustar 00000000000000#!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with 'echoback=' # and rejects all pushes when the "reject" push option is used. # # To enable this hook, rename this file to "pre-receive". if test -n "$GIT_PUSH_OPTION_COUNT" then i=0 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" do eval "value=\$GIT_PUSH_OPTION_$i" case "$value" in echoback=*) echo "echo from the pre-receive-hook: ${value#*=}" >&2 ;; reject) exit 1 esac i=$((i + 1)) done fi rename-add-delete/.git/hooks/fsmonitor-watchman.sample000075500000000000000000000111661046102023000214440ustar 00000000000000#!/usr/bin/perl use strict; use warnings; use IPC::Open2; # An example hook script to integrate Watchman # (https://facebook.github.io/watchman/) with git to speed up detecting # new and modified files. # # The hook is passed a version (currently 2) and last update token # formatted as a string and outputs to stdout a new update token and # all files that have been modified since the update token. Paths must # be relative to the root of the working tree and separated by a single NUL. # # To enable this hook, rename this file to "query-watchman" and set # 'git config core.fsmonitor .git/hooks/query-watchman' # my ($version, $last_update_token) = @ARGV; # Uncomment for debugging # print STDERR "$0 $version $last_update_token\n"; # Check the hook interface version if ($version ne 2) { die "Unsupported query-fsmonitor hook version '$version'.\n" . "Falling back to scanning...\n"; } my $git_work_tree = get_working_dir(); my $retry = 1; my $json_pkg; eval { require JSON::XS; $json_pkg = "JSON::XS"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }; launch_watchman(); sub launch_watchman { my $o = watchman_query(); if (is_work_tree_watched($o)) { output_result($o->{clock}, @{$o->{files}}); } } sub output_result { my ($clockid, @files) = @_; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # binmode $fh, ":utf8"; # print $fh "$clockid\n@files\n"; # close $fh; binmode STDOUT, ":utf8"; print $clockid; print "\0"; local $, = "\0"; print @files; } sub watchman_clock { my $response = qx/watchman clock "$git_work_tree"/; die "Failed to get clock id on '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; return $json_pkg->new->utf8->decode($response); } sub watchman_query { my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') or die "open2() failed: $!\n" . "Falling back to scanning...\n"; # In the query expression below we're asking for names of files that # changed since $last_update_token but not from the .git folder. # # To accomplish this, we're using the "since" generator to use the # recency index to select candidate nodes and "fields" to limit the # output to file names only. Then we're using the "expression" term to # further constrain the results. my $last_update_line = ""; if (substr($last_update_token, 0, 1) eq "c") { $last_update_token = "\"$last_update_token\""; $last_update_line = qq[\n"since": $last_update_token,]; } my $query = <<" END"; ["query", "$git_work_tree", {$last_update_line "fields": ["name"], "expression": ["not", ["dirname", ".git"]] }] END # Uncomment for debugging the watchman query # open (my $fh, ">", ".git/watchman-query.json"); # print $fh $query; # close $fh; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; # Uncomment for debugging the watch response # open ($fh, ">", ".git/watchman-response.json"); # print $fh $response; # close $fh; die "Watchman: command returned no output.\n" . "Falling back to scanning...\n" if $response eq ""; die "Watchman: command returned invalid output: $response\n" . "Falling back to scanning...\n" unless $response =~ /^\{/; return $json_pkg->new->utf8->decode($response); } sub is_work_tree_watched { my ($output) = @_; my $error = $output->{error}; if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { $retry--; my $response = qx/watchman watch "$git_work_tree"/; die "Failed to make watchman watch '$git_work_tree'.\n" . "Falling back to scanning...\n" if $? != 0; $output = $json_pkg->new->utf8->decode($response); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; # Uncomment for debugging watchman output # open (my $fh, ">", ".git/watchman-output.out"); # close $fh; # Watchman will always return all files on the first query so # return the fast "everything is dirty" flag to git and do the # Watchman query just to get it over with now so we won't pay # the cost in git to look up each individual file. my $o = watchman_clock(); $error = $output->{error}; die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; output_result($o->{clock}, ("/")); $last_update_token = $o->{clock}; eval { launch_watchman() }; return 0; } die "Watchman: $error.\n" . "Falling back to scanning...\n" if $error; return 1; } sub get_working_dir { my $working_dir; if ($^O =~ 'msys' || $^O =~ 'cygwin') { $working_dir = Win32::GetCwd(); $working_dir =~ tr/\\/\//; } else { require Cwd; $working_dir = Cwd::cwd(); } return $working_dir; } rename-add-delete/.git/hooks/applypatch-msg.sample000075500000000000000000000007361046102023000205560ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup commitmsg="$(git rev-parse --git-path hooks/commit-msg)" test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} : rename-add-delete/.git/hooks/pre-commit.sample000075500000000000000000000031531046102023000176750ustar 00000000000000#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --type=bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- rename-add-delete/.git/hooks/pre-rebase.sample000075500000000000000000000114421046102023000176460ustar 00000000000000#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up to date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi <<\DOC_END This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". DOC_END rename-add-delete/.git/hooks/commit-msg.sample000075500000000000000000000016001046102023000176700ustar 00000000000000#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } rename-add-delete/.git/description000064400000000000000000000001111046102023000155250ustar 00000000000000Unnamed repository; edit this file 'description' to name the repository. rename-add-delete/.git/logs000075500000000000000000000000001046102023000141535ustar 00000000000000rename-add-delete/.git/logs/refs000075500000000000000000000000001046102023000151125ustar 00000000000000rename-add-delete/.git/logs/refs/heads000075500000000000000000000000001046102023000161765ustar 00000000000000rename-add-delete/.git/logs/refs/heads/B000064400000000000000000000004741046102023000163660ustar 000000000000000000000000000000000000000000000000000000 4a87ec8156891f4a16b044cd874c23938d81449d committer 946771200 +0000 branch: Created from main 4a87ec8156891f4a16b044cd874c23938d81449d fa3f30f20aefd91ac4ce876c13214b8dfba1eb42 committer 946771200 +0000 commit: rename foo to bar rename-add-delete/.git/logs/refs/heads/main000064400000000000000000000002371046102023000171260ustar 000000000000000000000000000000000000000000000000000000 4a87ec8156891f4a16b044cd874c23938d81449d committer 946771200 +0000 commit (initial): original rename-add-delete/.git/logs/refs/heads/A000064400000000000000000000004761046102023000163670ustar 000000000000000000000000000000000000000000000000000000 4a87ec8156891f4a16b044cd874c23938d81449d committer 946771200 +0000 branch: Created from main 4a87ec8156891f4a16b044cd874c23938d81449d 66c1c1414adb7ca3f6981a65d450fde297c03155 committer 946771200 +0000 commit: Remove foo, add bar rename-add-delete/.git/logs/HEAD000064400000000000000000000014421046102023000146570ustar 000000000000000000000000000000000000000000000000000000 4a87ec8156891f4a16b044cd874c23938d81449d committer 946771200 +0000 commit (initial): original 4a87ec8156891f4a16b044cd874c23938d81449d 4a87ec8156891f4a16b044cd874c23938d81449d committer 946771200 +0000 checkout: moving from main to A 4a87ec8156891f4a16b044cd874c23938d81449d 66c1c1414adb7ca3f6981a65d450fde297c03155 committer 946771200 +0000 commit: Remove foo, add bar 66c1c1414adb7ca3f6981a65d450fde297c03155 4a87ec8156891f4a16b044cd874c23938d81449d committer 946771200 +0000 checkout: moving from A to B 4a87ec8156891f4a16b044cd874c23938d81449d fa3f30f20aefd91ac4ce876c13214b8dfba1eb42 committer 946771200 +0000 commit: rename foo to bar rename-add-delete/.git/info000075500000000000000000000000001046102023000141425ustar 00000000000000rename-add-delete/.git/info/exclude000064400000000000000000000003601046102023000155740ustar 00000000000000# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ rename-add-delete/.git/HEAD000064400000000000000000000000221046102023000137040ustar 00000000000000ref: refs/heads/B rename-add-delete/.git/objects000075500000000000000000000000001046102023000146405ustar 00000000000000rename-add-delete/.git/objects/78000075500000000000000000000000001046102023000150765ustar 00000000000000rename-add-delete/.git/objects/78/fa0f415ae2bdb5c0182c067eacaaf843699b39000064400000000000000000000000361046102023000225160ustar 00000000000000xKOR04a/LKQHISDrename-add-delete/.git/objects/4a000075500000000000000000000000001046102023000151445ustar 00000000000000rename-add-delete/.git/objects/4a/87ec8156891f4a16b044cd874c23938d81449d000064400000000000000000000002001046102023000220760ustar 00000000000000xe !E{+=W%gKX3ĠO(˹\8\ҡ7 Qhu EDkI,S0NuU|[mE^<69q-g;5זD]U[{-7rename-add-delete/.git/objects/fa000075500000000000000000000000001046102023000152265ustar 00000000000000rename-add-delete/.git/objects/fa/3f30f20aefd91ac4ce876c13214b8dfba1eb42000064400000000000000000000002421046102023000227130ustar 00000000000000xeK 1D]$$0WɧcPƅyEAK[kЛd-|o,j^c-qDZf&K"3;bb0.jĔcO rVٯˇyj9s5pז}ݿj؅" B MF9rename-add-delete/.git/objects/fa/a491607d28cb371fedfd3b994bf5b1df79cd8a000064400000000000000000000000671046102023000227620ustar 00000000000000xKOR05g'̼̜T.[JLKK-J+A#mrename-add-delete/.git/objects/d4000075500000000000000000000000001046102023000151475ustar 00000000000000rename-add-delete/.git/objects/d4/52489bba7ce712409f1690e14616880e727965000064400000000000000000000000601046102023000217410ustar 00000000000000x+)JMU06d040031QHJ,bh:lukVpΜm Wrename-add-delete/.git/objects/info000075500000000000000000000000001046102023000155735ustar 00000000000000rename-add-delete/.git/objects/72000075500000000000000000000000001046102023000150705ustar 00000000000000rename-add-delete/.git/objects/72/cae7f4872692d3366633d2dcc7cce192403f55000064400000000000000000000000601046102023000222300ustar 00000000000000x+)JMU06d040031QHgh:lukVpΜm rename-add-delete/.git/objects/7e000075500000000000000000000000001046102023000151535ustar 00000000000000rename-add-delete/.git/objects/7e/6333adf723af7f50b78e8ff5d1b74ca138cb65000064400000000000000000000000601046102023000225300ustar 00000000000000x+)JMU06d040031QHJ,bdbBisgzxllrename-add-delete/.git/objects/pack000075500000000000000000000000001046102023000155565ustar 00000000000000rename-add-delete/.git/objects/f2000075500000000000000000000000001046102023000151475ustar 00000000000000rename-add-delete/.git/objects/f2/dfacbbd50a1cf3746091b439638762d4aeac62000064400000000000000000000000601046102023000225040ustar 00000000000000x+)JMU06d040031QHJ,bͪc!\=wvܛ rename-add-delete/.git/objects/f2/86e5cdd97ac6895438ea4548638bb98ac9bd6b000064400000000000000000000000371046102023000225060ustar 00000000000000xKOR04eHLKK-J+QHI[Erename-add-delete/.git/objects/be000075500000000000000000000000001046102023000152265ustar 00000000000000rename-add-delete/.git/objects/be/95b6b94e30f1dcb6f13d593ab362088c0f20e6000064400000000000000000000000601046102023000224310ustar 00000000000000x+)JMU06d040031QHJ,b*gҁj̴.;w1rename-add-delete/.git/objects/66000075500000000000000000000000001046102023000150735ustar 00000000000000rename-add-delete/.git/objects/66/c1c1414adb7ca3f6981a65d450fde297c03155000064400000000000000000000002511046102023000222710ustar 00000000000000xeMjC1 )O(QdBr֣:~y.2o) nUX|]\V\YBDe GE7 N@ᨅݑ8QrC \!j6?<]OHHn2[m:ߝ^󯮹h۟ Ba)JHrename-add-delete/.git/objects/0c000075500000000000000000000000001046102023000151425ustar 00000000000000rename-add-delete/.git/objects/0c/de534c2fca6c92c07b3e7a696665e844b9b933000064400000000000000000000000671046102023000224010ustar 00000000000000xKOR05gG̴ԢԼ̜T.[/LḰAoLrename-add-delete/.git/config000064400000000000000000000002111046102023000144500ustar 00000000000000[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true rename-add-delete/.git/resolve-A-B-with-ours.tree000064400000000000000000000000511046102023000201160ustar 00000000000000f2dfacbbd50a1cf3746091b439638762d4aeac62 rename-add-delete/bar000064400000000000000000000000161046102023000131110ustar 00000000000000original file gix-merge-0.2.0/tests/fixtures/make_blob_repo.sh000075500000000000000000000005551046102023000200260ustar 00000000000000#!/usr/bin/env bash set -eu -o pipefail git init -q echo just-set > just-set echo b > b echo union > union echo e > e-no-attr echo unset > unset echo unspecified > unspecified cat <.gitattributes just-set merge conflict-marker-size=32 b merge=b union merge=union missing merge=missing unset -merge unspecified !merge EOF git add . && git commit -m "init" gix-merge-0.2.0/tests/fixtures/text-baseline.sh000075500000000000000000000232011046102023000176230ustar 00000000000000#!/usr/bin/env bash set -eu -o pipefail git init rm -Rf .git/hooks function baseline() { local ours=$DIR/${1:?1: our file}.blob; local base=$DIR/${2:?2: base file}.blob; local theirs=$DIR/${3:?3: their file}.blob; local output=$DIR/${4:?4: the name of the output file}.merged; shift 4 git merge-file --stdout "$@" "$ours" "$base" "$theirs" > "$output" || true echo "$ours" "$base" "$theirs" "$output" "$@" >> baseline.cases local output="${output}-reversed" git merge-file --stdout "$@" "$theirs" "$base" "$ours" > "${output}" || true echo "$theirs" "$base" "$ours" "${output}" "$@" >> baseline-reversed.cases } mkdir simple (cd simple echo -e "line1-changed-by-both\nline2-to-be-changed-in-incoming" > ours.blob echo -e "line1-to-be-changed-by-both\nline2-to-be-changed-in-incoming" > base.blob echo -e "line1-changed-by-both\nline2-changed" > theirs.blob ) # one big change includes multiple smaller ones mkdir multi-change (cd multi-change cat < base.blob 0 1 2 3 4 5 6 7 8 9 EOF cat < ours.blob 0 1 X X 4 5 Y Y 8 Z EOF cat < theirs.blob T T T T T T T T T T EOF ) # a change with deletion/clearing our file mkdir clear-ours (cd clear-ours cat < base.blob 0 1 2 3 4 5 EOF touch ours.blob cat < theirs.blob T T T T T EOF ) # a change with deletion/clearing their file mkdir clear-theirs (cd clear-theirs cat < base.blob 0 1 2 3 4 5 EOF cat < ours.blob O O O O O EOF touch theirs.blob ) # differently sized changes mkdir ours-2-lines-theirs-1-line (cd ours-2-lines-theirs-1-line cat < base.blob 0 1 2 3 4 5 EOF cat < ours.blob 0 1 X X 4 5 EOF cat < theirs.blob 0 1 Y 3 4 5 EOF ) # partial match mkdir partial-match (cd partial-match cat < base.blob 0 1 2 3 4 5 EOF cat < ours.blob 0 X1 X2 X3 X4 5 EOF cat < theirs.blob 0 X1 2 X3 X4 5 EOF ) # based on 'unique merge base' from 'diff3-conflict-markers' mkdir unique-merge-base-with-insertion (cd unique-merge-base-with-insertion cat < base.blob 1 2 3 4 5 EOF # no trailing newline echo -n $'1\n2\n3\n4\n5\n7' > ours.blob echo -n $'1\n2\n3\n4\n5\nsix' > theirs.blob ) mkdir zdiff3-basic (cd zdiff3-basic cat < base.blob 1 2 3 4 5 6 7 8 9 EOF cat < ours.blob 1 2 3 4 A B C D E 7 8 9 EOF cat < theirs.blob 1 2 3 4 A X C Y E 7 8 9 EOF ) mkdir zdiff3-middlecommon (cd zdiff3-middlecommon cat < base.blob 1 2 3 AA 4 5 BB 6 7 8 EOF cat < ours.blob 1 2 3 CC 4 5 DD 6 7 8 EOF cat < theirs.blob 1 2 3 EE 4 5 FF 6 7 8 EOF ) mkdir zdiff3-interesting (cd zdiff3-interesting cat < base.blob 1 2 3 4 5 6 7 8 9 EOF cat < ours.blob 1 2 3 4 A B C D E F G H I J 7 8 9 EOF cat < theirs.blob 1 2 3 4 A B C 5 6 G H I J 7 8 9 EOF ) mkdir zdiff3-evil (cd zdiff3-evil cat < base.blob 1 2 3 4 5 6 7 8 9 EOF cat < ours.blob 1 2 3 4 X A B C 7 8 9 EOF cat < theirs.blob 1 2 3 4 Y A B C B C 7 8 9 EOF ) mkdir no-change-add (cd no-change-add echo -e " line 1\n\n line 2" > base.blob echo -e " line 1\n\n line in between\n\n line 2\n\n line in between\n\n line 3" > ours.blob cp ours.blob theirs.blob ) mkdir no-change-remove (cd no-change-remove echo -e " line 1\n\n line in between\n\n line 2\n\n line in between\n\n line 3" > base.blob echo -e " line 1\n\n line 2" > ours.blob cp ours.blob theirs.blob ) mkdir complex (cd complex cat <base.blob Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. EOF cat <new1.blob Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam tu mecum es: virga tua et baculus tuus ipsa me consolata sunt. EOF cat <new2.blob Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. EOF cat <new3.blob DOMINUS regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. EOF cat <new4.blob Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, EOF cat <new5.blob Dominus regit me, et nihil mihi deerit. In loco pascuae ibi me collocavit, super aquam refectionis educavit me; animam meam convertit, deduxit me super semitas jusitiae, propter nomen suum. Nam et si ambulavero in medio umbrae mortis, non timebo mala, quoniam TU mecum es: virga tua et baculus tuus ipsa me consolata sunt. EOF echo -n "propter nomen suum." >>new4.blob cat <base.c int f(int x, int y) { if (x == 0) { return y; } return x; } int g(size_t u) { while (u < 30) { u++; } return u; } EOF cat <ours.c int g(size_t u) { while (u < 30) { u++; } return u; } int h(int x, int y, int z) { if (z == 0) { return x; } return y; } EOF cat <theirs.c int f(int x, int y) { if (x == 0) { return y; } return x; } int g(size_t u) { while (u > 34) { u--; } return u; } EOF mkdir no-change (cd no-change cp ../base.blob . cp base.blob ours.blob cp base.blob theirs.blob ) mkdir no-conflict (cd no-conflict cp ../new1.blob ours.blob cp ../base.blob base.blob cp ../new2.blob theirs.blob ) mkdir no-conflict-too (cd no-conflict-too cp ../base.blob ours.blob cp ../base.blob base.blob cp ../new2.blob theirs.blob ) mkdir they-changed (cd they-changed touch ours.blob base.blob cp ../new2.blob theirs.blob ) mkdir missing-LF-at-EOF (cd missing-LF-at-EOF cp ../new1.blob ours.blob cp ../base.blob base.blob cp ../new4.blob theirs.blob ) mkdir missing-LF-at-EOF-no-conflict (cd missing-LF-at-EOF-no-conflict cp ../new4.blob ours.blob cp ../new2.blob base.blob cp ../new3.blob theirs.blob ) mkdir with-conflicts (cd with-conflicts cp ../new1.blob ours.blob cp ../base.blob base.blob cp ../new3.blob theirs.blob ) mkdir with-conflicts-in-removed-tail (cd with-conflicts-in-removed-tail cp ../base.blob ours.blob cp ../new1.blob base.blob cp ../new5.blob theirs.blob ) mkdir auto-simplification (cd auto-simplification sed -e "s/deerit.\$/deerit;/" -e "s/me;\$/me./" <../new5.blob >ours.blob cp ../new5.blob base.blob sed -e "s/deerit.\$/deerit,/" -e "s/me;\$/me,/" <../new5.blob >theirs.blob ) mkdir auto-simplification2 (cd auto-simplification2 sed -e "s/deerit./&%%%%/" -e "s/locavit,/locavit;/" <../auto-simplification/ours.blob | tr % "\012" >ours.blob cp ../new5.blob base.blob sed -e "s/deerit./&%%%%/" -e "s/locavit,/locavit --/" <../auto-simplification/theirs.blob | tr % "\012" >theirs.blob ) mkdir conflict-without-LF (cd conflict-without-LF printf "line1\nline2\nline3" >base.blob printf "line1\nline2\nline3x" >ours.blob printf "line1\nline2\nline3y" >theirs.blob ) mkdir marker-newline-handling-crlf (cd marker-newline-handling-crlf printf "1\\r\\n2\\r\\n3" >base.blob printf "1\\r\\n2\\r\\n4" >ours.blob printf "1\\r\\n2\\r\\n5" >theirs.blob ) mkdir marker-newline-handling-lf (cd marker-newline-handling-lf printf "1\\r\\n2\\n3" >base.blob printf "1\\r\\n2\\n4" >ours.blob printf "1\\r\\n2\\n5" >theirs.blob ) mkdir marker-newline-handling-lf2 (cd marker-newline-handling-lf2 printf "1\\r\\n2\\r\\n3" >base.blob printf "1\\r\\n2\\n4" >ours.blob printf "1\\r\\n2\\n5" >theirs.blob ) mkdir spurious-c-conflicts (cd spurious-c-conflicts cp ../base.c base.blob cp ../ours.c ours.blob cp ../theirs.c theirs.blob ) ) mkdir line-ending-change (cd line-ending-change echo -e "a\n" > base.blob echo -e "a\r\n" > ours.blob echo -e "a\n" > theirs.blob ) for dir in simple \ multi-change \ clear-ours \ clear-theirs \ ours-2-lines-theirs-1-line \ partial-match \ unique-merge-base-with-insertion \ zdiff3-basic \ zdiff3-middlecommon \ zdiff3-interesting \ zdiff3-evil \ no-change-add \ no-change-remove \ line-ending-change \ complex/no-change \ complex/no-conflict \ complex/no-conflict-too \ complex/they-changed \ complex/missing-LF-at-EOF \ complex/missing-LF-at-EOF-no-conflict \ complex/with-conflicts \ complex/with-conflicts-in-removed-tail \ complex/auto-simplification \ complex/auto-simplification2 \ complex/conflict-without-LF \ complex/marker-newline-handling-crlf \ complex/marker-newline-handling-lf \ complex/marker-newline-handling-lf2 \ complex/spurious-c-conflicts; do DIR=$dir baseline ours base theirs merge baseline ours base theirs diff3 --diff3 baseline ours base theirs zdiff3 --zdiff3 baseline ours base theirs merge-ours --ours baseline ours base theirs merge-theirs --theirs baseline ours base theirs merge-union --union ( export GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=diff.algorithm GIT_CONFIG_KEY_VALUE=0=histogram baseline ours base theirs diff3-histogram --diff3 baseline ours base theirs zdiff3-histogram --zdiff3 ) donegix-merge-0.2.0/tests/fixtures/tree-baseline.sh000075500000000000000000001621371046102023000176120ustar 00000000000000#!/usr/bin/env bash set -eu -o pipefail function tick () { if test -z "${tick+set}" then tick=1112911993 else tick=$(($tick + 60)) fi GIT_COMMITTER_DATE="$tick -0700" GIT_AUTHOR_DATE="$tick -0700" export GIT_COMMITTER_DATE GIT_AUTHOR_DATE } function write_lines () { printf "%s\n" "$@" } function seq () { case $# in 1) set 1 "$@" ;; 2) ;; *) { echo "need 1 or 2 parameters: or " 1>&2 && exit 2; } ;; esac local seq_counter=$1 while test "$seq_counter" -le "$2" do echo "$seq_counter" seq_counter=$(( seq_counter + 1 )) done } function make_conflict_index() { local identifier=${1:?The first argument is the name of the parent directory along with the output name} cp .git/index .git/"${identifier}".index } function make_resolve_tree() { local resolve=${1:?Their 'ancestor' or 'ours'} local our_side=${2:-} local their_side=${3:-} local filename="resolve-${our_side}-${their_side}-with-${resolve}" git write-tree > ".git/${filename}.tree" } function baseline () ( local dir=${1:?the directory to enter} local output_name=${2:?the basename of the output of the merge} local our_committish=${3:?our side from which a commit can be derived} local their_committish=${4:?Their side from which a commit can be derived} local opt_deviation_message=${5:-} local one_side=${6:-} cd "$dir" local our_commit_id local their_commit_id local conflict_style="merge" if [[ "$output_name" == *-merge ]]; then conflict_style="merge" elif [[ "$output_name" == *-diff3 ]]; then conflict_style="diff3" fi our_commit_id="$(git rev-parse "$our_committish")" their_commit_id="$(git rev-parse "$their_committish")" local maybe_expected_tree="$(git rev-parse expected^{tree})" local maybe_expected_reversed_tree="$(git rev-parse expected-reversed^{tree})" if [ "$maybe_expected_reversed_tree" == "expected-reversed^{tree}" ]; then maybe_expected_reversed_tree="$(git rev-parse expected^{tree} || :)" fi if [ -z "$opt_deviation_message" ]; then maybe_expected_tree="expected^{tree}" maybe_expected_reversed_tree="expected^{tree}" fi local merge_info="${output_name}.merge-info" git -c merge.conflictStyle=$conflict_style merge-tree -z --write-tree --allow-unrelated-histories "$our_committish" "$their_committish" > "$merge_info" || : echo "$dir" "$conflict_style" "$our_commit_id" "$our_committish" "$their_commit_id" "$their_committish" "$merge_info" "$maybe_expected_tree" "$opt_deviation_message" >> ../baseline.cases if [[ "$one_side" != "no-reverse" ]]; then local merge_info="${output_name}-reversed.merge-info" git -c merge.conflictStyle=$conflict_style merge-tree -z --write-tree --allow-unrelated-histories "$their_committish" "$our_committish" > "$merge_info" || : echo "$dir" "$conflict_style" "$their_commit_id" "$their_committish" "$our_commit_id" "$our_committish" "$merge_info" "$maybe_expected_reversed_tree" "$opt_deviation_message" >> ../baseline.cases fi ) git init non-tree-to-tree (cd non-tree-to-tree write_lines original 1 2 3 4 5 >a git add a && git commit -m "init" git branch A git branch B git checkout A write_lines 1 2 3 4 5 6 >a git commit -am "'A' changes 'a'" git checkout B rm a mkdir -p a/sub touch a/sub/b a/sub/c a/d a/e git add a && git commit -m "mv 'a' to 'a/sub/b', populate 'a/' with empty files" ) git init tree-to-non-tree (cd tree-to-non-tree mkdir -p a/sub write_lines original 1 2 3 4 5 >a/sub/b touch a/sub/c a/d a/e git add a && git commit -m "init" git branch A git branch B git checkout A write_lines 1 2 3 4 5 6 >a/sub/b git commit -am "'A' changes 'a/sub/b'" git checkout B rm -Rf a echo "new file" > a git add a && git commit -m "rm -Rf a/ && add non-empty 'a'" ) git init non-tree-to-tree-with-rename (cd non-tree-to-tree-with-rename write_lines original 1 2 3 4 5 >a git add a && git commit -m "init" git branch A git branch B git checkout A write_lines 1 2 3 4 5 6 >a git commit -am "'A' changes 'a'" git checkout B mv a tmp mkdir -p a/sub mv tmp a/sub/b touch a/sub/c a/d a/e git add a && git commit -m "mv 'a' to 'a/sub/b', populate 'a/' with empty files" ) git init tree-to-non-tree-with-rename (cd tree-to-non-tree-with-rename mkdir -p a/sub write_lines original 1 2 3 4 5 >a/sub/b touch a/sub/c a/d a/e git add a && git commit -m "init" git branch A git branch B git checkout A write_lines 1 2 3 4 5 6 >a/sub/b git commit -am "'A' changes 'a/sub/b'" git checkout B rm -Rf a touch a git add a && git commit -m "rm -Rf a/ && add empty 'a' (which is like a rename from an empty deleted file)" # And because it's so thrown off, it gets a completely different result if reversed. git branch expected-reversed rm .git/index git update-index --index-info <numbers echo hello >greeting echo foo >whatever git add numbers greeting whatever tick git commit -m initial git branch side1 git branch side2 git branch side3 git branch side4 git checkout side1 write_lines 1 2 3 4 5 6 >numbers echo hi >greeting echo bar >whatever git add numbers greeting whatever tick git commit -m modify-stuff git checkout side2 write_lines 0 1 2 3 4 5 >numbers echo yo >greeting git rm whatever mkdir whatever >whatever/empty git add numbers greeting whatever/empty tick git commit -m other-modifications git checkout side3 git mv numbers sequence tick git commit -m rename-numbers git checkout side4 write_lines 0 1 2 3 4 5 >numbers echo yo >greeting git add numbers greeting tick git commit -m other-content-modifications git switch --orphan unrelated >something-else git add something-else tick git commit -m first-commit git checkout -b tweak1 side1 write_lines zero 1 2 3 4 5 6 >numbers git add numbers git mv numbers "Αυτά μου φαίνονται κινέζικα" git commit -m "Renamed numbers" ) git init rename-delete (cd rename-delete write_lines 1 2 3 4 5 >foo mkdir olddir for i in a b c; do echo $i >olddir/$i; done git add foo olddir git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 6 >foo git add foo git mv olddir newdir git commit -m "Modify foo, rename olddir to newdir" git checkout B write_lines 1 2 3 4 5 six >foo git add foo git mv foo olddir/bar git commit -m "Modify foo & rename foo -> olddir/bar" ) git init rename-add (cd rename-add write_lines original 1 2 3 4 5 >foo git add foo git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 >foo echo "different file" >bar git add foo bar git commit -m "Modify foo, add bar" git checkout B write_lines original 1 2 3 4 5 6 >foo git add foo git mv foo bar git commit -m "rename foo to bar" ) git init rename-add-exe-bit-conflict (cd rename-add-exe-bit-conflict touch a b chmod +x a git add --chmod=+x a git add b git commit -m "original" git branch A git branch B git checkout A chmod -x a git update-index --chmod=-x a git commit -m "-x a" git checkout B git mv --force b a chmod +x a git update-index --chmod=+x a git commit -m "mv b a; chmod +x a" ) git init rename-add-symlink (cd rename-add-symlink write_lines original 1 2 3 4 5 >foo git add foo git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 >foo ln -s foo bar git add foo bar git commit -m "Modify foo, add symlink bar" git checkout B write_lines original 1 2 3 4 5 6 >foo git add foo git mv foo bar git commit -m "rename foo to bar" ) git init rename-add-same-symlink (cd rename-add-same-symlink touch target ln -s target link git add . git commit -m "original" git branch A git branch B git checkout A git mv link link-new git commit -m "rename link to link-new" git checkout B ln -s target link-new git add link-new git commit -m "create link-new" ) git init rename-rename-plus-content (cd rename-rename-plus-content write_lines 1 2 3 4 5 >foo git add foo git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 six >foo git add foo git mv foo bar git commit -m "Modify foo + rename to bar" git checkout B write_lines 1 2 3 4 5 6 >foo git add foo git mv foo baz git commit -m "Modify foo + rename to baz" ) git init rename-add-delete ( cd rename-add-delete echo "original file" >foo git add foo git commit -m "original" git branch A git branch B git checkout A git rm foo echo "different file" >bar git add bar git commit -m "Remove foo, add bar" git checkout B git mv foo bar git commit -m "rename foo to bar" ) git init rename-rename-delete-delete ( cd rename-rename-delete-delete echo foo >foo echo bar >bar git add foo bar git commit -m O git branch A git branch B git checkout A git mv foo baz git rm bar git commit -m "Rename foo, remove bar" git checkout B git mv bar baz git rm foo git commit -m "Rename bar, remove foo" ) git init super-1 (cd super-1 seq 11 19 >one seq 31 39 >three seq 51 59 >five git add . tick git commit -m "O" git branch A git branch B git checkout A seq 10 19 >one echo 40 >>three git add one three git mv one two git mv three four git mv five six tick git commit -m "A" git checkout B echo 20 >>one echo forty >>three echo 60 >>five git add one three five git mv one six git mv three two git mv five four tick git commit -m "B" ) git init super-2 (cd super-2 write_lines 1 2 3 4 5 >foo mkdir olddir for i in a b c; do echo $i >olddir/$i || exit 1; done git add foo olddir git commit -m "original" git branch A git branch B git checkout A git rm foo git mv olddir newdir mkdir newdir/bar >newdir/bar/file git add newdir/bar/file git commit -m "rm foo, olddir/ -> newdir/, + newdir/bar/file" git checkout B write_lines 1 2 3 4 5 6 >foo git add foo git mv foo olddir/bar git commit -m "Modify foo & rename foo -> olddir/bar" rm .git/index git update-index --index-info <a/x.f mkdir a/sub && write_lines original 1 2 3 4 5 >a/sub/y.f touch a/w a/sub/z git add . && git commit -m "original" git branch A git branch B git branch expected git checkout A write_lines 1 2 3 4 5 >a/x.f write_lines 1 2 3 4 5 >a/sub/y.f git mv a a-renamed git commit -am "changed all content, renamed a -> a-renamed" git checkout B write_lines original 1 2 3 4 5 6 >a/x.f write_lines original 1 2 3 4 5 6 >a/sub/y.f git mv a/sub a/sub-renamed git commit -am "changed all content, renamed a/sub -> a/sub-renamed" git checkout expected write_lines 1 2 3 4 5 6 >a/x.f write_lines 1 2 3 4 5 6 >a/sub/y.f cp -Rv a/sub a/sub-renamed git add . git mv a a-renamed git commit -am "we also have duplication just like Git, but we are consistent independently of the side, hence the expectation" # We have duplication just like Git, but our index is definitely more complex. This one seems more plausible. # The problem is that renames can't be indicated correctly in the index. rm .git/index git update-index --index-info <a/x.f mkdir a/sub && write_lines original 1 2 3 4 5 >a/sub/y.f touch a/w a/sub/z git add . && git commit -m "original" git branch A git branch B git branch expected git checkout A write_lines 1 2 3 4 5 >a/x.f write_lines 1 2 3 4 5 >a/sub/y.f git mv a/sub a/sub-renamed git mv a a-renamed git commit -am "changed all content, renamed a -> a-renamed, a/sub -> a/sub-renamed" git checkout B write_lines original 1 2 3 4 5 6 >a/x.f write_lines original 1 2 3 4 5 6 >a/sub/y.f git mv a/sub a/sub-renamed git commit -am "changed all content, renamed a/sub -> a/sub-renamed" git checkout expected write_lines 1 2 3 4 5 6 >a/x.f write_lines 1 2 3 4 5 6 >a/sub/y.f git mv a/sub a/sub-renamed git mv a a-renamed git commit -am "tracked both renames, applied all modifications by merge" # This means there are no conflicts actually. make_conflict_index rename-within-rename-2-A-B-deviates make_conflict_index rename-within-rename-2-A-B-deviates-reversed ) git init conflicting-rename (cd conflicting-rename mkdir a && write_lines original 1 2 3 4 5 >a/x.f mkdir a/sub && write_lines original 1 2 3 4 5 >a/sub/y.f touch a/w a/sub/z git add . && git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 >a/x.f write_lines 1 2 3 4 5 >a/sub/y.f git mv a a-renamed git commit -am "changed all content, renamed a -> a-renamed" git checkout B write_lines original 1 2 3 4 5 6 >a/x.f write_lines original 1 2 3 4 5 6 >a/sub/y.f git mv a a-different git commit -am "changed all content, renamed a -> a-different" # Git only sees the files with content changes as conflicting, and somehow misses to add the # bases of the files without content changes. After all, these also have been renamed into # different places which must be a conflict just as much. rm .git/index git update-index --index-info <a/x.f mkdir a/sub && write_lines original 1 2 3 4 5 >a/sub/y.f touch a/w a/sub/z git add . && git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 >a/x.f write_lines 1 2 3 4 5 >a/sub/y.f git mv a/sub a/sub-renamed git commit -am "changed all content, renamed a/sub -> a/sub-renamed" git checkout B write_lines original 1 2 3 4 5 6 >a/x.f write_lines original 1 2 3 4 5 6 >a/sub/y.f git mv a/sub a/sub-different git commit -am "changed all content, renamed a/sub -> a/sub-different" # Here it's the same as above, i.e. Git doesn't list files as conflicting if # they didn't change, even though they have a conflicting rename. rm .git/index git update-index --index-info <a/x.f mkdir a/sub && write_lines original 1 2 3 4 5 >a/sub/y.f touch a/w a/sub/z git add . && git commit -m "original" git branch A git branch B git branch expected git checkout A write_lines 1 2 3 4 5 >a/x.f write_lines 1 2 3 4 5 >a/sub/y.f git mv a a-renamed git commit -am "changed all content, renamed a -> a-renamed" git checkout B write_lines original 1 2 3 4 5 6 >a/sub/y.f git mv a/sub tmp git rm -r a git mv tmp a git commit -am "change something in subdirectory, then overwrite directory with subdirectory" git checkout expected rm .git/index rm -Rf ./a mkdir -p a-renamed/sub write_lines 1 2 3 4 5 >a-renamed/sub/y.f write_lines 1 2 3 4 5 6 >a-renamed/x.f write_lines 1 2 3 4 5 6 >a-renamed/y.f touch a-renamed/z a-renamed/w a-renamed/sub/z git add . git commit -m "Close to what Git has, but different due to rename tracking. This is why content ends up in a different place, which is the only difference." # Since the whole state is very different, the expected index is as well, but at least it should make sense for what it is. # The main issue here is that it finds a rename of a/w to a-renamed/z which completely erases `a/z`, and this happens because it has no basename based matching # like Git during rename tracking. rm .git/index git update-index --index-info <a/x.f touch a/w git add . && git commit -m "original" git branch A git branch B git branch expected git checkout A write_lines 1 2 3 4 5 >a/x.f chmod +x a/x.f a/w git update-index --chmod=+x a/x.f a/w git mv a a-renamed git commit -am "changed a/xf, add +x everywhere, renamed a -> a-renamed" git checkout B write_lines original 1 2 3 4 5 6 >a/x.f git mv a a-renamed git commit -am "changed all content, renamed a -> a-renamed" git checkout expected chmod +x a/x.f a/w git update-index --chmod=+x a/x.f a/w write_lines 1 2 3 4 5 6 >a/x.f git mv a a-renamed git commit -am "Git, when branches are reversed, doesn't keep the +x flag on a/w so we specify our own expectation" # Git sets +x and adds it as conflict, even though the merge is perfect, i.e. one side adds +x on top, perfectly additive. make_conflict_index same-rename-different-mode-A-B make_conflict_index same-rename-different-mode-A-B-reversed ) git init remove-executable-mode (cd remove-executable-mode touch w chmod +x w git add --chmod=+x w git add . && git commit -m "original" git branch A git branch B git checkout A chmod -x w git update-index --chmod=-x w git commit -am "remove executable bit from w" git checkout B write_lines 1 2 3 4 5 >w git commit -am "unrelated change to w" ) git init renamed-symlink-with-conflict (cd renamed-symlink-with-conflict mkdir a && write_lines original 1 2 3 4 5 >a/x.f ln -s a/x.f link git add . && git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 >a/x.f git mv link link-renamed git commit -am "changed a/x.f, renamed link -> link-renamed" git checkout B write_lines original 1 2 3 4 5 6 >a/x.f git mv link link-different git commit -am "change content, renamed link -> link-different" ) git init added-file-changed-content-and-mode (cd added-file-changed-content-and-mode mkdir a && write_lines original 1 2 3 4 5 >a/x.f git add . && git commit -m "original" git branch A git branch B git branch expected git checkout A write_lines 1 2 3 4 5 >new git add . git commit -m "add 'new' with content A" git checkout B write_lines original 1 2 3 4 5 6 >new chmod +x new git add --chmod=+x new git commit -m "add new with content B and +x" git checkout expected echo -n $'<<<<<<< A\n1\n2\n3\n4\n5\n=======\noriginal\n1\n2\n3\n4\n5\n6\n>>>>>>> B\n' >new chmod +x new git add --chmod=+x new git commit -m "Git has a better merge here, but that's due to better hunk handling/hunk splitting. We, however, consistently use +x" ) git init type-change-and-renamed (cd type-change-and-renamed mkdir a && >a/x.f ln -s a/x.f link git add . && git commit -m "original" git branch A git branch B git checkout A rm link && echo not-link > link git commit -am "link type-changed, file changed" git checkout B git mv link link-renamed git commit -am "just renamed the link" ) git init change-and-delete (cd change-and-delete mkdir a && write_lines original 1 2 3 4 5 >a/x.f ln -s a/x.f link git add . && git commit -m "original" git branch A git branch B git checkout A write_lines 1 2 3 4 5 6 >a/x.f rm link && echo not-link > link git commit -am "link type-changed, file changed" git checkout B git rm link a/x.f git commit -am "delete everything" ) git init submodule-both-modify (cd submodule-both-modify mkdir sub (cd sub git init echo original > file git add file tick git commit -m sub-root ) git add sub tick git commit -m root git branch expected git checkout -b A main (cd sub echo A > file git add file tick git commit -m sub-a ) git add sub tick git commit -m a git checkout -b B main (cd sub echo B > file git add file tick git commit -m sub-b ) git add sub tick git commit -m b # We cannot handle submodules yet and thus mark them as conflicted, always if they mismatch at least. rm .git/index git update-index --index-info <a/x.f echo "a/* merge=union" >.gitattributes git add . && git commit -m "original" git branch A git branch B git checkout A write_lines A 1 2 3 4 5 6 >a/x.f git commit -am "change file" git checkout B write_lines B 1 2 3 4 5 7 >a/x.f git commit -am "change file differently" ) git init both-modify-binary (cd both-modify-binary mkdir a && printf '\x00 binary' >a/x.f git add . && git commit -m "original" git branch A git branch B git checkout A printf '\x00 A' >a/x.f git commit -am "change binary file" git checkout B printf '\x00 B' >a/x.f git commit -am "change binary file differently" ) git init both-modify-file-with-binary-attr (cd both-modify-file-with-binary-attr mkdir a && echo 'not binary' >a/x.f git add . && git commit -m "original" git branch A git branch B git checkout A echo 'A binary' >a/x.f git commit -am "change pseudo-binary file" git checkout B echo 'B binary' >a/x.f git commit -am "change pseudo-binary file differently" ) git init big-file-merge (cd big-file-merge git config --local core.bigFileThreshold 100 mkdir a && write_lines original 1 2 3 4 5 >a/x.f git add . && git commit -m "original" git branch A git branch B git checkout A seq 37 >a/x.f git commit -am "turn normal file into big one (102 bytes)" git branch expected git checkout B write_lines 1 2 3 4 5 6 >a/x.f git commit -am "a normal but conflicting file change" ) git init no-merge-base (cd no-merge-base git checkout -b A echo "A" >content && git add . && git commit -m "content A" git checkout --orphan B echo "B" >content && git add . && git commit -m "content B" git checkout -b expectation ) git init multiple-merge-bases (cd multiple-merge-bases write_lines 1 2 3 4 5 >content git add . && git commit -m "initial" git branch A git branch B git checkout A write_lines 0 1 2 3 4 5 >content git commit -am "change in A" && git tag A1 git checkout B write_lines 1 2 3 4 5 6 >content git commit -am "change in B" && git tag B1 git checkout A git merge B1 git checkout B git merge A1 git checkout A write_lines 0 1 2 3 4 5 A >content git commit -am "conflicting in A" git checkout B git rm content write_lines 0 2 3 4 5 six >renamed git commit -m "rename in B" ) git init rename-and-modification (cd rename-and-modification mkdir a && write_lines original 1 2 3 4 5 >a/x.f git add . && git commit -m "original" git branch A git branch B git checkout A git mv a/x.f x.f git commit -am "move a/x.f to the top-level" git checkout B write_lines 1 2 3 4 5 6 >a/x.f git commit -am "changed a/x.f" ) git init symlink-modification (cd symlink-modification touch a b o ln -s o link git add . && git commit -m "original" git branch A git branch B git checkout A rm link && ln -s a link git commit -am "set link to point to 'a'" git checkout B rm link && ln -s b link git commit -am "set link to point to 'b'" ) git init symlink-addition (cd symlink-addition touch a b git add . && git commit -m "original without symlink" git branch A git branch B git checkout A ln -s a link && git add . git commit -m "new link to point to 'a'" git checkout B ln -s b link && git add . git commit -m "new link to point to 'b'" ) git init type-change-to-symlink (cd type-change-to-symlink touch a b link git add . && git commit -m "original without symlink" git branch A git branch B git checkout A git rm link ln -s a link && git add . git commit -m "new link to point to 'a'" git checkout B git rm link ln -s b link && git add . git commit -m "new link to point to 'b'" ) baseline non-tree-to-tree A-B A B baseline tree-to-non-tree A-B A B baseline tree-to-non-tree-with-rename A-B A B baseline non-tree-to-tree-with-rename A-B A B baseline rename-add-same-symlink A-B A B baseline rename-add-exe-bit-conflict A-B A B baseline remove-executable-mode A-B A B baseline simple side-1-3-without-conflict side1 side3 baseline simple fast-forward side1 main baseline simple no-change main main baseline simple side-1-3-without-conflict-diff3 side1 side3 baseline simple side-1-2-various-conflicts side1 side2 baseline simple side-1-2-various-conflicts-diff3 side1 side2 baseline simple single-content-conflict side1 side4 baseline simple single-content-conflict-diff3 side1 side4 baseline simple tweak1-side2 tweak1 side2 baseline simple tweak1-side2-diff3 tweak1 side2 baseline simple side-1-unrelated side1 unrelated baseline simple side-1-unrelated-diff3 side1 unrelated baseline rename-delete A-B A B baseline rename-delete A-similar A A baseline rename-delete B-similar B B baseline rename-add A-B A B baseline rename-add A-B-diff3 A B baseline rename-add-symlink A-B A B baseline rename-add-symlink A-B-diff3 A B baseline rename-rename-plus-content A-B A B baseline rename-rename-plus-content A-B-diff3 A B baseline rename-add-delete A-B A B baseline rename-rename-delete-delete A-B A B baseline super-1 A-B A B baseline super-1 A-B-diff3 A B baseline super-2 A-B A B baseline super-2 A-B-diff3 A B baseline rename-within-rename A-B-deviates A B "Git doesn't detect the rename-nesting, and we do neith, and we do neither" baseline rename-within-rename-2 A-B-deviates A B "TBD: Right, something is different documentation was forgotten :/" baseline conflicting-rename A-B A B baseline conflicting-rename-2 A-B A B baseline conflicting-rename-complex A-B A B "Git has different rename tracking - overall result it's still close enough" baseline same-rename-different-mode A-B A B "Git works for the A/B case, but for B/A it forgets to set the executable bit" baseline renamed-symlink-with-conflict A-B A B baseline added-file-changed-content-and-mode A-B A B "We improve on executable bit handling, but loose on diff quality as we are definitely missing some tweaks" baseline type-change-and-renamed A-B A B baseline change-and-delete A-B A B baseline submodule-both-modify A-B A B "We can't handle submodules yet and just mark them as conflicting. This is planned to be improved." baseline both-modify-union-attr A-B A B baseline both-modify-union-attr A-B-diff3 A B baseline both-modify-binary A-B A B baseline both-modify-binary A-B A B baseline both-modify-file-with-binary-attr A-B A B baseline big-file-merge A-B A B "Git actually ignores core.bigFileThreshold during merging and tries a normal merge (or binary one) anyway. We don't ignore it and treat big files like binary files" \ no-reverse baseline no-merge-base A-B A B baseline no-merge-base A-B-diff3 A B baseline multiple-merge-bases A-B A B baseline multiple-merge-bases A-B-diff3 A B baseline rename-and-modification A-B A B baseline symlink-modification A-B A B baseline symlink-addition A-B A B baseline type-change-to-symlink A-B A B ## ## Only once the tree-merges were performed can we refer to their objects ## when making tree-conflict resolution expectations. It's important ## to get these right. ## (cd simple rm .git/index # 'whatever' is tree-conflict, 'greeting' is content conflict with markers git update-index --index-info <