最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

When git downloads files, how do you find the name of the thing being downloaded? - Stack Overflow

programmeradmin8浏览0评论

When git prints information like this:

Receiving objects: 98% (6657/6747), 286.45 MiB | 2.14 MiB/s

Receiving objects: 98% (6657/6747), 288.64 MiB | 2.13 MiB/s

Receiving objects: 98% (6657/6747), 290.51 MiB | 2.08 MiB/s

what exactly is file 6657?

That's the whole question, how do I correlate the number there to a file name or git object?

Background: when I git pull, if there are any changes, it downloads the packfile, and then during processing of the packfile it downloads that 290 megabyte file. The file seems to grow over time. I have already looked at the large files in git, I have already looked at verbose when pulling. I just want to tell git to print the name of what it is downloading, that's all. Show the name, or look it up from that number 6657. Please do not answer questions about git pulling or large files, please answer the question I asked above, about correlating the number to the filename.

When git prints information like this:

Receiving objects: 98% (6657/6747), 286.45 MiB | 2.14 MiB/s

Receiving objects: 98% (6657/6747), 288.64 MiB | 2.13 MiB/s

Receiving objects: 98% (6657/6747), 290.51 MiB | 2.08 MiB/s

what exactly is file 6657?

That's the whole question, how do I correlate the number there to a file name or git object?

Background: when I git pull, if there are any changes, it downloads the packfile, and then during processing of the packfile it downloads that 290 megabyte file. The file seems to grow over time. I have already looked at the large files in git, I have already looked at verbose when pulling. I just want to tell git to print the name of what it is downloading, that's all. Show the name, or look it up from that number 6657. Please do not answer questions about git pulling or large files, please answer the question I asked above, about correlating the number to the filename.

Share Improve this question asked Mar 13 at 21:17 shadynastyshadynasty 113 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

The number is just a count, it's the file that the sender happened to encounter at that time when going through the directory tree. An operation like move, copy, commit, etc. can change that order, so there's no consistent correlation.

You can use lsof on Unix-y systems (Linux, MacOS, BSD) to see what file the git command currently has open (e.g lsof -c git). It will have multiple files open (your terminal is considered a "file"), but you can locate which is being downloaded based on the file path. Keep in mind a lot of those files are part of the git history, various branches, etc. so won't have a name you would recognize as a real file.

afaik no one has ever taught Git to hunt up names for objects in pack files it's downloading. Being sure you can get the name would require already having the complete pack so you can reverse the compression. Since it doesn't have the complete pack yet, there's no way to be sure it's got all the pieces of all the objects it'd take to hunt down a relevant name.

发布评论

评论列表(0)

  1. 暂无评论