Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:34 PM, Jeff King wrote: > These tests are just trying to show that we allow recursion > up to a certain depth, but not past it. But the counting is > a bit non-intuitive, and rather than test at the edge of the > breakage, we test "OK" cases in the middle of the chain. > L

Re: [PATCH 07/18] link_alt_odb_entry: handle normalize_path errors

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:34 PM, Jeff King wrote: > When we add a new alternate to the list, we try to normalize > out any redundant "..", etc. However, we do not look at the > return value of normalize_path_copy(), and will happily > continue with a path that could not be normalized. Worse, > the

Re: [PATCH 08/18] link_alt_odb_entry: refactor string handling

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:34 PM, Jeff King wrote: > The string handling in link_alt_odb_entry() is mostly an > artifact of the original version, which took the path as a > ptr/len combo, and did not have a NUL-terminated string > until we created one in the alternate_object_database > struct. But

Re: [PATCH 09/18] alternates: provide helper for adding to alternates list

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:35 PM, Jeff King wrote: > The submodule code wants to temporarily add an alternate > object store to our in-memory alt_odb list, but does it > manually. Let's provide a helper so it can reuse the code in > link_alt_odb_entry(). > > While we're adding our new add_to_alterna

Re: [PATCH 10/18] alternates: provide helper for allocating alternate

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:35 PM, Jeff King wrote: > Allocating a struct alternate_object_database is tricky, as > we must over-allocate the buffer to provide scratch space, > and then put in particular '/' and NUL markers. > > Let's encapsulate this in a function so that the complexity > doesn't le

Re: [PATCH 12/18] alternates: use a separate scratch space

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:35 PM, Jeff King wrote: > The alternate_object_database struct uses a single buffer > both for storing the path to the alternate, and as a scratch > buffer for forming object names. This is efficient (since > otherwise we'd end up storing the path twice), but it makes > li

Re: [PATCH 13/18] fill_sha1_file: write "boring" characters

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:35 PM, Jeff King wrote: > This function forms a sha1 as "xx/...", but skips over > the slot for the slash rather than writing it, leaving it to > the caller to do so. It also does not bother to put in a > trailing NUL, even though every caller would want it (we're > fo

Re: [PATCH 15/18] fill_sha1_file: write into a strbuf

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:36 PM, Jeff King wrote: > It's currently the responsibility of the caller to give > fill_sha1_file() enough bytes to write into, leading them to > manually compute the required lengths. Instead, let's just > write into a strbuf so that it's impossible to get this > wrong.

Re: [PATCH 16/18] count-objects: report alternates via verbose mode

2016-10-03 Thread Jacob Keller
\On Mon, Oct 3, 2016 at 1:36 PM, Jeff King wrote: > There's no way to get the list of alternates that git > computes internally; our tests only infer it based on which > objects are available. In addition to testing, knowing this > list may be helpful for somebody debugging their alternates > setu

Re: [PATCH 17/18] sha1_file: always allow relative paths to alternates

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:36 PM, Jeff King wrote: > We recursively expand alternates repositories, so that if A > borrows from B which borrows from C, A can see all objects. > > For the root object database, we allow relative paths, so A > can point to B as "../B/objects". However, we currently do

Re: [PATCH 18/18] alternates: use fspathcmp to detect duplicates

2016-10-03 Thread Jacob Keller
On Mon, Oct 3, 2016 at 1:36 PM, Jeff King wrote: > On a case-insensitive filesystem, we should realize that > "a/objects" and "A/objects" are the same path. We already > use fspathcmp() to check against the main object directory, > but until recently we couldn't use it for comparing against > othe

Re: [PATCH 0/18] alternate object database cleanups

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:41 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 10:47:31PM -0700, Jacob Keller wrote: > >> > The number of patches is a little intimidating, but I tried hard to >> > break the refactoring down into a sequence of obviously-correct steps. >>

Re: [PATCH 04/18] t5613: whitespace/style cleanups

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:47 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 10:52:39PM -0700, Jacob Keller wrote: > >> On Mon, Oct 3, 2016 at 1:34 PM, Jeff King wrote: >> > Our normal test style these days puts the opening quote of >> > the body on the description l

Re: [PATCH 08/18] link_alt_odb_entry: refactor string handling

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:53 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 11:05:42PM -0700, Jacob Keller wrote: > >> This definitely makes reading the following function much easier, >> though the diff is a bit funky. I think the end result is much >> clearer. > >

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 6:48 AM, Jeff King wrote: > On Mon, Oct 03, 2016 at 10:57:48PM -0700, Jacob Keller wrote: > >> > diff --git a/t/t5613-info-alternate.sh b/t/t5613-info-alternate.sh >> > index 7bc1c3c..b393613 100755 >> > --- a/t/t5613-info-alternate.sh >

Re: [PATCH 06/18] t5613: clarify "too deep" recursion tests

2016-10-04 Thread Jacob Keller
On Tue, Oct 4, 2016 at 1:49 PM, Jeff King wrote: > On Tue, Oct 04, 2016 at 01:44:23PM -0700, Jacob Keller wrote: > >> On Tue, Oct 4, 2016 at 6:48 AM, Jeff King wrote: >> > On Mon, Oct 03, 2016 at 10:57:48PM -0700, Jacob Keller wrote: >> > >> >> > dif

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-02 Thread Jacob Keller
On Tue, Feb 2, 2016 at 8:25 PM, Jeff King wrote: > I think the problem is that when git "switches" to working in the > submodule repository, it clears the environment, which includes any "-c" > command switches. This makes sense for some situations, but not for > others. This thread shows a simila

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-03 Thread Jacob Keller
On Tue, Feb 2, 2016 at 8:25 PM, Jeff King wrote: > On Tue, Feb 02, 2016 at 06:13:14PM +0100, Marc Strapetz wrote: > >> git -c credential.helper=helper submodule update --init submodule >> >> does not invoke "helper", but falls back to the default strategies. >> When configuring in ~/.gitconfig: >>

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-06 Thread Jacob Keller
On Wed, Feb 3, 2016 at 3:44 PM, Jacob Keller wrote: > Ok so I am not sure we even really need to use "-c" option in > git-clone considering that we can just use the same flow we do for > setting core.worktree values. I'll propose a patch with you two Cc'ed, > whic

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-07 Thread Jacob Keller
On Sun, Feb 7, 2016 at 5:48 AM, Marc Strapetz wrote: > On 07.02.2016 05:41, Jacob Keller wrote: >> >> On Wed, Feb 3, 2016 at 3:44 PM, Jacob Keller >> wrote: >>> >>> Ok so I am not sure we even really need to use "-c" option in >>> git-

Re: [PATCHv9 4/6] git submodule update: have a dedicated helper for cloning

2016-02-09 Thread Jacob Keller
On Tue, Feb 9, 2016 at 12:54 PM, Stefan Beller wrote: > This introduces a new helper function in git submodule--helper > which takes care of cloning all submodules, which we want to > parallelize eventually. > > Some tests (such as empty URL, update_mode=none) are required in the > helper to make

Re: [PATCHv9 4/6] git submodule update: have a dedicated helper for cloning

2016-02-10 Thread Jacob Keller
On Wed, Feb 10, 2016 at 9:49 AM, Stefan Beller wrote: > Do you mean the separate bug fix patch as proposed by Jonathan or > this patch in general helps your idea of passing settings? > > Thanks, > Stefan This patch in general, I think. I didn't mean to reply to the whole thread. Thanks, Jake --

failed submodule update re-run results in no checked out files?

2016-02-17 Thread Jacob Keller
Hi, I am having an issue currently when using Git with a remote server which has a limited number of ssh connections. The ssh server sometimes closes connections due to too many concurrent connections. I will get the following output from git in this case when performing a submodule update of a s

Re: failed submodule update re-run results in no checked out files?

2016-02-17 Thread Jacob Keller
On Wed, Feb 17, 2016 at 4:15 PM, Stefan Beller wrote: > On Wed, Feb 17, 2016 at 3:54 PM, Jacob Keller wrote: >> Hi, >> >> I am having an issue currently when using Git with a remote server >> which has a limited number of ssh connections. >> >> The ssh ser

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-18 Thread Jacob Keller
On Sun, Feb 7, 2016 at 7:44 PM, Jacob Keller wrote: > On Sun, Feb 7, 2016 at 5:48 AM, Marc Strapetz > wrote: >> On 07.02.2016 05:41, Jacob Keller wrote: >>> >>> On Wed, Feb 3, 2016 at 3:44 PM, Jacob Keller >>> wrote: >>>> >>>>

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-18 Thread Jacob Keller
On Thu, Feb 18, 2016 at 8:30 PM, Jeff King wrote: > On Thu, Feb 18, 2016 at 05:15:54PM -0800, Jacob Keller wrote: > >> I am looking at this more and I am stuck as to how best to provide a >> test case. >> >> I think the problem as stated above is pretty straight fo

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-18 Thread Jacob Keller
On Thu, Feb 18, 2016 at 11:46 PM, Jeff King wrote: > To trigger a credential fetch in actual use, you have to clone over > http. See the credential tests in t5550, for example. > I'll look at these. >> As for how to whitelist config to share with the submodule I am really >> not 100% sure, since

Re: git submodule should honor "-c credential.helper" command line argument

2016-02-19 Thread Jacob Keller
On Fri, Feb 19, 2016 at 9:33 AM, Junio C Hamano wrote: > Jeff King writes: > >> That being said, I am not sure this is the right solution. In the thread >> I linked earlier[1], Jens indicated he would prefer not to blindly share >> config with the submodules, and I think I agree. Or are you propo

Re: [PATCH] submodule: Fetch the direct sha1 first

2016-02-20 Thread Jacob Keller
On Fri, Feb 19, 2016 at 1:13 PM, Junio C Hamano wrote: >> Regarding performance, the first fetch should fail quite fast iff the fetch >> fails and then continue with the normal fetch. In case the first fetch works >> fine getting the exact sha1, the fetch should be faster than a default fetch >> a

Re: [RFC/PATCH 1/1] format-patch: add an option to record base tree info

2016-02-21 Thread Jacob Keller
On Sun, Feb 21, 2016 at 8:19 PM, Junio C Hamano wrote: > If you are OK with accepting a patch application to a tree with the > same blobs the diff was taken from, then the format-patch output > already has all the necessary information. For each "diff --git" > part, there is the "index $old..$new

[PATCH] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

using git-diff as a diff replacement?

2016-02-24 Thread Jacob Keller
Hey, I know that running "git diff " when outside a git project will result in a normal diff being run. I happen to prefer the diff algorithm and diff output of "git diff" but there does not seem to be a way to have this behavior from within a git tree. Is there a way to pass an option to git-di

[PATCH] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

Re: [PATCH] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
Hi, On Wed, Feb 24, 2016 at 3:27 PM, Stefan Beller wrote: > On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller > wrote: >> From: Jacob Keller >> Add a git submodule--helper function which can be used to sanitize the >> GIT_CONFIG_PARAMETERS value to only allow c

Re: [PATCH] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
On Wed, Feb 24, 2016 at 3:36 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller >> wrote: >>> From: Jacob Keller >>> >>> Due to the way that the git-submodule code works, it clears all local

[PATCH v2] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

Re: Rebase performance

2016-02-24 Thread Jacob Keller
On Wed, Feb 24, 2016 at 2:09 PM, Christian Couder wrote: > Hi, > Another possibility would be to libify the "git apply" functionality > and then to use the libified "git apply" in run_apply() instead of > launching a separate "git apply" process. One benefit from this is > that we could probably g

Re: using git-diff as a diff replacement?

2016-02-24 Thread Jacob Keller
On Wed, Feb 24, 2016 at 6:38 PM, Duy Nguyen wrote: > On Thu, Feb 25, 2016 at 5:21 AM, Jacob Keller wrote: >> Hey, >> >> I know that running "git diff " when outside a git >> project will result in a normal diff being run. I happen to prefer the >>

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
On Wed, Feb 24, 2016 at 4:27 PM, Eric Sunshine wrote: >> --- >> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c >> @@ -255,6 +255,61 @@ static int module_clone(int argc, const char **argv, >> const char *prefix) >> +/* Rules to sanitize configuration variables that are Ok t

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
On Wed, Feb 24, 2016 at 5:41 PM, Jeff King wrote: > On Wed, Feb 24, 2016 at 03:59:12PM -0800, Jacob Keller wrote: > >> +int sanitize_submodule_config(const char *var, const char *value, void >> *data) >> +{ >> + struct strbuf quoted = STRBUF_INIT; >

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-24 Thread Jacob Keller
On Wed, Feb 24, 2016 at 10:23 PM, Jeff King wrote: > On Wed, Feb 24, 2016 at 10:19:05PM -0800, Jacob Keller wrote: > >> >> + /* combined all the values before we quote them */ >> > >> > Comment repeats what the code already says, thus not terribl

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote: > On Thu, Feb 25, 2016 at 02:00:36AM -0500, Jeff King wrote: > >> I think something like this would work: >> [...] >> but it does not seem to pass with your patch (even after I fixed up the >> weird "local" thing). I think the problem is that we a

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote: > static int clone_submodule(const char *path, const char *gitdir, const char > *url, >const char *depth, const char *reference, int > quiet) > { > @@ -145,7 +166,7 @@ static int clone_submodule(const char *path, co

[PATCH v3 1/2] t/lib-http/apache.conf: load mod_unixd module in apache 2.4

2016-02-25 Thread Jacob Keller
From: Jacob Keller Since 2.4, apache will fail to load unless mod_unixd is loaded in order to drop privileges. Signed-off-by: Jacob Keller --- I am not sure why this wasn't there already, but I am unable to run httpd 2.4.18 without it, on Fedora 23. t/lib-httpd/apache.conf | 3 +++ 1

[PATCH v3 2/2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

Re: [PATCH v2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 12:32 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> On Wed, Feb 24, 2016 at 11:11 PM, Jeff King wrote: >>> static int clone_submodule(const char *path, const char *gitdir, const >>> char *url, >>>

Re: [PATCH v3 1/2] t/lib-http/apache.conf: load mod_unixd module in apache 2.4

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 3:18 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >>> Michael (cc'd) posted an identical patch with some more discussion back >>> in May: >>> >>> http://article.gmane.org/gmane.comp.version-control.git/268770 >>> >>> The series languished because none of the revi

Re: [PATCH v3 1/2] t/lib-http/apache.conf: load mod_unixd module in apache 2.4

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 3:41 PM, Junio C Hamano wrote: > Actually, let's wait a bit to avoid unnecessary conflicts between topics. > sb/submodule-fetch-nontip changes the way how these calls to "clean env" > helper function are made. Ya there will be some superficial conflicts with some of Stefan

Re: [PATCH v3 2/2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 5:55 PM, Eric Sunshine wrote: > Not worth a re-roll, but these quote sequences are brain-melting. > Easier would have been to double-quote the second argument of > test_expect_success() and then do either: > They are. I fiddled with things till I got it working. I wasn't s

Re: [PATCH v3 2/2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 6:26 PM, Eric Sunshine wrote: > One thing I elided accidentally was that when changing the second > argument of test_expect_success to double-quotes, you would altogether > drop the double-quotes around "helper" in: > > git -c credential.helper="helper" submodule--helpe

Re: [PATCH v3 2/2] git: submodule honor -c credential.* from command line

2016-02-25 Thread Jacob Keller
On Thu, Feb 25, 2016 at 10:07 PM, Jeff King wrote: > Of the two you suggested, I think I like the here-doc better, as it does > not leave any question to a reader that there is other interpolation > going on. > > -Peff Agreed. Since I forgot the parts about argc checking, I will do a reroll with

Re: [PATCH 01/16] bisect: write about `bisect next` in documentation

2016-02-26 Thread Jacob Keller
On Thu, Feb 25, 2016 at 6:04 PM, Stephan Beyer wrote: > This patch considers the source code comment that says to be > "not sure we want 'next' at the UI level anymore", and replies with > "Yes, we want it!". Therefore, the "git bisect next" functionality > is explicitly motivated and documented.

Re: Fwd: git clone does not respect command line options

2016-02-26 Thread Jacob Keller
On Thu, Feb 25, 2016 at 11:59 PM, Jeff King wrote: > Right. The "git-config" program doesn't know about the semantics of > particular values (remember that in the early days, there were many > porcelains which built on top of git, and they could all store their own > config). Using "--get" impleme

[PATCH v3 3/3] git: submodule honor -c credential.* from command line

2016-02-26 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

[PATCH v3 1/3] t/lib-httpd: load mod_unixd

2016-02-26 Thread Jacob Keller
From: Michael J Gruber In contrast to apache 2.2, apache 2.4 does not load mod_unixd in its default configuration (because there are choices). Thus, with the current config, apache 2.4.10 will not be started and the httpd tests will not run on distros with default apache config (RedHat type). En

[PATCH v3 2/3] sumodule--helper: fix submodule--helper clone usage and check argc count

2016-02-26 Thread Jacob Keller
From: Jacob Keller git submodule--helper clone usage specified that paths come after the -- as a sequence. However, the actual implementation does not, and requires only a single path passed in via --path. In addition, argc was unchecked. (allowing arbitrary extra arguments that were silently

[PATCH v4 1/3] t/lib-httpd: load mod_unixd

2016-02-26 Thread Jacob Keller
From: Michael J Gruber In contrast to apache 2.2, apache 2.4 does not load mod_unixd in its default configuration (because there are choices). Thus, with the current config, apache 2.4.10 will not be started and the httpd tests will not run on distros with default apache config (RedHat type). En

[PATCH v4 2/3] sumodule--helper: fix submodule--helper clone usage and check argc count

2016-02-26 Thread Jacob Keller
From: Jacob Keller git submodule--helper clone usage specified that paths come after the -- as a sequence. However, the actual implementation does not, and requires only a single path passed in via --path. In addition, argc was unchecked. (allowing arbitrary extra arguments that were silently

[PATCH v4 3/3] git: submodule honor -c credential.* from command line

2016-02-26 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

Re: [PATCH v4 2/3] sumodule--helper: fix submodule--helper clone usage and check argc count

2016-02-26 Thread Jacob Keller
On Fri, Feb 26, 2016 at 11:31 AM, Stefan Beller wrote: > On Fri, Feb 26, 2016 at 11:18 AM, Jacob Keller > wrote: >> From: Jacob Keller >> - git submodule--helper clone ${GIT_QUIET:+--quiet} --prefix >> "$wt_prefix" --path "$sm_p

Re: [PATCH] credential: let empty credential specs reset helper list

2016-02-26 Thread Jacob Keller
On Fri, Feb 26, 2016 at 11:34 AM, Junio C Hamano wrote: > > Of course, the code in the configuration subsystem for updated > version of Git needs to become aware of the new syntax, and those > that deal with the multi-value variables need custom code, which is > similar to the way you special case

Re: [PATCH v4 3/3] git: submodule honor -c credential.* from command line

2016-02-26 Thread Jacob Keller
On Fri, Feb 26, 2016 at 2:05 PM, Jeff King wrote: > On Fri, Feb 26, 2016 at 11:18:48AM -0800, Jacob Keller wrote: > >> +test_expect_success 'sanitize-config keeps credential.helper' " >> + git -c credential.helper=helper submodule--helper sanitize-config &

Re: [PATCH v3 3/3] git: submodule honor -c credential.* from command line

2016-02-26 Thread Jacob Keller
On Fri, Feb 26, 2016 at 11:41 AM, Stefan Beller wrote: > > In the future, would you mind to try interdiffs in a cover letter? > > (I do git diff HEAD...$(previousSeries) with previousSerier either > local branch or rather what Junio picked up already. There is also tbdiff, > which should be better

Re: [PATCH v4 3/3] git: submodule honor -c credential.* from command line

2016-02-26 Thread Jacob Keller
On Fri, Feb 26, 2016 at 2:20 PM, Jacob Keller wrote: >> that is slightly more verbose, but it does let us keep the main body >> inside single-quotes, without restoring to confusing backslash escaping. >> > > I think I prefer the double quotes myself but will use this if p

[PATCH v5 2/3] quote: implement sq_quotef()

2016-02-26 Thread Jacob Keller
From: Jacob Keller Signed-off-by: Jacob Keller --- quote.c | 13 + quote.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/quote.c b/quote.c index fe884d24521f..b281a8fe454e 100644 --- a/quote.c +++ b/quote.c @@ -43,6 +43,19 @@ void sq_quote_buf(struct strbuf *dst, const

[PATCH v5 0/3] pass credential.* to submodules

2016-02-26 Thread Jacob Keller
From: Jacob Keller This version of the series fixes up a few issues and implements sq_quotef function to help make intent more clear in the code. I also chose to use Jeff's implementation for the test fix since I think it works better and I prefer the consistency of implementation. Inte

[PATCH v5 1/3] sumodule--helper: fix submodule--helper clone usage and check argc count

2016-02-26 Thread Jacob Keller
From: Jacob Keller git submodule--helper clone usage specified that paths come after the -- as a sequence. However, the actual implementation does not, and requires only a single path passed in via --path. In addition, argc was unchecked. (allowing arbitrary extra arguments that were silently

[PATCH v5 3/3] git: submodule honor -c credential.* from command line

2016-02-26 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

Re: [PATCH v5 0/3] pass credential.* to submodules

2016-02-26 Thread Jacob Keller
On Fri, Feb 26, 2016 at 4:13 PM, Jacob Keller wrote: > From: Jacob Keller > > This version of the series fixes up a few issues and implements > sq_quotef function to help make intent more clear in the code. I also > chose to use Jeff's implementation for the test fix sinc

Re: [PATCH v5 1/3] sumodule--helper: fix submodule--helper clone usage and check argc count

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 9:49 AM, Junio C Hamano wrote: > Jacob Keller writes: >> Fix the usage description to match implementation. Add an argc check to >> enforce no extra arguments. > > The above sounds very sensible. > Right. >> Fix a bug in the argument passin

Re: [PATCH v5 3/3] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 10:20 AM, Junio C Hamano wrote: > Jacob Keller writes: > >> +static int sanitize_submodule_config(const char *var, const char *value, >> void *data) >> +{ >> + struct strbuf quoted = STRBUF_INIT; >> + struct

Re: [PATCH v5 1/3] sumodule--helper: fix submodule--helper clone usage and check argc count

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 11:44 AM, Junio C Hamano wrote: > Jacob Keller writes: >> That actually is required because otherwise adding a check for argc >> would break the things. I could split them and do this first and then >> check for argc if you really prefer? > >

Re: [PATCH v5 3/3] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 11:47 AM, Junio C Hamano wrote: > I was talking about the "not even an equal sign" true, i.e. > > $ git -c random.what -c random.false=no -c random.true=yes \ > config --bool --get-regexp 'random.*' > random.what true > random.false false > random.true

[PATCH v6 0/7] submodule--helper credential.* pass into submodule

2016-02-29 Thread Jacob Keller
From: Jacob Keller This series implements ability to pass the credential.* configuration variables from the command line directly into the submodule. The other patches in this series are small fixups noticed along the way. --> Interdiff between v5 and v6 <-- diff --git a/builtin/sub

[PATCH v6 6/7] quote: implement sq_quotef()

2016-02-29 Thread Jacob Keller
From: Jacob Keller Signed-off-by: Jacob Keller --- quote.c | 13 + quote.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/quote.c b/quote.c index fe884d24521f..b281a8fe454e 100644 --- a/quote.c +++ b/quote.c @@ -43,6 +43,19 @@ void sq_quote_buf(struct strbuf *dst, const

[PATCH v6 5/7] submodule: fix segmentation fault in submodule--helper clone

2016-02-29 Thread Jacob Keller
From: Jacob Keller The git submodule--helper clone command will fail with a segmentation fault when given a null url or null path variable. Since these are required for proper functioning of the submodule--helper clone subcommand, add checks to prevent running and fail gracefully when missing

[PATCH v6 3/7] submodule: check argc count for git submodule--helper clone

2016-02-29 Thread Jacob Keller
From: Jacob Keller Extra unused arguments to git submodule--helper clone subcommand were being silently ignored. Add a check to the argc count after options handling to ensure that no extra arguments were left on the argv array. Signed-off-by: Jacob Keller --- builtin/submodule--helper.c | 4

[PATCH v6 4/7] submodule: fix submodule--helper clone usage

2016-02-29 Thread Jacob Keller
From: Jacob Keller git submodule--helper clone usage stated that paths were added after the [--] argument. The actual implementation required use of --path argument and only supports one path at a time. Update the usage string to match the current implementation. Signed-off-by: Jacob Keller

[PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule

[PATCH v6 2/7] submodule: don't pass empty string arguments to submodule--helper clone

2016-02-29 Thread Jacob Keller
From: Jacob Keller When --reference or --depth are unused, the current git-submodule.sh results in empty "" arguments appended to the end of the argv array inside git submodule--helper clone. This is not caught because the argc count is not checked today. Fix git-submodule.sh to on

[PATCH v6 1/7] t/lib-httpd: load mod_unixd

2016-02-29 Thread Jacob Keller
From: Michael J Gruber In contrast to apache 2.2, apache 2.4 does not load mod_unixd in its default configuration (because there are choices). Thus, with the current config, apache 2.4.10 will not be started and the httpd tests will not run on distros with default apache config (RedHat type). En

Re: [PATCH v6 5/7] submodule: fix segmentation fault in submodule--helper clone

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 3:20 PM, Stefan Beller wrote: > > I think this bug was put in, by "literally" translating from shell, > see ee8838d15776, where the shell code was rewritten to C, > specially: > > git clone $quiet ${depth:+"$depth"} -n ${reference:+"$reference"} \ > --separate-git-dir

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 3:39 PM, Stefan Beller wrote: > On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller > wrote: >> >> +test_expect_success 'cmdline credential config passes into submodules' ' >> + git init super && >> + set_askpas

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-03-01 Thread Jacob Keller
On Tue, Mar 1, 2016 at 9:26 AM, Junio C Hamano wrote: > I find this in t/lib-httpd.sh: > > set_askpass() { > >"$TRASH_DIRECTORY/askpass-query" && > echo "$1" >"$TRASH_DIRECTORY/askpass-user" && > echo "$2" >"$TRASH_DIRECTORY/askpass-pass" >

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-03-01 Thread Jacob Keller
On Tue, Mar 1, 2016 at 11:07 AM, Junio C Hamano wrote: >> I could call expect_askpass here at each time but I don't think it >> would be meaningful after a test_must_fail. > > Even if you call expect_askpass to check, another set_askpass is > expected to start the next cycle anyway (unless we rest

Re: [PATCH] Documentation: reword rebase summary

2016-03-01 Thread Jacob Keller
On Tue, Mar 1, 2016 at 2:49 PM, Stefan Beller wrote: > The wording is introduced in c3f0baaca (Documentation: sync git.txt > command list and manual page title, 2007-01-18), but rebase has evolved > since then, capture the modern usage by being more generic about the > rebase command in the summar

Re: Fsck configurations and cloning.

2016-03-05 Thread Jacob Keller
On Sat, Mar 5, 2016 at 5:44 PM, Ryne Everett wrote: > I'm assuming fsck configurations are supposed to apply to clones but > I'm having no luck: > > $ git --version > git version 2.7.2 > $ git config --get transfer.fsckobjects > true > $ git config --get fsck.badTimezone >

Re: [PATCH 06/15] ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams

2016-03-07 Thread Jacob Keller
On Sun, Mar 6, 2016 at 4:04 AM, Karthik Nayak wrote: > Borrowing from branch.c's implementation print "[gone]" whenever an > unknown upstream ref is encountered instead of just ignoring it. > > This makes sure that when branch.c is ported over to using ref-filter > APIs for printing, this feature

Re: [PATCH 08/15] ref-filter: make "%(symref)" atom work with the ':short' modifier

2016-03-07 Thread Jacob Keller
On Mon, Mar 7, 2016 at 3:08 PM, Junio C Hamano wrote: > Karthik Nayak writes: > >> The "%(symref)" atom doesn't work when used with the ':short' modifier >> because we strictly match only 'symref' for setting the 'need_symref' >> indicator. Fix this by using 'starts_with()' rather than 'strcmp()'

Re: [PATCH 15/15] branch: implement '--format' option

2016-03-07 Thread Jacob Keller
On Sun, Mar 6, 2016 at 4:05 AM, Karthik Nayak wrote: > Implement the '--format' option provided by 'ref-filter'. > This lets the user list tags as per desired format similar > to the implementation in 'git for-each-ref'. > s/tags/branches/ maybe? Thanks, Jake -- To unsubscribe from this list: se

Re: [RFC/GSoC] Introduction

2016-03-13 Thread Jacob Keller
On Sun, Mar 13, 2016 at 11:33 AM, Sidhant Sharma wrote: > Coincidentally, my approach too is a wrapper around git as you suggest. > The approach is simple and straight forward, but I wasn't sure if it would be > accepted on the list, mainly because it may not look consistent with the > current >

Re: [RFC/GSoC] Introduction

2016-03-13 Thread Jacob Keller
On Sun, Mar 13, 2016 at 10:25 PM, Sidhant Sharma wrote: > > On Monday 14 March 2016 04:58 AM, Jacob Keller wrote: >> On Sun, Mar 13, 2016 at 11:33 AM, Sidhant Sharma >> wrote: >>> Coincidentally, my approach too is a wrapper around git as you suggest. >>>

Re: [RFC/GSoC] Introduction

2016-03-13 Thread Jacob Keller
On Sun, Mar 13, 2016 at 10:25 PM, Sidhant Sharma wrote: > > On Monday 14 March 2016 02:49 AM, Kevin Daudt wrote: >> On Mon, Mar 14, 2016 at 12:03:33AM +0530, Sidhant Sharma wrote: >>> Other than this, I also tried to expand the list of potentially destructive >>> commands and updated the list as f

Re: [PATCH v2 00/16] port branch.c to use ref-filter's printing options

2016-03-15 Thread Jacob Keller
On Tue, Mar 15, 2016 at 9:47 AM, Karthik Nayak wrote: > diff --git a/Documentation/git-for-each-ref.txt > b/Documentation/git-for-each-ref.txt > index 193e99e..578bbd1 100644 > --- a/Documentation/git-for-each-ref.txt > +++ b/Documentation/git-for-each-ref.txt > @@ -116,10 +116,12 @@ upstream:: >

Re: [PATCH v2 04/16] ref-filter: modify "%(objectname:short)" to take length

2016-03-15 Thread Jacob Keller
On Tue, Mar 15, 2016 at 9:47 AM, Karthik Nayak wrote: > Add support for %(objectname:short=) which would print the > abbreviated unique objectname of given length. When no length is > specified 7 is used. The minimum length is 'MINIMUM_ABBREV'. > Isn't the default abbreviation value used here, no

Re: [PATCH] git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS

2016-03-22 Thread Jacob Keller
On Tue, Mar 22, 2016 at 2:43 PM, Jonathan Nieder wrote: > Jeff King wrote[1]: > >> Subject: git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS >> >> The "git -c var=value" option stuffs the config value into >> $GIT_CONFIG_PARAMETERS, so that sub-processes can see it. >> When the config

Re: [PATCH 1/4] submodule: fix recursive path printing from non root directory

2016-03-24 Thread Jacob Keller
if test -n "$recursive" > then > - prefix="$prefix$sm_path/" > eval cmd_sync > fi > ) > -- > 2.8.0.rc4.10.g52f3f33 > Reviewed-by: Jacob Keller Regards, Jake -- 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.kernel.org/majordomo-info.html

Re: [PATCH 2/4] submodule: fix recursive execution from non root directory

2016-03-24 Thread Jacob Keller
) || > @@ -1240,6 +1242,7 @@ cmd_sync() > > if test -n "$recursive" > then > + wt_prefix= And here I think I see why we moved the original prefix code up some. This looks good.

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-24 Thread Jacob Keller
-- It is nice to see the format for doing this standardized, and reduce extra code in the submodule--helper. I had wondered why we used --prefix before. Reviewed-by: Jacob Keller > builtin/submodule--helper.c | 5 + > git-submodule.sh| 12 ++-- > 2 files changed

Re: [RFD] minor frustration in 'git add' pathname completion

2016-03-24 Thread Jacob Keller
On Thu, Mar 24, 2016 at 3:55 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> If I were to explicitly ignore that file, then even though I know >>> whats-cooking.txt is not ignored, >>> >>>$ git add whats-coo >>> >>> would not offer anything. I'd be left scratching my head, wondering

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