OK, i've the problem or difference taht cases native git-lfs to push alle objects.
native git trace output:
...
11:06:52.571531 trace git-lfs: exec: git 'version'
11:06:52.688537 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
11:06:52.785543 trace git-lfs: exec: git 'config' '-l'
11:06:52.832546 trace git-lfs: pre-push: refs/heads/jgit_lfs 73e7e71578ef06082156fcb967d521a712dcf092 refs/heads/jgit_lfs 4b6e83212e9e5caaa7a3bed34de2c35e0ef42d8a
11:06:53.615590 trace git-lfs: tq: running as batched queue, batch size of 100
11:06:53.615590 trace git-lfs: run_command: git rev-list --stdin --objects --not --remotes=origin --
11:06:53.829603 trace git-lfs: tq: sending batch of size 1
11:06:53.829603 trace git-lfs: api: batch 1 files
...
jgit trace output:
...
11:05:12.289795 trace git-lfs: exec: git 'version'
11:05:12.426803 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
11:05:12.517808 trace git-lfs: exec: git 'config' '-l'
11:05:12.574811 trace git-lfs: pre-push: refs/heads/jgit_lfs 73e7e71578ef06082156fcb967d521a712dcf092 refs/heads/jgit_lfs 4b6e83212e9e5caaa7a3bed34de2c35e0ef42d8a
11:05:13.347856 trace git-lfs: tq: running as batched queue, batch size of 100
11:05:13.408859 trace git-lfs: tq: sending batch of size 100
11:05:13.411859 trace git-lfs: api: batch 100 files
...
You see the difference that "git rev-list" is called with "--remotes=origin" parameter that uses in native git hook and "--remotes=
https://myserver/myrepo.git" with repo-URL.
This causes to transfer "api: batch 1 files" in good case and "api: batch 100 files" in bad case.
If you try this commands at command line, e.g. here instead of --stdin "git rev-list 73e7e71578ef06082156fcb967d521a712dcf092 --objects --not --remotes=origin --" then it will return the right diff (sha1) with one file.
With "git rev-list
73e7e71578ef06082156fcb967d521a712dcf092 --objects --not --remotes=
https://myserver/myrepo.git" it will return the whole history with all commits!
The parameters are passen to the hook and inside hook it looks like:
The question is why instead of remote name JGit passes the (double) URL to the hook ?