-
-
Notifications
You must be signed in to change notification settings - Fork 503
Description
Subject of the issue
Currently this action always performs a deep fetch of the repository, but that doesn't seem to be required, at least anymore (could a GitHub server update make this be possible suddenly?).
Here's a demo where I clone shallowly from the original repo (https://github.com/nixos/nixpkgs/ in this case, which is pretty big), make a commit, and push the result to my fork at https://github.com/infinisil/nixpkgs (which exists already, but it's not up-to-date with the original repo), which takes only a couple seconds:
$ git clone https://github.com/NixOS/nixpkgs --depth=1
Cloning into 'nixpkgs'...
remote: Enumerating objects: 68538, done.
remote: Counting objects: 100% (68538/68538), done.
remote: Compressing objects: 100% (43539/43539), done.
remote: Total 68538 (delta 2653), reused 59426 (delta 2191), pack-reused 0
Receiving objects: 100% (68538/68538), 47.91 MiB | 13.42 MiB/s, done.
Resolving deltas: 100% (2653/2653), done.
Updating files: 100% (40885/40885), done.
$ echo 'A change' >> README.md
$ git commit -a -m 'A change'
[master accef3639] A change
1 file changed, 1 insertion(+)
$ git remote add mine [email protected]:infinisil/nixpkgs.git
$ git push mine HEAD:a-change
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 300 bytes | 300.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for 'a-change' on GitHub by visiting:
remote: https://github.com/infinisil/nixpkgs/pull/new/a-change
remote:
To github.com:infinisil/nixpkgs.git
* [new branch] HEAD -> a-change
Not doing this leads to having to wait 10 minutes for the action to complete in this case, e.g. https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8633608062/job/23667098826. And pushing to a fork is required in this case.
Related issues: