Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify me when nixpkgs merged several commits in several branches #846

Closed
kachick opened this issue Oct 16, 2024 · 21 comments · Fixed by #903
Closed

Notify me when nixpkgs merged several commits in several branches #846

kachick opened this issue Oct 16, 2024 · 21 comments · Fixed by #903
Labels
enhancement New feature or request

Comments

@kachick
Copy link
Owner

kachick commented Oct 16, 2024

Why

Note

In local, we can do

> git branch upstream/nixos-24.05 --contains ad770642546822d5146f23f739c4bd57d850f13e

https://stackoverflow.com/questions/43535132/given-a-commit-id-how-to-determine-if-current-branch-contains-the-commit

However it is annoy to keep running in bg

@kachick kachick added the enhancement New feature or request label Oct 16, 2024
@kachick kachick changed the title Add notifications when nixpkgs merged several commits in several branches Notify me when nixpkgs merged several commits in several branches Oct 16, 2024
@kachick
Copy link
Owner Author

kachick commented Oct 31, 2024

@kachick
Copy link
Owner Author

kachick commented Oct 31, 2024

@kachick
Copy link
Owner Author

kachick commented Oct 31, 2024

2m4s

🎯 /tmp/tmp.Zl7lNTtKDk zsh
> time git clone [email protected]:NixOS/nixpkgs.git --branch nixos-unstable --single-branch --shallow-since='2024/05/01'
Cloning into 'nixpkgs'...
remote: Enumerating objects: 834125, done.
remote: Counting objects: 100% (834125/834125), done.
remote: Compressing objects: 100% (305303/305303), done.
remote: Total 834125 (delta 410862), reused 810040 (delta 392003), pack-reused 0 (from 0)
Receiving objects: 100% (834125/834125), 523.41 MiB | 12.30 MiB/s, done.
Resolving deltas: 100% (410862/410862), done.
Checking connectivity: 834124, done.
Updating files: 100% (43911/43911), done.
git clone [email protected]:NixOS/nixpkgs.git --branch nixos-unstable    82.10s user 21.91s system 83% cpu 2:04.76 total

47s

> time git clone [email protected]:NixOS/nixpkgs.git --branch nixos-unstable --single-branch --shallow-since='2024/10/01'
Cloning into 'nixpkgs'...
remote: Enumerating objects: 260035, done.
remote: Counting objects: 100% (260035/260035), done.
remote: Compressing objects: 100% (138940/138940), done.
remote: Total 260035 (delta 62210), reused 242708 (delta 49218), pack-reused 0 (from 0)
Receiving objects: 100% (260035/260035), 170.13 MiB | 11.05 MiB/s, done.
Resolving deltas: 100% (62210/62210), done.
Checking connectivity: 260035, done.
Updating files: 100% (43911/43911), done.
git clone [email protected]:NixOS/nixpkgs.git --branch nixos-unstable    14.78s user 15.52s system 64% cpu 47.343 total

@kachick
Copy link
Owner Author

kachick commented Oct 31, 2024

@kachick
Copy link
Owner Author

kachick commented Oct 31, 2024

@kachick
Copy link
Owner Author

kachick commented Oct 31, 2024

@kachick
Copy link
Owner Author

kachick commented Oct 31, 2024

> git log --date=iso-strict --format='%cd' 4d5acfd5f8f9c800ac57d003d7038f607544ef48.. -1
2024-10-31T21:43:14+09:00

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

2m15s

git clone --branch nixos-unstable --single-branch --no-checkout --shallow-since=2024-01-01 https://github.com/NixOS/nixpkgs.git nixpkgs

git branch -a --contains 3137334d7556e24e3f582681142e505b4d7915a8 includes 3137334d7556e24e3f582681142e505b4d7915a8 (2024-10-17)


15s

git clone --branch nixos-unstable --single-branch --no-checkout --shallow-since=2024-10-16 https://github.com/NixOS/nixpkgs.git nixpkgs

git branch -a --contains 3137334d7556e24e3f582681142e505b4d7915a8 does not include

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

--shallow-since=2024-10-10: NG

--shallow-since=2024-09-15: OK 40s

--shallow-since=2024-10-01: OK 29s

--shallow-since=2024-10-07: NG 20s

why...

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

💭 can't read deepen_since...

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

1m36s

git clone --branch nixos-unstable --single-branch --no-checkout --shallow-exclude=nixos-24.05 https://github.
com/NixOS/nixpkgs.git nixpkgs

OK

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

> du -h nixpkgs
4.0K    nixpkgs/.git/branches
8.0K    nixpkgs/.git/info
68K     nixpkgs/.git/hooks
4.0K    nixpkgs/.git/objects/info
573M    nixpkgs/.git/objects/pack
573M    nixpkgs/.git/objects
8.0K    nixpkgs/.git/refs/tags
8.0K    nixpkgs/.git/refs/heads
20K     nixpkgs/.git/refs
8.0K    nixpkgs/.git/logs/refs/heads
12K     nixpkgs/.git/logs/refs
20K     nixpkgs/.git/logs
574M    nixpkgs/.git
574M    nixpkgs

💭 large for cache

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

💭 depth 1 and checking file content might be better...

@kachick
Copy link
Owner Author

kachick commented Nov 1, 2024

depth 1 and checking file conten

19s

However this way cannot detect reverting merged commits...

Copy link
Contributor

github-actions bot commented Nov 1, 2024

🤖(GH-846): https://github.com/NixOS/nixpkgs/tree/nixos-unstable looks like merged NixOS/nixpkgs@3137334

Repository owner deleted a comment from github-actions bot Nov 3, 2024
@kachick
Copy link
Owner Author

kachick commented Nov 3, 2024

@kachick
Copy link
Owner Author

kachick commented Nov 3, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🎉
Development

Successfully merging a pull request may close this issue.

1 participant