Re: git patch format for rename

2016-07-06 Thread Stefan Beller
On Wed, Jul 6, 2016 at 9:00 AM, nadya.zabrod...@jetbrains.com wrote: > Hi, > > could you please explain to me why ‘rename from & rename to’ information is > added to git patch? > Is there any reason why git can’t recognize and apply rename-change which > looks like this: > > diff --git a/be

[PATCHv3 0/4] Push options in C Git

2016-07-06 Thread Stefan Beller
d :( https://gerrit.googlesource.com/gerrit/+/refs/heads/master/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java#1141 [2] https://git.eclipse.org/r/#/c/74570/ [3] https://github.com/stefanbeller/git/tree/pushoptions Stefan Beller (4): push options: {pre,post}

[PATCH 3/4] push: accept push options

2016-07-06 Thread Stefan Beller
This implements everything that is required on the client side to make use of push options from the porcelain push command. Signed-off-by: Stefan Beller --- Documentation/git-push.txt | 8 +++- builtin/push.c | 16 +--- send-pack.c| 30

[PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-06 Thread Stefan Beller
ption, the server capability can be disabled via the `receive.advertisePushOptions` config variable. While documenting this, fix a nit in the `receive.advertiseAtomic` wording. Signed-off-by: Stefan Beller --- Documentation/config.txt | 7 ++- Documentation/tech

[PATCH 4/4] add a test for push options

2016-07-06 Thread Stefan Beller
The functions `mk_repo_pair` as well as `test_refs` are borrowed from t5543-atomic-push, with additional hooks installed. Signed-off-by: Stefan Beller --- t/t5544-push-options.sh | 101 1 file changed, 101 insertions(+) create mode 100755 t

[PATCH 1/4] push options: {pre,post}-receive hook learns about push options

2016-07-06 Thread Stefan Beller
a data item larger than a single 64K pkt-line), which would > easily just work with something like HTTP POSTs. So to keep a way open in the future to deal with large pay loads, the size is restricted for now. [1] 'Shellshock' https://lwn.net/Articles/614218/ Signe

Re: bug: depth 1 and recursive update of submodules broke in 2.9.0

2016-07-07 Thread Stefan Beller
See the discussion and bug fix at http://thread.gmane.org/gmane.comp.version-control.git/297687/focus=297719 This is a known regression in 2.9.0 and the fix is in the master branch already. (I think Junio will also roll it into 2.9.1) -- To unsubscribe from this list: send the line "unsubscribe gi

Re: [RFC] Questions for "Git User's Survey 2016"

2016-07-07 Thread Stefan Beller
On Thu, Jul 7, 2016 at 8:03 AM, Jakub Narębski wrote: > I am thinking about returning to doing the Git User's Survey, and > I'd like to ask for feedback. Thanks for doing the survey! > > What I'd like to see is how people use Git, which features do they > use and which tools (maybe there is some

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-07 Thread Stefan Beller
On Thu, Jul 7, 2016 at 1:37 PM, Junio C Hamano wrote: > >> @@ -207,6 +214,8 @@ static void show_ref(const char *path, const unsigned >> char *sha1) >> "report-status delete-refs side-band-64k quiet"); >> if (advertise_atomic_push) >>

Re: [PATCH 1/4] push options: {pre,post}-receive hook learns about push options

2016-07-07 Thread Stefan Beller
On Thu, Jul 7, 2016 at 1:20 PM, Junio C Hamano wrote: > > What is suboptimal about the structure of the series is that we > won't bisect down to any of the potential bugs in the above code > even if we ever see any bug in the future. > It also does not hint > where push_options is expected to be r

Re: [PATCH 4/4] add a test for push options

2016-07-07 Thread Stefan Beller
On Thu, Jul 7, 2016 at 1:01 PM, Junio C Hamano wrote: > On Thu, Jul 7, 2016 at 12:51 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> The functions `mk_repo_pair` as well as `test_refs` are borrowed from >>> t5543-atomic-push, with additional hooks

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-07 Thread Stefan Beller
On Thu, Jul 7, 2016 at 2:56 PM, Jeff King wrote: > On Thu, Jul 07, 2016 at 02:41:37PM -0700, Stefan Beller wrote: > >> >> + /* NEEDSWORK: expose the limitations to be configurable. */ >> >> + int max_options = 32; >> >> + >> >> +

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-08 Thread Stefan Beller
On Fri, Jul 8, 2016 at 11:39 AM, Junio C Hamano wrote: > Jonathan Nieder writes: > >> Hi, >> >> Junio C Hamano wrote: >>> Stefan Beller writes: >> >>>>> More importantly, if we plan to make this configurable and not make >>>&g

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-08 Thread Stefan Beller
On Fri, Jul 8, 2016 at 2:46 PM, Jeff King wrote: > On Fri, Jul 08, 2016 at 11:57:20AM -0700, Stefan Beller wrote: > >> >> Sorry to butt into the conversation late, but: I am not yet convinced. >> >> >> >> Is the idea that if the push options were very la

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-08 Thread Stefan Beller
On Fri, Jul 8, 2016 at 3:21 PM, Jeff King wrote: > On Fri, Jul 08, 2016 at 03:17:13PM -0700, Stefan Beller wrote: > >> >If people are seeing these in >> > routine use, then the limits are set too low, and this should happen >> > roughly as often as a BUG asse

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-08 Thread Stefan Beller
On Fri, Jul 8, 2016 at 3:35 PM, Jeff King wrote: > > Yes. I haven't been following the intermediate discussion and patches, > but I don't see anything wrong with the general design above. I think > you do need to use rp_error() to get the die message to the client for > non-ssh cases, though (that

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-08 Thread Stefan Beller
On Fri, Jul 8, 2016 at 3:46 PM, Jeff King wrote: > Sorry, I meant converting die() into: > > rp_error(...); > die(...); > > possibly via an rp_die() helper. The existing rp_error() cases would > remain untouched. Oh I see! That makes a lot of sense. -- To unsubscribe from this list: send the

Re: [PATCH 3/4] push: accept push options

2016-07-08 Thread Stefan Beller
On Thu, Jul 7, 2016 at 1:52 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +-L:: >> +--push-option:: >> + Transmit the given string to the server, which passes them to >> + the pre-receive as well as the post-receive hook. Only C strings >&g

[PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-08 Thread Stefan Beller
ption, the server capability can be disabled via the `receive.advertisePushOptions` config variable. While documenting this, fix a nit in the `receive.advertiseAtomic` wording. Signed-off-by: Stefan Beller --- Documentation/config.txt | 9 ++- Documentation/tech

[PATCHv4 0/4] Push options

2016-07-08 Thread Stefan Beller
aster \ --push-option draft \ --push-option topic=example \ --push-option cc=jon@example.org (with a short form that is even easier to type, but this is is more intuitive already) This is a patch series to Git core, which is developed at the same time as a change i

[PATCH 4/4] add a test for push options

2016-07-08 Thread Stefan Beller
The functions `mk_repo_pair` as well as `test_refs` are borrowed from t5543-atomic-push, with additional hooks installed. Signed-off-by: Stefan Beller --- t/t5545-push-options.sh | 101 1 file changed, 101 insertions(+) create mode 100755 t

[PATCH 1/4] push options: {pre,post}-receive hook learns about push options

2016-07-08 Thread Stefan Beller
a data item larger than a single 64K pkt-line), which would > easily just work with something like HTTP POSTs. So to keep a way open in the future to deal with large pay loads, the size is restricted for now. [1] 'Shellshock' https://lwn.net/Articles/614218/ Signed-off-by:

[PATCH 3/4] push: accept push options

2016-07-08 Thread Stefan Beller
This implements everything that is required on the client side to make use of push options from the porcelain push command. Signed-off-by: Stefan Beller --- Documentation/git-push.txt | 8 +++- builtin/push.c | 21 ++--- send-pack.c| 27

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-10 Thread Stefan Beller
On Sun, Jul 10, 2016 at 10:06 AM, Shawn Pearce wrote: > On Fri, Jul 8, 2016 at 5:31 PM, Stefan Beller wrote: >> + >> + /* NEEDSWORK: expose the limitations to be configurable. */ >> + int max_options = 32; >> + >> + /* >> +*

verbose fetches not overly verbose

2016-07-11 Thread Stefan Beller
$ git clone https://github.com/gitster/git tmpgit2 -v -v -v Cloning into 'tmpgit2'... Server supports multi_ack_detailed Server supports no-done Server supports side-band-64k Server supports ofs-delta Server version is git/2:2.6.5~dgit-checksu

Re: Submodule's .git file contains absolute path when created using 'git clone --recursive'

2016-07-12 Thread Stefan Beller
On Tue, Jul 12, 2016 at 4:22 AM, Ricardo Sánchez-Sáez wrote: > Stefan Beller google.com> writes: > > Hi, > > sorry to awake an old thread. Has this been fixed? In which git version? > It's hitting me on git version 2.7.4 (Apple Git-66) (default git client on >

Re: What's cooking in git.git (Jul 2016, #05; Wed, 13)

2016-07-13 Thread Stefan Beller
> * sb/push-options (2016-07-12) 5 commits > - add a test for push options > - push: accept push options > - SQUASH??? Squash? I do not find a squashable commit in what you pushed, do you intend to squash the first 2 patches instead? > - receive-pack: implement advertising and receiving push

Re: What's cooking in git.git (Jul 2016, #05; Wed, 13)

2016-07-13 Thread Stefan Beller
On Wed, Jul 13, 2016 at 10:32 AM, Junio C Hamano wrote: > Stefan Beller writes: > >>> * sb/push-options (2016-07-12) 5 commits >>> - add a test for push options >>> - push: accept push options >>> - SQUASH??? >> >> Squash? I do not find a

Re: Server-side preventing some files from being overwritten

2016-07-14 Thread Stefan Beller
On Thu, Jul 14, 2016 at 8:31 AM, Thorsten Glaser wrote: > Hi *, > > is there a way, for example with some sort of pre-receive hook, > to prevent some files from being overwritten by a push? pre-receive hooks are a thing! pre-receive This hook is invoked by git-receive-pack on the remote

[PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-14 Thread Stefan Beller
ption, the server capability can be disabled via the `receive.advertisePushOptions` config variable. While documenting this, fix a nit in the `receive.advertiseAtomic` wording. Signed-off-by: Stefan Beller --- Documentation/config.txt | 9 +++- Documentation/tech

[PATCH 3/4] push: accept push options

2016-07-14 Thread Stefan Beller
This implements everything that is required on the client side to make use of push options from the porcelain push command. Signed-off-by: Stefan Beller --- Documentation/git-push.txt | 8 +++- builtin/push.c | 21 ++--- send-pack.c| 27

[PATCH 4/4] add a test for push options

2016-07-14 Thread Stefan Beller
The functions `mk_repo_pair` as well as `test_refs` are borrowed from t5543-atomic-push, with additional hooks installed. Signed-off-by: Stefan Beller --- t/t5545-push-options.sh | 103 1 file changed, 103 insertions(+) create mode 100755 t

[PATCH 1/4] push options: {pre,post}-receive hook learns about push options

2016-07-14 Thread Stefan Beller
a data item larger than a single 64K pkt-line), which would > easily just work with something like HTTP POSTs. So to keep a way open in the future to deal with large pay loads, the size is restricted for now. [1] 'Shellshock' https://lwn.net/Articles/614218/ Signed-off-by:

[PATCHv5 0/4] Push options

2016-07-14 Thread Stefan Beller
shing to Gerrit you can already attach some of this information by adding a '%' followed by the parameter to the ref, i.e. when interacting with Gerrit it is possible to do things like[1]: git push origin HEAD:refs/for/master%draft%topic=example%cc=jon@example.org

Re: [PATCHv5 0/4] Push options

2016-07-14 Thread Stefan Beller
On Thu, Jul 14, 2016 at 11:41 AM, Jeff King wrote: > On Thu, Jul 14, 2016 at 10:39:16AM -0700, Stefan Beller wrote: > >> Jeff wrote: >> > Junio wrote: >> >> I think those extra knobs can come later. If we are not going to >> >> limit with max_opt

Re: Server-side preventing some files from being overwritten

2016-07-14 Thread Stefan Beller
On Thu, Jul 14, 2016 at 11:44 AM, Junio C Hamano wrote: > On Thu, Jul 14, 2016 at 11:27 AM, Junio C Hamano wrote: >> Thorsten Glaser writes: >> >>> if test x"0" != x"$(comm -23z \ >>> <(git ls-tree -r -z "$old" "$subdir" | sort -z) \ >>> <(git ls-tree -r -z "$new" "$sub

Re: [PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-14 Thread Stefan Beller
> packet_read_line() calls packet_read_line_generic() that calls > packet_read() with the fixed packet_buffer[] that is sized to be > LARGE_PACKET_MAX. > > Can this check even trigger? I thought when len == LARGE_PACKET_MAX, this could trigger. Though on inspection of packet_read, we already reje

Re: [PATCH] diff: document diff-filter exclusion

2016-07-14 Thread Stefan Beller
On Thu, Jul 14, 2016 at 12:20 PM, Junio C Hamano wrote: > In v1.8.5 days, 7f2ea5f0 (diff: allow lowercase letter to specify > what change class to exclude, 2013-07-17) taught the "--diff-filter" > mechanism to take lowercase letters as exclusion, but we forgot to > document it. > > Signed-off-by:

[PATCHv6 2/4] receive-pack: implement advertising and receiving push options

2016-07-14 Thread Stefan Beller
ption, the server capability can be disabled via the `receive.advertisePushOptions` config variable. While documenting this, fix a nit in the `receive.advertiseAtomic` wording. Signed-off-by: Stefan Beller --- Junio, please replace v5 2/4 with this patch (I only resend this single patch as t

Re: [PATCHv6 2/4] receive-pack: implement advertising and receiving push options

2016-07-14 Thread Stefan Beller
On Thu, Jul 14, 2016 at 2:35 PM, Jeff King wrote: > On Thu, Jul 14, 2016 at 02:24:54PM -0700, Stefan Beller wrote: > >> # interdiff to v5: >> [...giant deletion...] > > Much nicer. :) > >> +static struct string_list *read_push_options(void) >> +{ >> +

[PATCHv7 0/4] Push options

2016-07-14 Thread Stefan Beller
imagine that you push to a magical refs/heads/master with a push option "create-change". * When pushing to Gerrit you can already attach some of this information by adding a '%' followed by the parameter to the ref, i.e. when interacting with Gerrit it is possible to do th

[PATCH 1/4] push options: {pre,post}-receive hook learns about push options

2016-07-14 Thread Stefan Beller
a data item larger than a single 64K pkt-line), which would > easily just work with something like HTTP POSTs. So to keep a way open in the future to deal with large pay loads, the size is restricted for now. [1] 'Shellshock' https://lwn.net/Articles/614218/ Signed-off-by:

[PATCH 4/4] add a test for push options

2016-07-14 Thread Stefan Beller
The functions `mk_repo_pair` as well as `test_refs` are borrowed from t5543-atomic-push, with additional hooks installed. Signed-off-by: Stefan Beller --- t/t5545-push-options.sh | 103 1 file changed, 103 insertions(+) create mode 100755 t

[PATCH 3/4] push: accept push options

2016-07-14 Thread Stefan Beller
This implements everything that is required on the client side to make use of push options from the porcelain push command. Signed-off-by: Stefan Beller --- Documentation/git-push.txt | 8 +++- builtin/push.c | 21 ++--- send-pack.c| 27

[PATCH 2/4] receive-pack: implement advertising and receiving push options

2016-07-14 Thread Stefan Beller
ption, the server capability can be disabled via the `receive.advertisePushOptions` config variable. While documenting this, fix a nit in the `receive.advertiseAtomic` wording. Signed-off-by: Stefan Beller --- Documentation/config.txt | 9 +-- Documentation/tech

Re: [PATCH 1/4] push options: {pre,post}-receive hook learns about push options

2016-07-14 Thread Stefan Beller
On Thu, Jul 14, 2016 at 3:46 PM, Jeff King wrote: > On Thu, Jul 14, 2016 at 02:49:45PM -0700, Stefan Beller wrote: > >> We limit the push options for now >> * to not exceed an arbitrary count, and >> * to not exceed an arbitrary size. >> >> This serves two pur

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-15 Thread Stefan Beller
On Fri, Jul 15, 2016 at 3:43 AM, Jeff King wrote: > > Signed-off-by: Jeff King Read-entirely-by Stefan ;) Thanks! > @@ -319,10 +331,60 @@ static void rp_error(const char *err, ...) > static int copy_to_sideband(int in, int out, void *arg) > { > char data[128]; While looking at this

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-18 Thread Stefan Beller
On Sat, Jul 16, 2016 at 12:56 AM, Jeff King wrote: >> > + if (use_keepalive == KEEPALIVE_AFTER_NUL && >> > !keepalive_active) { >> > + const char *p = memchr(data, '\0', sz); >> > + if (p) { >> > + /* >> > +

Re: [PATCH 12/12] receive-pack: send keepalives during quiet periods

2016-07-19 Thread Stefan Beller
On Tue, Jul 19, 2016 at 3:07 AM, Jeff King wrote: > On Mon, Jul 18, 2016 at 10:28:25PM -0700, Stefan Beller wrote: > >> On Sat, Jul 16, 2016 at 12:56 AM, Jeff King wrote: >> >> > + if (use_keepalive == KEEPALIVE_AFTER_NUL &a

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Stefan Beller
On Mon, Jul 18, 2016 at 3:21 PM, Jonathan Tan wrote: > When updating large repositories, the LARGE_FLUSH limit (that is, the > limit at which the window growth strategy switches from exponential to > linear) is reached quite quickly. Use a conservative exponential growth > strategy when that limit

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Stefan Beller
On Tue, Jul 19, 2016 at 12:03 PM, Jonathan Tan wrote: > On Tue, Jul 19, 2016 at 9:46 AM, Stefan Beller wrote: >> Care to elaborate on why you choose 11/10 as growth factor? >> >> (As someone who has a tick in micro optimizing: >> 9/8 is roughly the same exponent,

Re: [PATCH] submodule-config: use explicit empty string instead of strbuf in config_from()

2016-07-19 Thread Stefan Beller
On Tue, Jul 19, 2016 at 12:15 PM, Junio C Hamano wrote: > René Scharfe writes: > >> Use a string constant instead of an empty strbuf to shorten the code >> and make it easier to read. >> >> Signed-off-by: Rene Scharfe >> --- >> ... unless someone can come up with a suitable non-empty string to f

[PATCH] Documentation, git submodule: Note about --reference

2016-07-19 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Is it too obvious? I was approached off list and this was only obvious after some discussion, so I think it is a valid warning. On the other hand this might show that we want to get worktree working with submodules. Documentation/git-submodule.txt | 4

Re: Git and SHA-1 security (again)

2016-07-20 Thread Stefan Beller
On Wed, Jul 20, 2016 at 7:44 AM, Duy Nguyen wrote: > On Wed, Jul 20, 2016 at 2:28 PM, Johannes Schindelin > wrote: >> But that strategy *still* ignores the distributed nature of Git. Just >> because *you* make that merge at a certain point does not necessarily mean >> that I make it at that point

Re: [PATCH v4 2/4] submodule: update core.worktree using git-config

2016-07-20 Thread Stefan Beller
On Wed, Jul 20, 2016 at 10:24 AM, Nguyễn Thái Ngọc Duy wrote: > To access a separate repository, the first step should be read its > config file to determine if this repository layout is supported or > not, or if we understand all repo extensions, of it is a linked > worktree. Only then should kno

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-20 Thread Stefan Beller
On Wed, Jul 20, 2016 at 10:24 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > Documentation/git-worktree.txt | 8 > git-submodule.sh | 8 > 2 files changed, 12 insertions(+), 4 deletions(-) > > diff --git a/Documentation/git-worktree.

[PATCH] submodule: do no re-read name in shell script

2016-07-20 Thread Stefan Beller
Instead of making another call to a submodule helper (name), just propagate the value when we know it (in the update-clone helper) already. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 4 ++-- git-submodule.sh| 3 +-- 2 files changed, 3 insertions(+), 4 deletions

[PATCH] submodule--helper: correct index computation

2016-07-20 Thread Stefan Beller
owever is really easy, when the url of one submodule is bogus, so add a test for that. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 4 +++- t/t7406-submodule-update.sh | 16 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/builtin/submodule--helper.c

Re: [PATCH] submodule: do no re-read name in shell script

2016-07-20 Thread Stefan Beller
On Wed, Jul 20, 2016 at 6:00 PM, Jonathan Nieder wrote: >> - needs_cloning, ce->name); >> + needs_cloning, sub->name, sub->path); > > Are there any restrictions on what characters a submodule name can > contain? Does this need e.g. to be quoted with sq_quo

Re: [RFC/PATCH] status: suggest 'git merge --abort' when appropriate

2016-07-21 Thread Stefan Beller
On Thu, Jul 21, 2016 at 5:58 AM, Matthieu Moy wrote: > We already suggest 'git rebase --abort' during a conflicted rebase. > Similarly, suggest 'git merge --abort' during conflict resolution on > 'git merge'. I think this is a good addition. Thanks, Stefan -- To unsubscribe from this list: send

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-21 Thread Stefan Beller
FYI: I started working on a series that decouples existence of a submodule from the URL as a preparatory series to this one. Then we can have the same URL in all working trees, but the existence is configured differently for each working tree. I'll try to send it out tomorrow. Thanks, Stefan -- T

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-22 Thread Stefan Beller
On Fri, Jul 22, 2016 at 12:32 AM, Jens Lehmann wrote: > Am 21.07.2016 um 01:22 schrieb Stefan Beller: >> >> So maybe we want to drop that series and first talk about a migration plan >> from >> the current state to a world where we have the existence depending not >

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-22 Thread Stefan Beller
On Fri, Jul 22, 2016 at 10:09 AM, Duy Nguyen wrote: > > I just quickly glanced through the rest of this mail because, as a > submodule ignorant, it's just mumbo jumbo to me. But what I see here > is, there may be problems if we choose to share some submodule info, > but I haven't seen any good thi

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-22 Thread Stefan Beller
On Fri, Jul 22, 2016 at 9:55 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> From a users POV there are: >> * non existent submodules (no gitlink recorded, no config set, >> no repo in place) >> * not initialized submodules (gitlink is recorded, no config

Re: [PATCH 1/2] git-submodule: forward exit code of git-submodule--helper more faithfully

2016-07-22 Thread Stefan Beller
On Fri, Jul 22, 2016 at 12:14 PM, Johannes Sixt wrote: > git-submodule--helper is invoked as the upstream of a pipe in several > places. Usually, the failure of a program in this position is not > detected by the shell. For this reason, the code inserts a token in the > output stream when git-subm

Re: [PATCH 2/2] submodule-helper: fix indexing in clone retry error reporting path

2016-07-22 Thread Stefan Beller
On Fri, Jul 22, 2016 at 12:15 PM, Johannes Sixt wrote: > 'git submodule--helper update-clone' has logic to retry failed clones > a second time. For this purpose, there is a list of submodules to clone, > and a second list that is filled with the submodules to retry. Within > these lists, the submo

Re: [PATCH 2/2] submodule-helper: fix indexing in clone retry error reporting path

2016-07-22 Thread Stefan Beller
On Fri, Jul 22, 2016 at 12:39 PM, Junio C Hamano wrote: > Johannes Sixt writes: > >> 'git submodule--helper update-clone' has logic to retry failed clones >> a second time. For this purpose, there is a list of submodules to clone, >> and a second list that is filled with the submodules to retry.

Re: [PATCH 2/2] submodule-helper: fix indexing in clone retry error reporting path

2016-07-22 Thread Stefan Beller
On Fri, Jul 22, 2016 at 12:52 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> The approach to tests is different though. I like yours better than mine, >> as it doesn't add more tests, but strengthens existing tests. > > So... are you retract

[PATCH] Documentation: pack-protocol correct NAK response

2016-07-22 Thread Stefan Beller
wrong. Signed-off-by: Stefan Beller --- Documentation/technical/pack-protocol.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt index 8b36343..d40ab65 100644 --- a/Documentation/technical

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-25 Thread Stefan Beller
On Fri, Jul 22, 2016 at 10:42 AM, Duy Nguyen wrote: > On Fri, Jul 22, 2016 at 7:25 PM, Stefan Beller wrote: >> On Fri, Jul 22, 2016 at 10:09 AM, Duy Nguyen wrote: >>> >>> I just quickly glanced through the rest of this mail because, as a >>> submodule ignora

Re: [PATCH] Documentation, git submodule: Note about --reference

2016-07-25 Thread Stefan Beller
On Mon, Jul 25, 2016 at 5:43 PM, Junio C Hamano wrote: > On Mon, Jul 25, 2016 at 5:38 PM, Stefan Beller wrote: >> On Tue, Jul 19, 2016 at 4:45 PM, Stefan Beller wrote: >>> Signed-off-by: Stefan Beller >>> --- >> >> Any comment here? > > I person

[PATCH]submodule deinit: remove outdated comment

2016-07-25 Thread Stefan Beller
Signed-off-by: Stefan Beller --- This is logically part of origin/sb/submodule-deinit-all, but this change failed to be there on time. As I am touching code in the near vincinity, I noticed. I do not include this in that series to come as I want to keep that series focused, so I

Re: [PATCH] Documentation, git submodule: Note about --reference

2016-07-25 Thread Stefan Beller
On Tue, Jul 19, 2016 at 4:45 PM, Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- Any comment here? > > Is it too obvious? > I was approached off list and this was only obvious after some discussion, > so I think it is a valid warning. > > On the other hand

Re: [PATCH v4 1/4] worktree: add per-worktree config files

2016-07-25 Thread Stefan Beller
On Wed, Jul 20, 2016 at 10:24 AM, Nguyễn Thái Ngọc Duy wrote: > A new repo extension is added, worktreeConfig. When it is present: > > - Repository config reading by default includes $GIT_DIR/config _and_ >$GIT_DIR/config.worktree. "config" file remains shared in multiple >worktree setup.

Re: [PATCH 1/2] fix passing a name for config from submodules

2016-07-26 Thread Stefan Beller
On Tue, Jul 26, 2016 at 2:49 AM, Heiko Voigt wrote: Thanks for continuing on the submodule cache! > In commit 959b5455 we implemented the initial version of the submodule Usually we refer to the commit by a triple of "abbrev. sha1 (date, subject). See d201a1ecd (2015-05-21, test_bitmap_walk: fr

Re: [PATCH 2/2] submodule-config: combine error checking if clauses

2016-07-26 Thread Stefan Beller
On Tue, Jul 26, 2016 at 2:49 AM, Heiko Voigt wrote: > So we have less return handling code. > > Signed-off-by: Heiko Voigt Thanks, Stefan -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.ke

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-26 Thread Stefan Beller
On Tue, Jul 26, 2016 at 10:20 AM, Duy Nguyen wrote: > On Tue, Jul 26, 2016 at 1:25 AM, Stefan Beller wrote: >> So what is the design philosophy in worktrees? How much independence does >> one working tree have? > > git-worktree started out as an alternative for git-stash: h

Re: git cherry-pick conflict error message is deceptive when cherry-picking multiple commits

2016-07-26 Thread Stefan Beller
> Would it be possible to expand the hint message to tell users to run > 'git cherry-pick --continue' Instead of expanding I'd go for replacing? I'd say the user is tempted for 2 choices, a) aborting (for various reasons) b) fix and continue. So we'd want to point out the way for those two ways

Re: [PATCH v4 3/4] submodule: support running in multiple worktree setup

2016-07-27 Thread Stefan Beller
Jakub wrote: > I think the problem with `--reference` is that it does not > setup backreferences to prevent gc removing borrowed objects; > which is a hard problem to solve, except for limited cases... > like git-worktree. Right. And instead of solving the reference problem, I'd rather solve the w

Re: [PATCHv1] completion: add option '--recurse-submodules' to 'git clone'

2016-07-27 Thread Stefan Beller
On Wed, Jul 27, 2016 at 10:32 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >>> I noticed --recurse-submodules was missing from the bash completion. This >>> adds >>> it. I went for '--recurse-submodules' instead of '--recursive' as I seem to >>> recall the former being agreed upon as the

Re: Find a topic branch containing a commit

2016-07-27 Thread Stefan Beller
On Wed, Jul 27, 2016 at 10:42 AM, Duy Nguyen wrote: > Before I start doing anything silly because I don't know it can > already be done without waving my C wand like a mad man... > > I often do this: find a commit of interest, the commit itself is not > enough so I need a full patch series to figu

Re: Find a topic branch containing a commit

2016-07-27 Thread Stefan Beller
On Wed, Jul 27, 2016 at 10:50 AM, Stefan Beller wrote: >> >> PS. Sometimes I wish we could optionally save cover letter in the >> merge commit. Sometimes the "big plan" is hard to see by reading >> individual commit messages. >> -- I had this wish,

Re: [PATCH] document how to reference previous commits

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 8:38 AM, Junio C Hamano wrote: > Heiko Voigt writes: > >> @@ -121,6 +121,11 @@ its behaviour. Try to make sure your explanation can >> be understood >> without external resources. Instead of giving a URL to a mailing list >> archive, summarize the relevant points of th

Re: [PATCH 1/3] submodule-config: passing name reference for .gitmodule blobs

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 5:49 AM, Heiko Voigt wrote: > Commit 959b5455 (submodule: implement a config API for lookup of > .gitmodules values, 2015-08-18) implemented the initial version of the > submodule config cache. During development of that initial version we > extracted the function gitmodule

[PATCH 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
roject branch > has the same name as the destination branch of the commit having > gitlinks/.gitmodules file. CC: Avery Pennarun Signed-off-by: Stefan Beller --- git-submodule.sh| 7 +++ t/t7406-submodule-update.sh | 32 +++- 2 files changed,

[PATCH 0/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
The meat is in patch 2 and helps Git and Gerrit work well together. patch 1 looks unrelated but it is not, as when left out the broken test, breaks with patch 2. This is because we add more commits in the submodule. Thanks, Stefan Stefan Beller (2): t7406: correct depth test in shallow test

[PATCH 1/2] t7406: correct depth test in shallow test

2016-07-28 Thread Stefan Beller
We used to ask for 3 changes and tested for having 1, so the test seems broken. Correct the test by using test_line_count that exists in the test suite. Signed-off-by: Stefan Beller --- t/t7406-submodule-update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t7406

[PATCHv2 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
roject branch > has the same name as the destination branch of the commit having > gitlinks/.gitmodules file. CC: Avery Pennarun Signed-off-by: Stefan Beller --- This comes with another test that I run into while using this code. Please replace patch 2 with this v2. Thanks, S

Re: [PATCH 1/2] t7406: correct depth test in shallow test

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 11:39 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> We used to ask for 3 changes and tested for having 1, so the test >> seems broken. > > I am not sure what to think of "seems broken". When asking for depth 3, I would expect a

Re: [PATCH 1/2] t7406: correct depth test in shallow test

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 11:47 AM, Stefan Beller wrote: > On Thu, Jul 28, 2016 at 11:39 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> We used to ask for 3 changes and tested for having 1, so the test >>> seems broken. >> >> I am not s

Re: [PATCHv2 2/2] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 12:10 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Gerrit has a "superproject subscription" feature[1], that triggers a >> commit in a superproject that is subscribed to its submodules. >> Conceptually this Gerrit feature c

[PATCHv3 4/7] submodule--helper: fix usage string for relative-path

2016-07-28 Thread Stefan Beller
Internally we call the underscore version of relative_path, but externally we present an API with no underscores. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule

[PATCHv3 0/7] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
review of the first patches, Stefan Stefan Beller (7): t7406: future proof tests with hard coded depth submodule update: respect depth in subsequent fetches submodule update: narrow scope of local variable submodule--helper: fix usage string for relative-path submodule-config: keep configured

[PATCHv3 1/7] t7406: future proof tests with hard coded depth

2016-07-28 Thread Stefan Beller
The prior hard coded depth was chosen to be exactly the length from the recorded gitlink to the tip of the remote, so if you add more commits to the remote before, this test will not test its intention any more. Signed-off-by: Stefan Beller --- t/t7406-submodule-update.sh | 19

[PATCHv3 2/7] submodule update: respect depth in subsequent fetches

2016-07-28 Thread Stefan Beller
When depth is given the user may have a reasonable expectation that any remote operation is using the given depth. Add a test to demonstrate we still get the desired sha1 even if the depth is too short to include the actual commit. Signed-off-by: Stefan Beller --- git-submodule.sh

[PATCHv3 6/7] submodule--helper: add remote-branch helper

2016-07-28 Thread Stefan Beller
In a later patch we want to enhance the logic for the branch selection. Rewrite the current logic to be in C, so we can directly use C when we enhance the logic. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 28 +++- git-submodule.sh| 2

[PATCHv3 3/7] submodule update: narrow scope of local variable

2016-07-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index 174f4ea..0d4021f 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -591,7 +591,6 @@ cmd_update() name=$(git

[PATCHv3 5/7] submodule-config: keep configured branch around

2016-07-28 Thread Stefan Beller
The branch field will be used in a later patch by `submodule update`. Signed-off-by: Stefan Beller --- submodule-config.c | 11 ++- submodule-config.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/submodule-config.c b/submodule-config.c index 077db40..ebee1e4

[PATCHv3 7/7] submodule update: allow '.' for branch value

2016-07-28 Thread Stefan Beller
w .gitmodules should look like. This teaches Git to deal gracefully with this syntax as well. The redefinition of "." does no harm to existing projects unaware of this change, as "." is an invalid branch name in Git, so we do not expect such projects to exist. Signed-off-by: St

Re: [PATCHv1] completion: add option '--recurse-submodules' to 'git clone'

2016-07-28 Thread Stefan Beller
On Thu, Jul 28, 2016 at 9:22 AM, Junio C Hamano wrote: > Stefan Beller writes: > >>> Anyway, I'll apply the "addition to the completion" patch. >>> >>> Thanks. >> >> Thanks for this patch! >> >> Note: if we ever decide to r

<    1   2   3   4   5   6   7   8   9   10   >