-
Notifications
You must be signed in to change notification settings - Fork 140
[WIP] removed fetch_if_missing
global
#606
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,8 +57,6 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) | |
struct packet_reader reader; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Jonathan Tan wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Hariom verma wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Kousik Sanagavarapu wrote (reply to this): So here, we are partial-cloning from a shallow remote and some
objects are not sent due to our clone filters. Let's say that
the shallow remote has a 5-commit history and we are cloning it
into another repository with a blob:none filter. The expected
behavior is cloning the 5 commits, with no blobs, except
for the HEAD.
When executing the above process, it leads to errors:
fatal: the remote end hung up unexpectedly
fatal: protocol error: bad pack header
warning: Clone succeeded, but checkout failed
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
I looked into it a bit and it seems that packet_read() is not
successful. I'm not really sure how packet reading fits into
the big picture but it looks like the buffer is not read
completely.
It is a similar case with "bad pack header" too. The function
read_pack_header() fails because the pack header was not fully read.
Also, is the shallow object not sent when cloning due to the partial
clone filter and hence a subsequent fetching is done to ask for this
object? If so, then will such a fetch counted as an args->update_shallow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Kousik Sanagavarapu wrote (reply to this): Sorry, it seems that I misunderstood the whole situation here. I didn't
realize that the problem was on my end and not something to do with the
code. Please ignore the above email except for the last question, which
I still don't seem to understand. So, I would be grateful if you could
clarify.
Thanks,
Kousik There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Jonathan Tan wrote (reply to this): Kousik Sanagavarapu <[email protected]> writes:
> Also, is the shallow object not sent when cloning due to the partial
> clone filter and hence a subsequent fetching is done to ask for this
> object? If so, then will such a fetch counted as an args->update_shallow?
What do you mean by the shallow object? If you mean the last commit that
is sent (that is, without its parents), then that is a commit and is not
excluded by the filter.
As for args->update_shallow, that's a good question. Just glancing at
the code, even if it is set, I don't think there would be any difference
in operation since the lazy fetch does not fetch any refs (and in fact,
in protocol v2, we skip the ref advertisement in this case, as far as I
can remember). |
||
enum protocol_version version; | ||
|
||
fetch_if_missing = 0; | ||
|
||
packet_trace_identity("fetch-pack"); | ||
|
||
memset(&args, 0, sizeof(args)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Christian Couder wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Hariom verma wrote (reply to this):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Hariom verma wrote (reply to this):