-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bundle URIs Part 1: Preparation patches #17
Commits on May 3, 2022
-
connect.c: refactor sending of agent & object-format
Refactor the sending of the "agent" and "object-format" capabilities into a function. This was added in its current form in ab67235 (connect: parse v2 refs with correct hash algorithm, 2020-05-25). When we connect to a v2 server we need to know about its object-format, and it needs to know about ours. Since most things in connect.c and transport.c piggy-back on the eager getting of remote refs via the handshake() those commands can make use of the just-sent-over object-format by ls-refs. But I'm about to add a command that may come after ls-refs, and may not, but we need the server to know about our user-agent and object-format. So let's split this into a function. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for bd592eb - Browse repository at this point
Copy the full SHA bd592ebView commit details -
dir API: add a generalized path_match_flags() function
Add a path_match_flags() function and have the two sets of starts_with_dot_{,dot_}slash() functions added in 63e95be (submodule: port resolve_relative_url from shell to C, 2016-04-15) and a2b26ff (fsck: convert gitmodules url to URL passed to curl, 2020-04-18) be thin wrappers for it. As the latter of those notes the fsck version was copied from the initial builtin/submodule--helper.c version. Since the code added in a2b26ff was doing really doing the same as win32_is_dir_sep() added in 1cadad6 (git clone <url> C:\cygwin\home\USER\repo' is working (again), 2018-12-15) let's move the latter to git-compat-util.h is a is_xplatform_dir_sep(). We can then call either it or the platform-specific is_dir_sep() from this new function. Let's likewise change code in various other places that was hardcoding checks for "'/' || '\\'" with the new is_xplatform_dir_sep(). As can be seen in those callers some of them still concern themselves with ':' (Mac OS classic?), but let's leave the question of whether that should be consolidated for some other time. As we expect to make wider use of the "native" case in the future, define and use two starts_with_dot_{,dot_}slash_native() convenience wrappers. This makes the diff in builtin/submodule--helper.c much smaller. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for 61eb82f - Browse repository at this point
Copy the full SHA 61eb82fView commit details -
fetch-pack: add a deref_without_lazy_fetch_extended()
Add a version of the deref_without_lazy_fetch function which can be called with custom oi_flags and to grab information about the "object_type". This will be used for the bundle-uri client in a subsequent commit. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for 2a563b5 - Browse repository at this point
Copy the full SHA 2a563b5View commit details -
fetch-pack: move --keep=* option filling to a function
Move the populating of the --keep=* option argument to "index-pack" to a static function, a subsequent commit will make use of it in another function. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for dd7eb99 - Browse repository at this point
Copy the full SHA dd7eb99View commit details -
http: make http_get_file() external
This method will be used in an upcoming extension of git-remote-curl to download a single file over HTTP(S) by request. Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for 47ecf80 - Browse repository at this point
Copy the full SHA 47ecf80View commit details -
This method was initially written in 63e95be (submodule: port resolve_relative_url from shell to C, 2016-05-15). As we will need similar functionality in the bundle URI feature, extract this to be available in remote.h. The code is almost exactly the same, except for the following trivial differences: * Fix whitespace and wrapping issues with the prototype and argument lists. * Let's call starts_with_dot_{,dot_}slash_native() instead of the functionally identical "starts_with_dot_{,dot_}slash()" wrappers "builtin/submodule--helper.c". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for de94c47 - Browse repository at this point
Copy the full SHA de94c47View commit details -
remote: allow relative_url() to return an absolute url
When the 'url' parameter was absolute, the previous implementation would concatenate 'remote_url' with 'url'. Instead, we want to return 'url' in this case. The documentation now discusses what happens when supplying two absolute URLs. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for d73b578 - Browse repository at this point
Copy the full SHA d73b578View commit details -
bundle.h: make "fd" version of read_bundle_header() public
Change the parse_bundle_header() function to be non-static, and rename it to parse_bundle_header_fd(). The parse_bundle_header() function is already public, and it's a thin wrapper around this function. This will be used by code that wants to pass a fd to the bundle API. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Configuration menu - View commit details
-
Copy full SHA for c35f35d - Browse repository at this point
Copy the full SHA c35f35dView commit details