Signed-off-by: Brandon Williams
---
Documentation/technical/pack-protocol.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/technical/pack-protocol.txt
b/Documentation/technical/pack-protocol.txt
index 7fee6b780a..25acd9edb1 100644
--- a/Documentation
On 07/22, Duy Nguyen wrote:
> On Thu, Jun 28, 2018 at 12:33 AM Brandon Williams wrote:
> > +static void receive_wanted_refs(struct packet_reader *reader, struct ref
> > *refs)
> > +{
> > + process_section_header(reader, "wanted-refs", 0);
> &g
Signed-off-by: Brandon Williams
---
fetch-pack.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fetch-pack.c b/fetch-pack.c
index 0b4a9f288f..51abee6181 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1245,13 +1245,13 @@ static int process_section_header
On 07/23, Junio C Hamano wrote:
> Junio C Hamano writes:
>
> > Brandon Williams writes:
> >
> >> Signed-off-by: Brandon Williams
> >> ---
> >> fetch-pack.c | 16
> >> 1 file changed, 8 insertions(+), 8 deletions(-)
> &g
On 07/23, Jonathan Nieder wrote:
> Hi,
>
> Brandon Williams wrote:
>
> > --- a/Documentation/technical/pack-protocol.txt
> > +++ b/Documentation/technical/pack-protocol.txt
> > @@ -50,7 +50,8 @@ Each Extra Parameter takes the form of `=` or
> > ``.
> >
On 07/20, Jeff Hostetler wrote:
>
>
> On 7/18/2018 1:15 PM, Brandon Williams wrote:
> > On 07/18, Stefan Beller wrote:
> > > On Wed, Jul 18, 2018 at 6:31 AM Derrick Stolee wrote:
> > > >
> > > > On 7/17/2018 7:25 PM, Stefan Beller wrote:
&
On 07/17, Brandon Williams wrote:
> Signed-off-by: Brandon Williams
> ---
>
> Since introducing protocol v2 and enabling fetch I've been thinking
> about what its inverse 'push' would look like. After talking with a
> number of people I have a longish lis
), and I think the correct resolution is to move your
> removal of "&& !rs->nr" to do_fetch() function where that commit
> moved to.
>
> Thanks.
>
> [2] https://public-inbox.org/git/xmqqd0vwcfkr....@gitster-ct.c.googlers.com/
Yeah I still don't like it from a performance perspective, but given
people rely on this functionality I've been convinced its necessary for
correctness until we make other changes.
--
Brandon Williams
On 07/24, Junio C Hamano wrote:
> Brandon Williams writes:
>
> >> Not about this patch, but I wonder if an organization along the
> >> following lines would make sense?
> >>
> >> 1. Rename pack-protocol.txt to protocol-v1.txt. Rename
>
On 07/25, Duy Nguyen wrote:
> On Tue, Jul 24, 2018 at 9:29 PM Brandon Williams wrote:
> >
> > On 07/17, Brandon Williams wrote:
> > > Signed-off-by: Brandon Williams
> > > ---
> > >
> > > Since introducing protocol v2 and enabling fetch I&
use a ref-store (and instead
just calls the underlying impl with get_main_ref_store()). Am I missing
something here?
--
Brandon Williams
sensitive.
> + git config -f caseSens v."A".r VAL &&
> + git config -f caseSens v."a".r val &&
> +
> + echo VAL >caseSens_expect &&
> + git config -f caseSens v."A".r >caseSens_actual &&
> + test_cmp caseSens_expect caseSens_actual &&
> +
> + echo val >caseSens_expect &&
> + git config -f caseSens v."a".r >caseSens_actual &&
> + test_cmp caseSens_expect caseSens_actual
> +'
> +
> for VAR in a .a a. a.0b a."b c". a."b c".0d
> do
> test_expect_success "git -c $VAR=VAL rejects invalid '$VAR'" '
> --
> 2.18.0.345.g5c9ce644c3-goog
>
--
Brandon Williams
010dce0c..57c2f65104 100644
> --- a/refspec.c
> +++ b/refspec.c
> @@ -62,8 +62,12 @@ static int parse_refspec(struct refspec_item *item, const
> char *refspec, int fet
> return 0;
> }
>
> + if (llen == 1 && lhs[0] == '@')
> + item->src = xstrdup("HEAD");
> + else
> + item->src = xstrndup(lhs, llen);
> +
This is probably the easiest place to put the aliasing logic so I don't
have any issue with including it here.
--
Brandon Williams
his will get the objects but fail to update refs
> git fetch
>
> # and fetching again will actually update the refs
> git fetch
> -- 8< --
>
> -Peff
--
Brandon Williams
On 07/30, brian m. carlson wrote:
> On Mon, Jul 30, 2018 at 10:50:51AM -0700, Brandon Williams wrote:
> > On 07/29, brian m. carlson wrote:
> > > The object ID parsing machinery is aware of "@" as a synonym for "HEAD"
> > > and this is docum
e the
input list again in this case and just simply add the resulting refs to
the input list?
>
> [1]
> https://public-inbox.org/git/86a128c5fb710a41791e7183207c4d64889f9307.1485381677.git.jonathanta...@google.com/
> [2]
> https://public-inbox.org/git/eef2b77d88df0db08e4a1505b06e0af2d40143d5.1485381677.git.jonathanta...@google.com/
> [3] https://public-inbox.org/git/20180620213235.10952-1-bmw...@google.com/
--
Brandon Williams
s to the
> tail of the input list. Upon hindsight, maybe this should have been the
> original API change instead of the "fetched_refs" mechanism.
Thanks for getting this out, it looks good to me. If we end up adding
patterns to ref-in-want then we can explore what changes would need to
be made then, I expect we may need to do a bit more work on the whole
fetching stack to get what we'd want in that case (because we would want
to avoid this issue again).
--
Brandon Williams
;t
interested in taking, shouldn't they at least get informed of that?
Anyway those are just some of my thoughts. If my thinking is mistaken or I'm
missing something please point it out to me.
[1]
https://public-inbox.org/git/cagz79kygs4dvoetygx01cinrxxlcqgxovsplhmgyz8b51lz...@mail.gmail.com/
This mail seems to counter that indicating that the "What's Cooking"
emails should not be used as a status update.
--
Brandon Williams
This allows for a single
location where we can munge the submodule name (by url encoding it)
before using it as part of a path.
Signed-off-by: Brandon Williams
---
Using submodule names as is continues to be not such a good idea. Maybe
we could apply something like this to stop using them
Here's a more polished series taking into account some of the feedback
on the RFC. As Junio pointed out URL encoding makes the directories
much more human readable, but I'm open to other ideas if we don't think
URL encoding is the right thing to do.
Brandon Williams (2):
su
ld a path to the submodule's gitdir.
Signed-off-by: Brandon Williams
---
submodule.c | 14 ++
t/t7400-submodule-basic.sh | 32 +++-
t/t7406-submodule-update.sh | 21 ++---
3 files changed, 51 insertions(+), 16 deletions(-)
d up a path into a
repository's "modules" directory, abstracting away the fact that
submodule git directories are stored in a repository's common gitdir.
This makes it easier to adjust how submodules gitdir are stored in the
"modules" directory in a future patch.
Signe
On 08/08, Stefan Beller wrote:
> On Wed, Aug 8, 2018 at 3:33 PM Brandon Williams wrote:
> >
> > Introduce a helper function "submodule_name_to_gitdir()" (and the
> > submodule--helper subcommand "gitdir") which constructs a path to a
> > submodule
On 08/10, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > Introduce a helper function "submodule_name_to_gitdir()" (and the
> > submodule--helper subcommand "gitdir") which constructs a path to a
> > submodule's gitdir, located in
me=$(git submodule--helper name "$sm_path") || exit
> if ! test -z "$update"
> then
> @@ -577,11 +579,6 @@ cmd_update()
> die "$(eval_gettext "Unable to find current
> \${remote_name}/\${branch} revision in submodule path '\$sm_path'")"
> fi
>
> - if ! $(git config -f "$(git rev-parse
> --git-common-dir)/modules/$name/config" core.worktree) 2>/dev/null
> - then
> - git submodule--helper connect-gitdir-workingtree
> "$name" "$sm_path"
> - fi
> -
> if test "$subsha1" != "$sha1" || test -n "$force"
> then
> subforce=$force
> --
> 2.18.0.132.g195c49a2227
>
--
Brandon Williams
ttwen
commondir and gitdir for worktrees. Using the "repo_git_path" function
handles path rewritting when using worktrees. Here (when working with
worktrees) "subrepo.gitdir" refers to the worktree specific gitdir while
"subrepo.commondir" refers to the global common gitdir where the
repository config actually lives.
--
Brandon Williams
ue) {
> marker_size = atoi(check->items[1].value);
> @@ -398,7 +398,7 @@ int ll_merge_marker_size(const char *path)
>
> if (!check)
> check = attr_check_initl("conflict-marker-size", NULL);
> - if (!git_check_attr(path, check) && check->items[0].value) {
> + if (!git_check_attr(&the_index, path, check) && check->items[0].value) {
> marker_size = atoi(check->items[0].value);
> if (marker_size <= 0)
> marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
> diff --git a/userdiff.c b/userdiff.c
> index 36af25e7f9..f3f4be579c 100644
> --- a/userdiff.c
> +++ b/userdiff.c
> @@ -278,7 +278,7 @@ struct userdiff_driver *userdiff_find_by_path(const char
> *path)
> check = attr_check_initl("diff", NULL);
> if (!path)
> return NULL;
> - if (git_check_attr(path, check))
> + if (git_check_attr(&the_index, path, check))
> return NULL;
>
> if (ATTR_TRUE(check->items[0].value))
> diff --git a/ws.c b/ws.c
> index a07caedd5a..5b67b426e7 100644
> --- a/ws.c
> +++ b/ws.c
> @@ -78,7 +78,7 @@ unsigned whitespace_rule(const char *pathname)
> if (!attr_whitespace_rule)
> attr_whitespace_rule = attr_check_initl("whitespace", NULL);
>
> - if (!git_check_attr(pathname, attr_whitespace_rule)) {
> + if (!git_check_attr(&the_index, pathname, attr_whitespace_rule)) {
> const char *value;
>
> value = attr_whitespace_rule->items[0].value;
> --
> 2.18.0.1004.g6639190530
>
--
Brandon Williams
e, namelen, item))
> return 0;
Yuck, all of this just because I added the ability to match against
attrs with pathspecs. Part of me wonders if it would be better to put a
pointer to the needed istate in the pathspec struct...but then I can
think of a ton of reasons why that wouldn't be good either.
So yes I think this is probably the right approach, I'm just sorry I
made it this messy :/
--
Brandon Williams
rection(GIT_ATTR_CHECKOUT);
>
> if (should_update_submodules() && o->update && !o->dry_run)
> load_gitmodules_file(index, NULL);
> @@ -413,7 +413,7 @@ static int check_updates(struct unpack_trees_options *o)
> stop_progress(&progress);
> errs |= finish_delayed_checkout(&state);
> if (o->update)
> - git_attr_set_direction(GIT_ATTR_CHECKIN, NULL);
> + git_attr_set_direction(GIT_ATTR_CHECKIN);
> return errs != 0;
> }
>
> --
> 2.18.0.1004.g6639190530
>
--
Brandon Williams
the approach this series took vs what your part 1 did so that
we can get this change in.
--
Brandon Williams
bmodule lets continue' '
> HEAD b \
> HEAD submodule \
> >actual &&
> - test_cmp expect_error actual &&
> - git reset --hard HEAD^
> + test_cmp expect_error actual
> )
> '
>
> --
> 2.18.0
>
--
Brandon Williams
quot; >expected &&
> + git submodule--helper config submodule.submodule.url "new_url"
> &&
> + git submodule--helper config submodule.submodule.url >actual &&
> + test_cmp expected actual
> + )
> +'
> +
> +test_expect_success 'overwriting unstaged submodules config with
> "submodule--helper config"' '
> + (cd super &&
> + echo "newer_url" >expected &&
> + git submodule--helper config submodule.submodule.url
> "newer_url" &&
> + git submodule--helper config submodule.submodule.url >actual &&
> + test_cmp expected actual
> + )
> +'
> +
> test_done
> --
> 2.18.0
>
--
Brandon Williams
--helper config submodule."$sm_name".path "$sm_path" &&
> + git submodule--helper config submodule."$sm_name".url "$repo" &&
> if test -n "$branch"
> then
> - git config -f .gitmodules submodule."$sm_name".branch "$branch"
> + git submodule--helper config submodule."$sm_name".branch
> "$branch"
> fi &&
> git add --force .gitmodules ||
> die "$(eval_gettext "Failed to register submodule '\$sm_path'")"
> --
> 2.18.0
>
--
Brandon Williams
rl newurl
> + )
> +'
> +
> +test_expect_success 'initialising submodule when the gitmodules config is
> not checked out' '
> + (cd super &&
> + git submodule init
> + )
> +'
> +
> +test_expect_success 'showing submodule summary when the gitmodules config is
> not checked out' '
> + (cd super &&
> + git submodule summary
> + )
> +'
> +
> +test_expect_success 'updating submodule when the gitmodules config is not
> checked out' '
> + (cd submodule &&
> + echo file2 >file2 &&
> + git add file2 &&
> + git commit -m "add file2 to submodule"
> + ) &&
> + (cd super &&
> + git submodule update
> + )
> +'
> +
> +test_expect_success 'not adding submodules when the gitmodules config is not
> checked out' '
> + (cd super &&
> + test_must_fail git submodule add ../new_submodule
> + )
> +'
> +
> +# This test checks that the previous "git submodule add" did not leave the
> +# repository in a spurious state when it failed.
> +test_expect_success 'init submodule still works even after the previous add
> failed' '
> + (cd super &&
> + git submodule init
> + )
> +'
> +
> +test_done
> --
> 2.18.0
>
--
Brandon Williams
On 08/09, Jeff King wrote:
> On Wed, Aug 08, 2018 at 03:33:23PM -0700, Brandon Williams wrote:
>
> > Commit 0383bbb901 (submodule-config: verify submodule names as paths,
> > 2018-04-30) introduced some checks to ensure that submodule names don't
> > include direct
-submodules file://...
>
> might clone the submodules that are in detached HEAD, which is totally
> not a long term viable good HEAD, so a subsequent fetch might want
> to change the detached HEAD in submodules or re-affix it to branches.
>
> Unrelated/extended: I think it would be cool to mirror a repository even
> more, e.g. it would be cool to be able to fetch (if configured as allowed)
> the remote reflog, (not to be confused with you local reflog of the remote).
> I think that work would be enabled once reftables are available, which you
> have an eye on?
--
Brandon Williams
> >>
> >> Sane?
Seems like a sensible thing to do. Let me work up some patches to
implement this using config primarily and these other schemes as
fallbacks.
> >
> > I'll keep thinking about it.
>
> Thanks.
>
> > FYI: the reduction in configuration was just sent out.
>
> https://public-inbox.org/git/20180816023100.161626-1-sbel...@google.com/
> for those following along.
>
> Ciao,
> Jonathan
--
Brandon Williams
Introduce the config "submodule..gitdirpath" which is used to
indicate where a submodule's gitdir is located inside of a repository's
"modules" directory.
Signed-off-by: Brandon Williams
---
Maybe something like this on top? Do you think we should disallow "
t; > time is probably now.
> >
> > Have we rejected the config approach?
>
> I did not reject that approach, but am rather waiting for patches. ;-)
Note I did send out a patch using this approach, so no need to wait any
longer! :D
https://public-inbox.org/git/20180816181940.46114-1-bmw...@google.com/
--
Brandon Williams
On Tue, Sep 17, 2019 at 6:56 PM Matheus Tavares
wrote:
>
> When grepping with --recurse-submodules, the object directory of the
> submodule is added to the in-memory alternates list. This makes git need
> to watch out for more packfiles which might bring bad consequences for
> memory and performan
On 03/01, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > +enum packet_read_status packet_reader_read(struct packet_reader *reader)
> > +{
> > + if (reader->line_peeked) {
> > + reader->line_peeked = 0;
> > + return read
On 03/01, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > Documentation/technical/protocol-v2.txt | 171
>
> Unlike other things in Documentation/technical/, this is not listed
> on TECH_DOCS list in Documentation/Makefile. Shouldn't it be?
Ye
On 03/02, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > diff --git a/builtin/fetch.c b/builtin/fetch.c
> > index 850382f55..695fafe06 100644
> > --- a/builtin/fetch.c
> > +++ b/builtin/fetch.c
> > @@ -332,11 +332,25 @@ static struct ref *get_ref_
On 03/02, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > Construct a list of ref patterns to be passed to 'get_refs_list()' from
> > the refspec to be used during the push. This list of ref patterns will
> > be used to allow the server to
On 03/01, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > Factor out the logic for processing shallow, deepen, deepen_since, and
> > deepen_not lines into their own functions to simplify the
> > 'receive_needs()' function in addition to making it easi
On 03/12, Brandon Williams wrote:
> On 03/01, Junio C Hamano wrote:
> > Brandon Williams writes:
> >
> > > Factor out the logic for processing shallow, deepen, deepen_since, and
> > > deepen_not lines into their own functions to simplify the
> > > '
supporting it).
>
> I do agree we should have _something_ that is easy to spin up. But it
> would be wonderful if git-over-http could become that, and we could just
> deprecate git://. I suppose it's possible people build clients without
> curl, but I suspect that's an extreme minority these days (most third
> party hosters don't seem to offer git:// at all).
>
> -Peff
--
Brandon Williams
On 03/13, Jonathan Tan wrote:
> On Wed, 28 Feb 2018 15:22:21 -0800
> Brandon Williams wrote:
>
> > In order to allow for code sharing with the server-side of fetch in
> > protocol-v2 convert upload-pack to be a builtin.
> >
> > Signed-off-by: Brandon Willia
On 03/13, Jonathan Tan wrote:
> On Wed, 28 Feb 2018 15:22:18 -0800
> Brandon Williams wrote:
>
> > + if (len < 0) {
> > die("protocol error: bad line length character: %.4s", linelen);
> > - if (!len) {
> > + } else if (!le
On 03/05, Jeff King wrote:
> On Mon, Mar 05, 2018 at 10:21:55AM -0800, Brandon Williams wrote:
>
> > > Hmm, so this would accept stuff like "refs/heads/*/foo" but quietly
> > > ignore the "/foo" part.
> >
> > Yeah that's true...t
On 03/02, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > + ls-refs
> > +-
> > +
> > +`ls-refs` is the command used to request a reference advertisement in v2.
> > +Unlike the current reference advertisement, ls-refs takes in arguments
> >
On 03/02, Junio C Hamano wrote:
> Brandon Williams writes:
> > +static int is_command(const char *key, struct protocol_capability
> > **command)
> > +{
> > + const char *out;
> > +
> > + if (skip_prefix(key, "command=", &ou
On 03/02, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > + Capabilities
> > +~~
> > +
> > +There are two different types of capabilities: normal capabilities,
> > +which can be used to to convey information or alter the behavior of a
>
On 03/13, Jonathan Tan wrote:
> On Wed, 28 Feb 2018 15:22:37 -0800
> Brandon Williams wrote:
>
> > +output = *section
> > +section = (acknowledgments | packfile)
> > + (flush-pkt | delim-pkt)
> > +
> > +acknowle
On 03/13, Jonathan Tan wrote:
> On Wed, 28 Feb 2018 15:22:44 -0800
> Brandon Williams wrote:
>
> > +'stateless-connect'::
> > + Experimental; for internal use only.
> > + Can attempt to connect to a remote server for communication
> > +
1-bmw...@google.com/
Brandon Williams (35):
pkt-line: introduce packet_read_with_status
pkt-line: allow peeking a packet line without consuming it
pkt-line: add delim packet support
upload-pack: convert to a builtin
upload-pack: factor out processing lines
transport: use get_refs_via_conne
enables a caller to be able to peek a single line at a time
using 'packet_reader_peek()' and having a caller consume a line by
calling 'packet_reader_read()'.
Signed-off-by: Brandon Williams
---
pkt-line.c | 50 +
_status'
type. This allows for easily identifying between special and normal
packets as well as errors. It also enables easily adding a new special
packet in the future.
Signed-off-by: Brandon Williams
---
pkt-line.c | 51 +--
pkt-line.h | 16
eserved to indicate the end of a response.
Documentation for how this packet will be used in protocol v2 will
included in a future patch.
Signed-off-by: Brandon Williams
---
pkt-line.c | 16
pkt-line.h | 3 +++
2 files changed, 19 insertions(+)
diff --git a/pkt-line.c b/pkt-li
In order to allow for code sharing with the server-side of fetch in
protocol-v2 convert upload-pack to be a builtin.
Signed-off-by: Brandon Williams
---
Makefile | 3 +-
builtin.h | 1 +
builtin/upload-pack.c | 67 ++
git.c
st line
without consuming the first ref sent in the protocol_v0 case so that the
protocol version the server is speaking can be determined outside of
'get_remote_heads()' in a future patch.
Signed-off-by: Brandon Williams
---
connect.c | 173 ++-
Introduce a packet-line test helper which can either pack or unpack an
input stream into packet-lines and writes out the result to stdout.
Signed-off-by: Brandon Williams
---
Makefile | 1 +
t/helper/test-pkt-line.c | 64
2 files changed
Introduce protocol_v2, a new value for 'enum protocol_version'.
Subsequent patches will fill in the implementation of protocol_v2.
Signed-off-by: Brandon Williams
---
builtin/fetch-pack.c | 2 ++
builtin/receive-pack.c | 6 ++
builtin/send-pack.c| 3 +++
builtin/upload-p
t the completion of a command, a client can request that
another command be executed or can terminate the connection by sending a
flush packet.
Signed-off-by: Brandon Williams
---
.gitignore | 1 +
Documentation/Makefile | 1 +
Documentation/tech
Teach the client to be able to request a remote's refs using protocol
v2. This is done by having a client issue a 'ls-refs' request to a v2
server.
Signed-off-by: Brandon Williams
---
builtin/upload-pack.c | 10 +--
connect.c
based on provided ref-prefixes.
Signed-off-by: Brandon Williams
---
Documentation/technical/protocol-v2.txt | 31 +++
Makefile| 1 +
ls-refs.c | 96
ls-refs.h | 10
Construct a list of ref prefixes to be passed to
'transport_get_remote_refs()' from the refspec to be used during the
fetch. This list of ref prefixes will be used to allow the server to
filter the ref advertisement when communicating using protocol v2.
Signed-off-by: Brando
Construct an argv_array of ref prefixes based on the patterns supplied
via the command line and pass them to 'transport_get_remote_refs()' to
be used when communicating protocol v2 so that the server can limit the
ref advertisement based on those prefixes.
Signed-off-by: Brando
Enable shallow clones and deepen requests using protocol version 2 if
the server 'fetch' command supports the 'shallow' feature.
Signed-off-by: Brandon Williams
---
connect.c| 22
connect.h| 2 +
Construct a list of ref prefixes to be passed to 'get_refs_list()' from
the refspec to be used during the push. This list of ref prefixes will
be used to allow the server to filter the ref advertisement when
communicating using protocol v2.
Signed-off-by: Brandon Williams
---
transp
A future patch will need to take advantage of the logic which runs and
processes the response of the connect command on a remote helper so
factor out this logic from 'process_connect_service()' and place it into
a helper function 'run_connect()'.
Signed-off-by: Brandon Will
When communicating with a v2 server, perform a fetch by requesting the
'fetch' command.
Signed-off-by: Brandon Williams
---
Documentation/technical/protocol-v2.txt | 68 +-
builtin/fetch-pack.c| 2 +-
fetch-pack.c
y in our
http remote-helper (remote-curl) so that protocol v2 can be used using
the http transport.
Signed-off-by: Brandon Williams
---
Documentation/gitremote-helpers.txt | 32 +
transport-helper.c | 11 ++
transport.c
Add the 'packet_buf_write_len()' function which allows for writing an
arbitrary length buffer into a 'struct strbuf' and formatting it in
packet-line format.
Signed-off-by: Brandon Williams
---
pkt-line.c | 16
pkt-line.h | 1 +
2 files changed, 17 inserti
Add a way for callers to request that extra headers be included when
making http requests.
Signed-off-by: Brandon Williams
---
http.c | 8
http.h | 7 +++
2 files changed, 15 insertions(+)
diff --git a/http.c b/http.c
index 5977712712..e1757d62b2 100644
--- a/http.c
+++ b/http.c
Instead of always sending the Git-Protocol header with the configured
version with every http request, explicitly send it when discovering
refs and then only send it on subsequent http requests if the server
understood the version requested.
Signed-off-by: Brandon Williams
---
http.c
Make a copy of the service name being requested instead of relying on
the buffer pointed to by the passed in 'const char *' to remain
unchanged.
Currently, all service names are string constants, but a subsequent
patch will introduce service names from external sources.
Signed-off-b
When an http info/refs request is made, requesting that protocol v2 be
used, don't send a "# service" line since this line is not part of the
v2 spec.
Signed-off-by: Brandon Williams
---
http-backend.c | 8 ++--
remote-curl.c | 3 +++
2 files changed, 9 insertions(+), 2 del
as a pass through to convert requests to http.
Signed-off-by: Brandon Williams
---
remote-curl.c | 207 -
t/t5702-protocol-v2.sh | 45 +
2 files changed, 251 insertions(+), 1 deletion(-)
diff --git a/remote-curl.c b/remote-curl.c
index
27;receive-pack' endpoint and fall back to
using v0, but when push v2 is rolled out to servers, the 'receive-pack'
endpoint will start responding using v2. So we don't want to get into a
state where a client is requesting to push with v2 before they actually
know how to pus
ful in the next patch where we can have centralized
logic which determines if we need to request a different protocol
version than what the user has configured.
Signed-off-by: Brandon Williams
---
connect.c | 27 +++
1 file changed, 15 insertions(+), 12 deletions(-)
di
was removed the parameter
was no longer necessary but wasn't removed. Clean up 'recvline_fh()'
parameter list by removing the 'name' parameter.
Signed-off-by: Brandon Williams
---
transport-helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tra
Store the protocol version the server responded with when performing
discovery. This will be used in a future patch to either change the
'Git-Protocol' header sent in subsequent requests or to determine if a
client needs to fallback to using a different protocol version.
Signed-off-b
27;receive-pack' endpoint and fall back to
using v0, but when push v2 is rolled out to servers, the 'receive-pack'
endpoint will start responding using v2. So we don't want to get into a
state where a client is requesting to push with v2 before they actually
know how to pus
Introduce the 'fetch' server command.
Signed-off-by: Brandon Williams
---
Documentation/technical/protocol-v2.txt | 127 +++
serve.c | 2 +
t/t5701-git-serve.sh| 1 +
upload-pack.c
fs it sends based on the sent prefixes. This list will be ignored
when not using protocol v2.
Signed-off-by: Brandon Williams
---
transport-helper.c | 5 +++--
transport-internal.h | 11 ++-
transport.c | 18 +++---
3 files changed, 24 insertions(+), 10 deleti
ned-off-by: Brandon Williams
---
transport.c | 35 ++-
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/transport.c b/transport.c
index 63c3dbab94..2378dcb38c 100644
--- a/transport.c
+++ b/transport.c
@@ -118,6 +118,7 @@ struct git_transport_data {
Teach transport_get_remote_refs() to accept a list of ref prefixes,
which will be sent to the server for use in filtering when using
protocol v2. (This list will be ignored when not using protocol v2.)
Signed-off-by: Brandon Williams
---
builtin/clone.c | 2 +-
builtin/fetch.c | 4
Factor out the logic for processing shallow, deepen, deepen_since, and
deepen_not lines into their own functions to simplify the
'receive_needs()' function in addition to making it easier to reuse some
of this logic when implementing protocol_v2.
Signed-off-by: Brandon Williams
-
ned-off-by: Brandon Williams
---
builtin/fetch-pack.c | 16 +++-
builtin/send-pack.c | 17 +++--
connect.c| 27 ++-
connect.h| 3 +++
remote-curl.c| 20 ++--
remote.h | 5 +++--
transport.c
Remove code duplication and use the existing 'get_refs_via_connect()'
function to retrieve a remote's heads in 'fetch_refs_via_pack()' and
'git_transport_push()'.
Signed-off-by: Brandon Williams
---
transport.c | 18 --
1 file changed, 4 i
On 03/14, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > Introduce git-serve, the base server for protocol version 2.
> > ...
> > Documentation/Makefile | 1 +
> > Documentation/technical/protocol-v2.txt | 174 +
>
&
On 03/14, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > +/*
> > + * Read a packetized line into a buffer like the 'packet_read()' function
> > but
> > + * returns an 'enum packet_read_status' which indicates the status of the
_status'
type. This allows for easily identifying between special and normal
packets as well as errors. It also enables easily adding a new special
packet in the future.
Signed-off-by: Brandon Williams
---
pkt-line.c | 51 +--
pkt-line.h | 16
Fixed the protocol-v2.txt technical document so that it builds when
running "make doc".
Brandon Williams (35):
pkt-line: introduce packet_read_with_status
pkt-line: allow peeking a packet line without consuming it
pkt-line: add delim packet support
upload-pack: convert to
st line
without consuming the first ref sent in the protocol_v0 case so that the
protocol version the server is speaking can be determined outside of
'get_remote_heads()' in a future patch.
Signed-off-by: Brandon Williams
---
connect.c | 173 ++-
enables a caller to be able to peek a single line at a time
using 'packet_reader_peek()' and having a caller consume a line by
calling 'packet_reader_read()'.
Signed-off-by: Brandon Williams
---
pkt-line.c | 50 +
Remove code duplication and use the existing 'get_refs_via_connect()'
function to retrieve a remote's heads in 'fetch_refs_via_pack()' and
'git_transport_push()'.
Signed-off-by: Brandon Williams
---
transport.c | 18 --
1 file changed, 4 i
ned-off-by: Brandon Williams
---
builtin/fetch-pack.c | 16 +++-
builtin/send-pack.c | 17 +++--
connect.c| 27 ++-
connect.h| 3 +++
remote-curl.c| 20 ++--
remote.h | 5 +++--
transport.c
eserved to indicate the end of a response.
Documentation for how this packet will be used in protocol v2 will
included in a future patch.
Signed-off-by: Brandon Williams
---
pkt-line.c | 16
pkt-line.h | 3 +++
2 files changed, 19 insertions(+)
diff --git a/pkt-line.c b/pkt-li
701 - 800 of 2393 matches
Mail list logo