this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ft: patch git-branchless to not show stack numbers

hauleth.dev 4c4a2c60 2ee0eb69

verified
+127 -127
+47 -86
flake.lock
··· 24 24 "beam": { 25 25 "inputs": { 26 26 "flake-parts": "flake-parts", 27 - "nixpkgs": "nixpkgs" 27 + "nixpkgs": [ 28 + "nixpkgs" 29 + ] 28 30 }, 29 31 "locked": { 30 32 "lastModified": 1708268823, ··· 113 115 "nixpkgs-lib": "nixpkgs-lib_2" 114 116 }, 115 117 "locked": { 116 - "lastModified": 1706830856, 117 - "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", 118 + "lastModified": 1709336216, 119 + "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", 118 120 "owner": "hercules-ci", 119 121 "repo": "flake-parts", 120 - "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", 122 + "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2", 121 123 "type": "github" 122 124 }, 123 125 "original": { 124 - "id": "flake-parts", 125 - "type": "indirect" 126 + "owner": "hercules-ci", 127 + "repo": "flake-parts", 128 + "type": "github" 126 129 } 127 130 }, 128 131 "flake-parts_3": { ··· 180 183 } 181 184 }, 182 185 "flake-utils_2": { 186 + "inputs": { 187 + "systems": "systems_2" 188 + }, 183 189 "locked": { 184 - "lastModified": 1667395993, 185 - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", 190 + "lastModified": 1701680307, 191 + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", 186 192 "owner": "numtide", 187 193 "repo": "flake-utils", 188 - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", 194 + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", 189 195 "type": "github" 190 196 }, 191 197 "original": { ··· 194 200 "type": "github" 195 201 } 196 202 }, 197 - "flake-utils_3": { 203 + "git-branchless": { 198 204 "inputs": { 199 - "systems": "systems_2" 205 + "nixpkgs": [ 206 + "nixpkgs" 207 + ] 200 208 }, 201 209 "locked": { 202 - "lastModified": 1701680307, 203 - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", 204 - "owner": "numtide", 205 - "repo": "flake-utils", 206 - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", 210 + "lastModified": 1709742645, 211 + "narHash": "sha256-3bsRnjkwXN8GdJ6PFTabRv9PxG00DJa80J6kOHCXGmQ=", 212 + "owner": "arxanas", 213 + "repo": "git-branchless", 214 + "rev": "3faa0744cf0b0c7c2fe2bf20e5f441776f21c6dd", 207 215 "type": "github" 208 216 }, 209 217 "original": { 210 - "owner": "numtide", 211 - "repo": "flake-utils", 218 + "owner": "arxanas", 219 + "repo": "git-branchless", 212 220 "type": "github" 213 221 } 214 222 }, ··· 241 249 ] 242 250 }, 243 251 "locked": { 244 - "lastModified": 1708806879, 245 - "narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=", 252 + "lastModified": 1709764752, 253 + "narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", 246 254 "owner": "nix-community", 247 255 "repo": "home-manager", 248 - "rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a", 256 + "rev": "cf111d1a849ddfc38e9155be029519b0e2329615", 249 257 "type": "github" 250 258 }, 251 259 "original": { 252 - "id": "home-manager", 253 - "type": "indirect" 260 + "owner": "nix-community", 261 + "repo": "home-manager", 262 + "type": "github" 254 263 } 255 264 }, 256 265 "home-manager_2": { ··· 277 286 "lexical": { 278 287 "inputs": { 279 288 "flake-parts": "flake-parts_3", 280 - "nixpkgs": "nixpkgs_2", 289 + "nixpkgs": "nixpkgs", 281 290 "systems": "systems" 282 291 }, 283 292 "locked": { ··· 315 324 "type": "github" 316 325 } 317 326 }, 318 - "nix-elixir": { 319 - "inputs": { 320 - "flake-utils": "flake-utils_2", 321 - "nixpkgs": "nixpkgs_3" 322 - }, 323 - "locked": { 324 - "lastModified": 1704300128, 325 - "narHash": "sha256-G5qMIxeoKvcXjsBOP32E9UCh0Atjvc/mcatG8MH8QZ4=", 326 - "owner": "hauleth", 327 - "repo": "nix-elixir", 328 - "rev": "fcdeded8314bed0ef21b7d9b25a17b2d290f2bc3", 329 - "type": "github" 330 - }, 331 - "original": { 332 - "owner": "hauleth", 333 - "repo": "nix-elixir", 334 - "type": "github" 335 - } 336 - }, 337 327 "nixpkgs": { 338 328 "locked": { 339 - "lastModified": 1708118438, 340 - "narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=", 341 - "owner": "nixos", 342 - "repo": "nixpkgs", 343 - "rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80", 344 - "type": "github" 329 + "lastModified": 1699725108, 330 + "narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=", 331 + "path": "/nix/store/1ryprai4bllkrna60cmcygxc4qyn79s1-source", 332 + "rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e", 333 + "type": "path" 345 334 }, 346 335 "original": { 347 - "owner": "NixOS", 348 - "ref": "nixpkgs-unstable", 349 - "repo": "nixpkgs", 350 - "type": "github" 336 + "id": "nixpkgs", 337 + "type": "indirect" 351 338 } 352 339 }, 353 340 "nixpkgs-lib": { ··· 406 393 }, 407 394 "nixpkgs_2": { 408 395 "locked": { 409 - "lastModified": 1699725108, 410 - "narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=", 411 - "path": "/nix/store/1ryprai4bllkrna60cmcygxc4qyn79s1-source", 412 - "rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e", 413 - "type": "path" 414 - }, 415 - "original": { 416 - "id": "nixpkgs", 417 - "type": "indirect" 418 - } 419 - }, 420 - "nixpkgs_3": { 421 - "locked": { 422 - "lastModified": 1704008649, 423 - "narHash": "sha256-rGPSWjXTXTurQN9beuHdyJhB8O761w1Zc5BqSSmHvoM=", 396 + "lastModified": 1709780214, 397 + "narHash": "sha256-p4iDKdveHMhfGAlpxmkCtfQO3WRzmlD11aIcThwPqhk=", 424 398 "owner": "NixOS", 425 399 "repo": "nixpkgs", 426 - "rev": "d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7", 400 + "rev": "f945939fd679284d736112d3d5410eb867f3b31c", 427 401 "type": "github" 428 402 }, 429 403 "original": { 430 - "id": "nixpkgs", 431 - "type": "indirect" 432 - } 433 - }, 434 - "nixpkgs_4": { 435 - "locked": { 436 - "lastModified": 1708847675, 437 - "narHash": "sha256-RUZ7KEs/a4EzRELYDGnRB6i7M1Izii3JD/LyzH0c6Tg=", 438 404 "owner": "NixOS", 405 + "ref": "nixpkgs-unstable", 439 406 "repo": "nixpkgs", 440 - "rev": "2a34566b67bef34c551f204063faeecc444ae9da", 441 407 "type": "github" 442 - }, 443 - "original": { 444 - "id": "nixpkgs", 445 - "ref": "nixpkgs-unstable", 446 - "type": "indirect" 447 408 } 448 409 }, 449 410 "nixvim": { ··· 474 435 "pre-commit-hooks": { 475 436 "inputs": { 476 437 "flake-compat": "flake-compat_2", 477 - "flake-utils": "flake-utils_3", 438 + "flake-utils": "flake-utils_2", 478 439 "gitignore": "gitignore", 479 440 "nixpkgs": [ 480 441 "nixvim", ··· 505 466 "beam": "beam", 506 467 "darwin": "darwin", 507 468 "flake-parts": "flake-parts_2", 469 + "git-branchless": "git-branchless", 508 470 "home-manager": "home-manager", 509 471 "lexical": "lexical", 510 - "nix-elixir": "nix-elixir", 511 - "nixpkgs": "nixpkgs_4", 472 + "nixpkgs": "nixpkgs_2", 512 473 "nixvim": "nixvim" 513 474 } 514 475 },
+12 -7
flake.nix
··· 2 2 description = "Hauleth's configuration"; 3 3 4 4 inputs = { 5 - nixpkgs.url = "nixpkgs/nixpkgs-unstable"; 6 - flake-parts.url = "flake:flake-parts"; 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 6 + flake-parts.url = "github:hercules-ci/flake-parts"; 7 7 8 8 home-manager = { 9 - url = "flake:home-manager"; 9 + url = "github:nix-community/home-manager"; 10 10 inputs.nixpkgs.follows = "nixpkgs"; 11 11 }; 12 12 agnoster = { 13 13 url = "github:hauleth/agnoster"; 14 14 inputs.nixpkgs.follows = "nixpkgs"; 15 15 }; 16 - nix-elixir.url = "github:hauleth/nix-elixir"; 17 - # nix-elixir.url = "flake:nix-elixir"; 18 16 darwin = { 19 17 url = "github:lnl7/nix-darwin"; 20 18 inputs.nixpkgs.follows = "nixpkgs"; 21 19 }; 22 20 21 + git-branchless = { 22 + url = "github:arxanas/git-branchless"; 23 + inputs.nixpkgs.follows = "nixpkgs"; 24 + }; 25 + 23 26 lexical.url = "github:lexical-lsp/lexical"; 24 27 25 - beam.url = "github:shanesveller/nix-beam-flakes"; 28 + beam = { 29 + url = "github:shanesveller/nix-beam-flakes"; 30 + inputs.nixpkgs.follows = "nixpkgs"; 31 + }; 26 32 27 33 nixvim = { 28 34 url = "github:nix-community/nixvim"; ··· 71 77 perSystem = { 72 78 self', 73 79 pkgs, 74 - system, 75 80 inputs', 76 81 ... 77 82 }: {
+5 -4
modules/common.nix
··· 14 14 15 15 nix.registry = 16 16 { 17 + beam.flake = inputs.beam; 18 + darwin.flake = inputs.darwin; 19 + dotfiles.flake = inputs.self; 20 + flake-parts.flake = inputs.flake-parts; 21 + lexical.flake = inputs.lexical; 17 22 nixpkgs.flake = inputs.nixpkgs; 18 - dotfiles.flake = inputs.self; 19 - } 20 - // pkgs.lib.optionals pkgs.stdenv.isDarwin { 21 - darwin.flake = inputs.darwin; 22 23 }; 23 24 24 25 nix.package = pkgs.nixFlakes;
+13 -30
modules/git.nix
··· 14 14 ]; 15 15 16 16 settings.aliases.co = "pr checkout"; 17 + settings.aliases.patch = "!patch2pr"; 17 18 settings.version = "1"; 18 19 }; 19 20 20 21 # manual.manpages.enable = true; 21 22 22 23 home.packages = let 23 - git-branchless-man = pkgs.runCommand "git-branchless-man" {} '' 24 + git-branchless = inputs.git-branchless.packages.${pkgs.stdenv.hostPlatform.system}.git-branchless.overrideAttrs (_: _: { 25 + patches = [ 26 + ./git/no-stack-index.patch 27 + ]; 28 + 29 + postInstall = '' 24 30 mkdir -p $out/share/man 25 - ${pkgs.git-branchless}/bin/git-branchless install-man-pages $out/share/man 26 - ''; 27 - git-cliff = pkgs.rustPlatform.buildRustPackage { 28 - pname = "git-cliff"; 29 - version = "2.0.0-pre"; 30 31 31 - src = pkgs.fetchFromGitHub { 32 - owner = "orhun"; 33 - repo = "git-cliff"; 34 - rev = "d408e6377a5157f6d285b2733e6640d36316cfd4"; 35 - hash = "sha256-DqfcSSG/XmeFHckP9Mmv560WA9VJjhDhpYSkYT9YW9I="; 36 - }; 37 - 38 - cargoHash = "sha256-Qw7ZHLWPgIKqCmjhHwJ4QEz/WQMxrR8eG3tAgAKN7v0="; 39 - 40 - buildNoDefaultFeatures = true; 41 - buildFeatures = ["github"]; 42 - 43 - # attempts to run the program on .git in src which is not deterministic 44 - doCheck = false; 45 - 46 - buildInputs = lib.optionals pkgs.stdenv.isDarwin [ 47 - pkgs.darwin.apple_sdk.frameworks.CoreFoundation 48 - pkgs.darwin.apple_sdk.frameworks.Security 49 - pkgs.darwin.apple_sdk.frameworks.SystemConfiguration 50 - ]; 51 - }; 32 + $out/bin/git-branchless install-man-pages $out/share/man 33 + ''; 34 + }); 52 35 in [ 53 36 pkgs.git-absorb 54 - pkgs.git-branchless 55 - git-branchless-man 37 + git-branchless 56 38 pkgs.git-gone 57 - git-cliff 39 + pkgs.git-cliff 58 40 pkgs.git-revise 59 41 pkgs.gitAndTools.git-imerge 60 42 pkgs.prr 61 43 pkgs.hut 44 + pkgs.patch2pr 62 45 inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.imbox 63 46 ]; 64 47
+49
modules/git/no-stack-index.patch
··· 1 + diff --git i/git-branchless-submit/src/github.rs w/git-branchless-submit/src/github.rs 2 + index 2e8abbb..9973f5a 100644 3 + --- i/git-branchless-submit/src/github.rs 4 + +++ w/git-branchless-submit/src/github.rs 5 + @@ -523,7 +523,6 @@ fn make_updated_pull_request_info( 6 + pull_request_infos: &HashMap<String, client::PullRequestInfo>, 7 + commit_oid: NonZeroOid, 8 + ) -> EyreExitOr<client::UpdatePullRequestArgs> { 9 + - let mut stack_index = None; 10 + let mut stack_pull_request_infos: IndexMap<NonZeroOid, &client::PullRequestInfo> = 11 + Default::default(); 12 + 13 + @@ -612,9 +611,6 @@ fn make_updated_pull_request_info( 14 + None => continue, 15 + }; 16 + stack_pull_request_infos.insert(stack_commit_oid, pull_request_info); 17 + - if stack_commit_oid == commit_oid { 18 + - stack_index = Some(stack_pull_request_infos.len()); 19 + - } 20 + } 21 + 22 + let stack_size = stack_pull_request_infos.len(); 23 + @@ -625,17 +621,6 @@ fn make_updated_pull_request_info( 24 + "No pull requests in stack for commit" 25 + ); 26 + } 27 + - let stack_index = match stack_index { 28 + - Some(stack_index) => stack_index.to_string(), 29 + - None => { 30 + - warn!( 31 + - ?commit_oid, 32 + - ?stack_pull_request_infos, 33 + - "Could not determine index in stack for commit" 34 + - ); 35 + - "?".to_string() 36 + - } 37 + - }; 38 + 39 + let stack_list = { 40 + let mut result = String::new(); 41 + @@ -650,7 +635,7 @@ fn make_updated_pull_request_info( 42 + let commit = self.repo.find_commit_or_fail(commit_oid)?; 43 + let commit_summary = commit.get_summary()?; 44 + let commit_summary = String::from_utf8_lossy(&commit_summary).into_owned(); 45 + - let title = format!("[{stack_index}/{stack_size}] {commit_summary}"); 46 + + let title = commit_summary; 47 + let commit_message = commit.get_message_pretty(); 48 + let commit_message = String::from_utf8_lossy(&commit_message); 49 + let body = format!(
+1
modules/tools.nix
··· 14 14 jo 15 15 glow 16 16 pkgs-self.ubin-client 17 + reuse 17 18 ]; 18 19 }