Re: [PATCH v2] config: reject invalid VAR in 'git -c VAR=VAL command'

2017-02-22 Thread Junio C Hamano
Jeff King writes: > FWIW, the code looks OK here. It is a shame to duplicate the policy > found in git_config_parse_key(), though. > > I wonder if we could make a master version of that which canonicalizes > in-place, and then just wrap it for the git_config_parse_key() >

Re: [RFC][Git GUI] Make Commit message field in git GUI re sizable.

2017-02-22 Thread Jessie Hernandez
> On 2017-02-22 06:59 AM, Jessie Hernandez wrote: >>> HI, >>> >>> the reason why it is fixed, is because commit messages should be >>> wrapped at 76 characters to be used in mails. So it helps you with the >>> wrapping. >>> >>> Bert >> >> Right ok. I understand. >> Knowing this I think I might

Re: [PATCH v2] config: reject invalid VAR in 'git -c VAR=VAL command'

2017-02-22 Thread Jeff King
On Tue, Feb 21, 2017 at 01:24:38PM -0800, Junio C Hamano wrote: > The parsing of one-shot assignments of configuration variables that > come from the command line historically was quite loose and allowed > anything to pass. > > The configuration variable names that come from files are validated

Re: git email From: parsing (was Re: [GIT PULL] Staging/IIO driver patches for 4.11-rc1)

2017-02-22 Thread Jeff King
On Thu, Feb 23, 2017 at 07:04:44AM +0100, Greg KH wrote: > > Poor Simon Sandström. > > > > Funnily enough, this only exists for one commit. You've got several > > other commits from Simon that get his name right. > > > > What happened? > > I don't know what happened, I used git for this, I

git email From: parsing (was Re: [GIT PULL] Staging/IIO driver patches for 4.11-rc1)

2017-02-22 Thread Greg KH
On Wed, Feb 22, 2017 at 11:59:01AM -0800, Linus Torvalds wrote: > On Wed, Feb 22, 2017 at 6:56 AM, Greg KH wrote: > > > > =?UTF-8?q?Simon=20Sandstr=C3=B6m?= (1): > > staging: vt6656: Add missing identifier names > > Wow, your scripts really screwed up that name.

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread brian m. carlson
On Thu, Feb 23, 2017 at 01:03:39AM +, David Turner wrote: > So, I guess, this patch might be considered a security risk. But on the > other hand, even *without* this patch, and without http.allowempty at > all, I think a config which simply uses a https:// url without the magic :@ > would

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Junio C Hamano
Jeff King writes: > On Wed, Feb 22, 2017 at 11:34:19PM +, brian m. carlson wrote: > >> Browsers usually disable this feature by default, as it basically will >> attempt to authenticate to any site that sends a 401. For Kerberos >> against a malicious site, the user will

Re: [PATCH 2/2] http: add an "auto" mode for http.emptyauth

2017-02-22 Thread Jeff King
On Thu, Feb 23, 2017 at 01:16:33AM +, David Turner wrote: > I don't know enough about how libcurl handles authentication to know whether > these patches are a good idea, but I have a minor comment anyway. As somebody who is using non-Basic auth, can you apply these patches and show us the

Re: feature request: user email config per domain

2017-02-22 Thread Igor Djordjevic BugA
Hi Tushar, On 22/02/2017 14:12, Tushar Kapila wrote: > So when remote URL has github.com push as tgkp...@search.com but for > testing.abc.doman:8080 use tgkp...@test.xyz.com ? I`m not sure if this is sensible, as authorship information is baked into the commit at the time of

RE: [PATCH 2/2] http: add an "auto" mode for http.emptyauth

2017-02-22 Thread David Turner
I don't know enough about how libcurl handles authentication to know whether these patches are a good idea, but I have a minor comment anyway. > -Original Message- > From: Jeff King [mailto:p...@peff.net] > +static int curl_empty_auth_enabled(void) { > + if (curl_empty_auth < 0) { >

RE: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread David Turner
> -Original Message- > From: brian m. carlson [mailto:sand...@crustytoothpaste.net] > > This is SPNEGO. It will work with NTLM as well as Kerberos. > > Browsers usually disable this feature by default, as it basically will > attempt to > authenticate to any site that sends a 401. For

Re: feature request: user email config per domain

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 06:42:02PM +0530, Tushar Kapila wrote: > Feature request : can we have a config for email per repo domain ? > Something like: > > git config --global domain.user.email tgkp...@test.xyz.com > testing.abc.doman:8080 > > git config --global domain.user.email

Re: [PATCH] submodule init: warn about falling back to a local path

2017-02-22 Thread Stefan Beller
On Wed, Feb 22, 2017 at 7:01 AM, Philip Oakley wrote: > > Would a note in the user docs about the fallback you list above also be > useful? duh! yes it would! Will look at the documentation and reroll.

Re: [PATCH] t: add multi-parent test of diff-tree --stdin

2017-02-22 Thread brian m. carlson
On Wed, Feb 22, 2017 at 03:42:25PM -0800, Junio C Hamano wrote: > "brian m. carlson" writes: > > > We were lacking a test that covered the multi-parent case for commits. > > Add a basic test to ensure we do not regress this behavior in the > > future. > > > >

Re: [PATCH] t: add multi-parent test of diff-tree --stdin

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 03:42:25PM -0800, Junio C Hamano wrote: > "brian m. carlson" writes: > > > We were lacking a test that covered the multi-parent case for commits. > > Add a basic test to ensure we do not regress this behavior in the > > future. > > > >

Re: [PATCH] t: add multi-parent test of diff-tree --stdin

2017-02-22 Thread Junio C Hamano
"brian m. carlson" writes: > We were lacking a test that covered the multi-parent case for commits. > Add a basic test to ensure we do not regress this behavior in the > future. > > Signed-off-by: brian m. carlson > --- >

[PATCH 1/2] http: restrict auth methods to what the server advertises

2017-02-22 Thread Jeff King
By default, we tell curl to use CURLAUTH_ANY, which does not limit its set of auth methods. However, this results in an extra round-trip to the server when authentication is required. After we've fed the credential to curl, it wants to probe the server to find its list of available methods before

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 11:34:19PM +, brian m. carlson wrote: > Browsers usually disable this feature by default, as it basically will > attempt to authenticate to any site that sends a 401. For Kerberos > against a malicious site, the user will either not have a valid ticket > for that

[PATCH 2/2] http: add an "auto" mode for http.emptyauth

2017-02-22 Thread Jeff King
This variable needs to be specified to make some types of non-basic authentication work, but ideally this would just work out of the box for everyone. However, simply setting it to "1" by default introduces an extra round-trip for cases where it _isn't_ useful. We end up sending a bogus empty

[PATCH] t: add multi-parent test of diff-tree --stdin

2017-02-22 Thread brian m. carlson
We were lacking a test that covered the multi-parent case for commits. Add a basic test to ensure we do not regress this behavior in the future. Signed-off-by: brian m. carlson --- t/t4013-diff-various.sh | 19 +++ 1 file changed, 19 insertions(+)

Re: [RFC 03/14] upload-pack: test negotiation with changing repo

2017-02-22 Thread Junio C Hamano
Jonathan Tan writes: >> This somehow looks like a good thing to do even in production. Am I >> mistaken? > > Yes, that's true. If this patch set stalls (for whatever reason), I'll > spin this off into an independent patch. ... which may be needed. As to the main goal

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread brian m. carlson
On Wed, Feb 22, 2017 at 09:04:14PM +, David Turner wrote: > > -Original Message- > > From: Junio C Hamano [mailto:jch2...@gmail.com] On Behalf Of Junio C > > Hamano > > Sent: Wednesday, February 22, 2017 3:20 PM > > To: David Turner > > Cc:

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 02:35:11PM -0800, Junio C Hamano wrote: > A solution along your line would help Negotiate users OOB experience > without hurting the servers that do not offer Negotiate, but until > that materializes, users can set the lazier http.emptyAuth on > (without selectively

Re: [PATCH v5 03/19] builtin/diff-tree: convert to struct object_id

2017-02-22 Thread brian m. carlson
On Wed, Feb 22, 2017 at 02:16:42PM -0500, Jeff King wrote: > On Wed, Feb 22, 2017 at 10:50:21AM -0800, Junio C Hamano wrote: > > > "brian m. carlson" writes: > > > > > Convert most leaf functions to struct object_id. Change several > > > hardcoded numbers to uses

Re: feature request: user email config per domain

2017-02-22 Thread Andrew Ardill
On 23 February 2017 at 00:12, Tushar Kapila wrote: > I can set my email via: > git config --global user.email tgkp...@xyz.dom > > this is dangerous when I use this my office or in a multi repository > provider environment where my email is different for a few (like >

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Junio C Hamano
Jeff King writes: > On Wed, Feb 22, 2017 at 01:57:28PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > On Wed, Feb 22, 2017 at 01:25:11PM -0800, Junio C Hamano wrote: >> >> >> >> Thanks for your thoughts. I'd think that we should take this change >>

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 01:57:28PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > On Wed, Feb 22, 2017 at 01:25:11PM -0800, Junio C Hamano wrote: > >> > >> Thanks for your thoughts. I'd think that we should take this change > >> and leave the optimization for later,

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Junio C Hamano
Jeff King writes: > On Wed, Feb 22, 2017 at 01:25:11PM -0800, Junio C Hamano wrote: >> >> Thanks for your thoughts. I'd think that we should take this change >> and leave the optimization for later, then. It's not like the >> change of the default is making the normal situation

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 01:25:11PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > I don't think it incurs an extra round-trip now, because of the way > > libcurl works. Though I think it _does_ make it harder for curl to later > > optimize out that extra round-trip. > >

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 01:16:33PM -0800, Junio C Hamano wrote: > David Turner writes: > > > Always, no. For failed authentication (or authorization), apparently, yes. > > > > I tested this by setting the variable to false and then true, and trying > > to > >

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Junio C Hamano
Jeff King writes: > I don't think it incurs an extra round-trip now, because of the way > libcurl works. Though I think it _does_ make it harder for curl to later > optimize out that extra round-trip. > ... > In the current trace, you can see that libcurl insists on making a >

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Junio C Hamano
David Turner writes: > Always, no. For failed authentication (or authorization), apparently, yes. > I tested this by setting the variable to false and then true, and trying to > Push to a github repository which I didn't have write access to, with > both an empty

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 12:19:56PM -0800, Junio C Hamano wrote: > > It would be one thing if cURL would not let the user specify credentials > > interactively after attempting NTLM authentication (i.e. login > > credentials), but that is not the case. > > > > It would be another thing if

Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.

2017-02-22 Thread Andreas Heiduk
@Phillip: Thanks. @Junio: Don't bother, I'm about to fix other man-pages with the text from ls-files. I will include that typo-fix and prepare a new patch based on maint. Am 22.02.2017 um 22:02 schrieb Junio C Hamano: > "Philip Oakley" writes: >> s/option

RE: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread David Turner
> -Original Message- > From: Junio C Hamano [mailto:jch2...@gmail.com] On Behalf Of Junio C > Hamano > Sent: Wednesday, February 22, 2017 3:20 PM > To: David Turner > Cc: git@vger.kernel.org; sand...@crustytoothpaste.net; Johannes Schindelin >

Re: [PATCH v5 00/24] Remove submodule from files-backend.c

2017-02-22 Thread Junio C Hamano
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> v5 goes a bit longer than v4, basically: >> >> - files_path() is broken down into three smaller functions, >>files_{packed_refs,reflog,refname}_path(). >> >> - most of store-based api is

Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.

2017-02-22 Thread Junio C Hamano
"Philip Oakley" writes: >> -When `-z` option is not used, TAB, LF, and backslash characters >> -in pathnames are represented as `\t`, `\n`, and `\\`, >> -respectively. The path is also quoted according to the >> -configuration variable `core.quotePath` (see

Re: [PATCH] git add -i: replace \t with blanks in the help message

2017-02-22 Thread Junio C Hamano
Ralf Thielow writes: > Within the help message of 'git add -i', the 'diff' command uses one > tab character and blanks to create the space between the name and the > description while the others use blanks only. So if the tab size is > not at 4 characters, this

Re: [PATCH] submodule init: warn about falling back to a local path

2017-02-22 Thread Philip Oakley
From: "Stefan Beller" When a submodule is initialized, the config variable 'submodule..url' is set depending on the value of the same variable in the .gitmodules file. When the URL indicates to be relative, then the url is computed relative to its default remote. The

Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.

2017-02-22 Thread Philip Oakley
From: "Andreas Heiduk" [PATCH] Documentation: Clarify core.quotePath, remove cruft in git-ls-files. Signed-off-by: Andreas Heiduk --- I have merged the best parts about quoting into the core.quotePath description and cleaned up the text in

Re: [PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread Junio C Hamano
David Turner writes: > From: Johannes Schindelin > > It is common in corporate setups to have permissions managed via a > domain account. That means that the user does not really have to log in > when accessing a central repository via https://,

Re: [PATCH v5 03/19] builtin/diff-tree: convert to struct object_id

2017-02-22 Thread Junio C Hamano
Jeff King writes: > On Wed, Feb 22, 2017 at 10:50:21AM -0800, Junio C Hamano wrote: > >> What the function does appears somewhat iffy in the modern world. >> We are relying on the fact that while Git is operating in this mode >> of reading a tuple of commits per line and doing

Re: [PATCH v5 03/19] builtin/diff-tree: convert to struct object_id

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 10:50:21AM -0800, Junio C Hamano wrote: > "brian m. carlson" writes: > > > Convert most leaf functions to struct object_id. Change several > > hardcoded numbers to uses of parse_oid_hex. In doing so, verify that we > > when we want two

Re: url..insteadOf vs. submodules

2017-02-22 Thread Stefan Beller
On Wed, Feb 22, 2017 at 10:57 AM, Jeff King wrote: > On Wed, Feb 22, 2017 at 09:36:12AM -0800, Junio C Hamano wrote: > >> >> My gut feeling is that we should do the selective/filtered include >> >> Peff mentioned when a repository is known to be used as a submodule >> >> of

Re: url..insteadOf vs. submodules

2017-02-22 Thread Jeff King
On Wed, Feb 22, 2017 at 09:36:12AM -0800, Junio C Hamano wrote: > >> My gut feeling is that we should do the selective/filtered include > >> Peff mentioned when a repository is known to be used as a submodule > >> of somebody else. > > > > Does the management of these submodue-related config

Re: [PATCH v5 03/19] builtin/diff-tree: convert to struct object_id

2017-02-22 Thread Junio C Hamano
"brian m. carlson" writes: > Convert most leaf functions to struct object_id. Change several > hardcoded numbers to uses of parse_oid_hex. In doing so, verify that we > when we want two trees, we have exactly two trees. > > Finally, in stdin_diff_commit, avoid

[PATCH] git add -i: replace \t with blanks in the help message

2017-02-22 Thread Ralf Thielow
Within the help message of 'git add -i', the 'diff' command uses one tab character and blanks to create the space between the name and the description while the others use blanks only. So if the tab size is not at 4 characters, this description will not be in range. Replace the tab character with

Re: [PATCH 03/15] lib-submodule-update.sh: define tests for recursing into submodules

2017-02-22 Thread Stefan Beller
On Thu, Feb 16, 2017 at 12:39 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Currently lib-submodule-update.sh provides 2 functions >> test_submodule_switch and test_submodule_forced_switch that are used by a >> variety of tests to ensure that

Re: [PATCH] Documentation: use brackets for optional arguments

2017-02-22 Thread Junio C Hamano
"brian m. carlson" writes: > The documentation for git blame used vertical bars for optional > arguments to -M and -C, which is unusual and potentially confusing. > Since most man pages use brackets for optional items, and that's > consistent with how we document

Re: [PATCH v5 01/24] refs.h: add forward declaration for structs used in this file

2017-02-22 Thread Stefan Beller
On Wed, Feb 22, 2017 at 6:04 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > refs.h | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/refs.h b/refs.h > index 9fbff90e7..c494b641a 100644 > ---

Re: [PATCH] Documentation: correctly spell git worktree --detach

2017-02-22 Thread Junio C Hamano
"brian m. carlson" writes: > The option is “--detach”, but we accidentally spelled it “--detached” at > one point in the man page. > > Signed-off-by: brian m. carlson > Reported-by: Casey Rodarmor > --- Thanks,

Re: url..insteadOf vs. submodules

2017-02-22 Thread Junio C Hamano
Jon Loeliger writes: > So, like, Junio C Hamano said: >> Stefan Beller writes: >> >> > Do we want to invent a special value for url.*.insteadOf to mean >> > "look up in superproject, so I don't have to keep >> > a copy that may get stale" ? >> >> My gut

Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.

2017-02-22 Thread Junio C Hamano
Andreas Heiduk writes: > [PATCH] Documentation: Clarify core.quotePath, remove cruft in > git-ls-files. > > Signed-off-by: Andreas Heiduk > --- > > I have merged the best parts about quoting into the core.quotePath > description and cleaned up the text

[PATCH] http(s): automatically try NTLM authentication first

2017-02-22 Thread David Turner
From: Johannes Schindelin It is common in corporate setups to have permissions managed via a domain account. That means that the user does not really have to log in when accessing a central repository via https://, but that the login credentials are used to

[PATCH v2 3/3] fetch-pack: add specific error for fetching an unadvertised object

2017-02-22 Thread Matt McCutchen
Enhance filter_refs (which decides whether a request for an unadvertised object should be sent to the server) to record a new match status on the "struct ref" when a request is not allowed, and have report_unmatched_refs check for this status and print a special error message, "Server does not

[PATCH v2 2/3] fetch_refs_via_pack: call report_unmatched_refs

2017-02-22 Thread Matt McCutchen
"git fetch" currently doesn't bother to check that it got all refs it sought, because the common case of requesting a nonexistent ref triggers a die() in get_fetch_map. However, there's at least one case that slipped through: "git fetch REMOTE SHA1" if the server doesn't allow requests for

[PATCH v2 1/3] fetch-pack: move code to report unmatched refs to a function

2017-02-22 Thread Matt McCutchen
We're preparing to reuse this code in transport.c for "git fetch". While I'm here, internationalize the existing error message. Signed-off-by: Matt McCutchen --- builtin/fetch-pack.c | 7 +-- fetch-pack.c | 13 + fetch-pack.h | 6

Re: [PATCH 1/3] fetch-pack: move code to report unmatched refs to a function

2017-02-22 Thread Matt McCutchen
On Wed, 2017-02-22 at 09:11 -0800, Junio C Hamano wrote: > Matt McCutchen writes: > > > We're preparing to reuse this code in transport.c for "git fetch". > > > > While I'm here, internationalize the existing error message. > > --- > > Sounds good.  Please just say it

Re: [PATCH v5 00/24] Remove submodule from files-backend.c

2017-02-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > v5 goes a bit longer than v4, basically: > > - files_path() is broken down into three smaller functions, >files_{packed_refs,reflog,refname}_path(). > > - most of store-based api is added because.. > > - test-ref-store.c is added with

Re: [RFC][Git GUI] Make Commit message field in git GUI re sizable.

2017-02-22 Thread Marc Branchaud
On 2017-02-22 06:59 AM, Jessie Hernandez wrote: HI, the reason why it is fixed, is because commit messages should be wrapped at 76 characters to be used in mails. So it helps you with the wrapping. Bert Right ok. I understand. Knowing this I think I might start writing my commit messages

Re: `git show --oneline commit` does not do what's intuitively expected

2017-02-22 Thread Linus Torvalds
On Thu, Feb 16, 2017 at 8:05 PM, Jeff King wrote: > On Fri, Feb 17, 2017 at 02:51:36AM +0100, Luna Kid wrote: > >> tl;dr; --> Please add --no-diff (or --msg-only) to git show. We'll >> love you for that. :) > > I think it is already spelled "--no-patch", or "-s" for short. I think

Re: [PATCH 1/3] fetch-pack: move code to report unmatched refs to a function

2017-02-22 Thread Junio C Hamano
Matt McCutchen writes: > We're preparing to reuse this code in transport.c for "git fetch". > > While I'm here, internationalize the existing error message. > --- Sounds good. Please just say it is OK for me to forge your sign-off ;-) > diff --git a/fetch-pack.h

Re: [PATCH] fetch: print an error when declining to request an unadvertised object

2017-02-22 Thread Junio C Hamano
Matt McCutchen writes: > Anyway, I made a split series and will send it in a moment. I don't > know if all the commit messages include exactly the information you > want; hopefully you're happy to edit them as desired. Compared to the > previous patch, there is one fix

[PATCH 1/3] fetch-pack: move code to report unmatched refs to a function

2017-02-22 Thread Matt McCutchen
We're preparing to reuse this code in transport.c for "git fetch". While I'm here, internationalize the existing error message. --- builtin/fetch-pack.c | 7 +-- fetch-pack.c | 13 + fetch-pack.h | 9 + t/t5500-fetch-pack.sh | 6 +++--- 4 files

[PATCH 3/3] fetch-pack: add specific error for fetching an unadvertised object

2017-02-22 Thread Matt McCutchen
Enhance filter_refs (which decides whether a request for an unadvertised object should be sent to the server) to record a new match status on the "struct ref" when a request is not allowed, and have report_unmatched_refs check for this status and print a special error message, "Server does not

[PATCH 2/3] fetch_refs_via_pack: call report_unmatched_refs

2017-02-22 Thread Matt McCutchen
"git fetch" currently doesn't bother to check that it got all refs it sought, because the common case of requesting a nonexistent ref triggers a die() in get_fetch_map. However, there's at least one case that slipped through: "git fetch REMOTE SHA1" if the server doesn't allow requests for

Re: [PATCH] fetch: print an error when declining to request an unadvertised object

2017-02-22 Thread Matt McCutchen
On Mon, 2017-02-20 at 22:36 -0800, Junio C Hamano wrote: > Hmph, I would have expected this to be done as a three-patch series, > >  * move the loop at the end of cmd_fetch_pack() to a separate helper >    function report_unmatched_refs() and call it; > >  * add a call to report_unmatched_refs()

Hello

2017-02-22 Thread university
Please kindly reply me if this your email is still in use. Sincerely yours Anessa...t

Re: url..insteadOf vs. submodules

2017-02-22 Thread Jon Loeliger
So, like, Junio C Hamano said: > Stefan Beller writes: > > > Do we want to invent a special value for url.*.insteadOf to mean > > "look up in superproject, so I don't have to keep > > a copy that may get stale" ? > > My gut feeling is that we should do the

Hello beautiful

2017-02-22 Thread Wesley
How you doing today? I hope you are doing well. My name is Wesley, from the US. I'm in Syria right now fighting ISIS. I want to get to know you better, if I may be so bold. I consider myself an easy-going man, and I am currently looking for a relationship in which I feel loved. Please tell me

[PATCH v5 22/24] t/helper: add test-ref-store to test ref-store functions

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile| 1 + t/helper/.gitignore | 1 + t/helper/test-ref-store.c (new) | 274 3 files changed, 276 insertions(+) create mode 100644

[PATCH v5 24/24] t1406: new tests for submodule ref store

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t1406-submodule-ref-store.sh (new +x) | 95 + 1 file changed, 95 insertions(+) create mode 100755 t/t1406-submodule-ref-store.sh diff --git a/t/t1406-submodule-ref-store.sh

[PATCH v5 23/24] t1405: some basic tests on main ref store

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t1405-main-ref-store.sh (new +x) | 123 + 1 file changed, 123 insertions(+) create mode 100755 t/t1405-main-ref-store.sh diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh new file

[PATCH v5 21/24] refs: delete pack_refs() in favor of refs_pack_refs()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
It only has one caller, not worth keeping just for convenience. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/pack-refs.c | 2 +- refs.c | 5 - refs.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/builtin/pack-refs.c

[PATCH v5 20/24] files-backend: avoid ref api targetting main ref store

2017-02-22 Thread Nguyễn Thái Ngọc Duy
A small step towards making files-backend works as a non-main ref store using the newly added store-aware API. For the record, `join` and `nm` on refs.o and files-backend.o tell me that files-backend no longer uses functions that defaults to get_main_ref_store(). I'm not yet comfortable at the

[PATCH v5 18/24] refs: add new ref-store api

2017-02-22 Thread Nguyễn Thái Ngọc Duy
This is not meant to cover all existing API. It adds enough to test ref stores with the new test program test-ref-store, coming soon and to be used by files-backend.c. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 235

[PATCH v5 16/24] files-backend: replace submodule_allowed check in files_downcast()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
files-backend.c is unlearning submodules. Instead of having a specific check for submodules to see what operation is allowed, files backend now takes a set of flags at init. Each operation will check if the required flags is present before performing. For now we have four flags: read, write and

[PATCH v5 19/24] refs: new transaction related ref-store api

2017-02-22 Thread Nguyễn Thái Ngọc Duy
The transaction struct now takes a ref store at creation and will operate on that ref store alone. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 54 refs.h | 8 refs/refs-internal.h

[PATCH v5 15/24] refs: move submodule code out of files-backend.c

2017-02-22 Thread Nguyễn Thái Ngọc Duy
files-backend is now initialized with a $GIT_DIR. Converting a submodule path to where real submodule gitdir is located is done in get_ref_store(). This gives a slight performance improvement for submodules since we don't convert submodule path to gitdir at every backend call like before. We pay

[PATCH v5 14/24] path.c: move some code out of strbuf_git_path_submodule()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
refs is learning to avoid path rewriting that is done by strbuf_git_path_submodule(). Factor out this code so it could be reused by refs* Signed-off-by: Nguyễn Thái Ngọc Duy --- path.c | 34 +++--- submodule.c | 31

[PATCH v5 17/24] refs: rename get_ref_store() to get_submodule_ref_store() and make it public

2017-02-22 Thread Nguyễn Thái Ngọc Duy
This function is intended to replace *_submodule() refs API. It provides a ref store for a specific submodule, which can be operated on by a new set of refs API. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 12 refs.h | 11

[PATCH v5 12/24] refs.c: kill register_ref_store(), add register_submodule_ref_store()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
This is the last function in this code (besides public API) that takes submodule argument and handles both main/submodule cases. Break it down, move main store registration in get_main_ref_store() and keep the rest in register_submodule_ref_store(). Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH v5 13/24] refs.c: make get_main_ref_store() public and use it

2017-02-22 Thread Nguyễn Thái Ngọc Duy
get_ref_store() will soon be renamed to get_submodule_ref_store(). Together with future get_worktree_ref_store(), the three functions provide an appropriate ref store for different operation modes. New APIs will be added to operate directly on ref stores. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH v5 09/24] refs.c: introduce get_main_ref_store()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 81b64b4ed..dab1a21ac 100644 --- a/refs.c +++ b/refs.c @@ -1456,15 +1456,23 @@ static struct ref_store

[PATCH v5 10/24] refs: rename lookup_ref_store() to lookup_submodule_ref_store()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
With get_main_ref_store() being used inside get_ref_store(), lookup_ref_store() is only used for submodule code path. Rename to reflect that and delete dead code. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 13 - 1 file changed, 4 insertions(+), 9

[PATCH v5 11/24] refs.c: flatten get_ref_store() a bit

2017-02-22 Thread Nguyễn Thái Ngọc Duy
This helps the future changes in this code. And because get_ref_store() is destined to become get_submodule_ref_store(), the "get main store" code path will be removed eventually. After this the patch to delete that code will be cleaner. Signed-off-by: Nguyễn Thái Ngọc Duy ---

[PATCH v5 05/24] files-backend: move "logs/" out of TMP_RENAMED_LOG

2017-02-22 Thread Nguyễn Thái Ngọc Duy
This makes reflog path building consistent, always in the form of strbuf_git_path(sb, "logs/%s", refname); It reduces the mental workload a bit in the next patch when that function call is converted. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs/files-backend.c | 12

[PATCH v5 03/24] files-backend: add and use files_packed_refs_path()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Keep repo-related path handling in one place. This will make it easier to add submodule/multiworktree support later. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs/files-backend.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git

[PATCH v5 06/24] files-backend: add and use files_reflog_path()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Keep repo-related path handling in one place. This will make it easier to add submodule/multiworktree support later. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs/files-backend.c | 148 +++ 1 file changed, 89 insertions(+), 59

[PATCH v5 07/24] files-backend: add and use files_refname_path()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Keep repo-related path handling in one place. This will make it easier to add submodule/multiworktree support later. This automatically adds the "if submodule then use the submodule version of git_path" to other call sites too. But it does not mean those operations are sumodule-ready. Not yet.

[PATCH v5 08/24] files-backend: remove the use of git_path()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Given $GIT_DIR and $GIT_COMMON_DIR, files-backend is now in charge of deciding what goes where (*). The end goal is to pass $GIT_DIR only. A refs "view" of a linked worktree is a logical ref store that combines two files backends together. (*) Not entirely true since strbuf_git_path_submodule()

[PATCH v5 04/24] files-backend: convert git_path() to strbuf_git_path()

2017-02-22 Thread Nguyễn Thái Ngọc Duy
git_path() and friends are going to be killed in files-backend.c in near future. And because there's a risk with overwriting buffer in git_path(), let's convert them all to strbuf_git_path(). We'll have easier time killing/converting strbuf_git_path() then because we won't have to worry about

[PATCH v5 02/24] files-backend: make files_log_ref_write() static

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Created in 5f3c3a4e6f (files_log_ref_write: new function - 2015-11-10) but probably never used outside refs-internal.c Signed-off-by: Nguyễn Thái Ngọc Duy --- refs/files-backend.c | 3 +++ refs/refs-internal.h | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff

[PATCH v5 01/24] refs.h: add forward declaration for structs used in this file

2017-02-22 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/refs.h b/refs.h index 9fbff90e7..c494b641a 100644 --- a/refs.h +++ b/refs.h @@ -1,6 +1,11 @@ #ifndef REFS_H #define REFS_H +struct object_id; +struct

[PATCH v5 00/24] Remove submodule from files-backend.c

2017-02-22 Thread Nguyễn Thái Ngọc Duy
v5 goes a bit longer than v4, basically: - files_path() is broken down into three smaller functions, files_{packed_refs,reflog,refname}_path(). - most of store-based api is added because.. - test-ref-store.c is added with t1405 and t1406 for some basic tests I'm not aimimg for complete

Re: feature request: user email config per domain

2017-02-22 Thread Pranit Bauva
Hey Tushar, When you run `git config --global user.email a...@xyz.com` it writes out this setting in ~/.gitconfig which is then considered to be "global" ie. this same email will be used for every repo, but ... You can always override this. Let's say there is a repo named "foo" in which you want

feature request: user email config per domain

2017-02-22 Thread Tushar Kapila
I can set my email via: git config --global user.email tgkp...@xyz.dom this is dangerous when I use this my office or in a multi repository provider environment where my email is different for a few (like tgkp...@search.com for github and tus...@mycompany.com for my company private repo). I know

[PATCH] Documentation: correctly spell git worktree --detach

2017-02-22 Thread brian m. carlson
The option is “--detach”, but we accidentally spelled it “--detached” at one point in the man page. Signed-off-by: brian m. carlson Reported-by: Casey Rodarmor --- Documentation/git-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1

Re: Fwd: Typo in worktree man page

2017-02-22 Thread brian m. carlson
On Tue, Feb 21, 2017 at 04:52:11PM -0800, Casey Rodarmor wrote: > Hi there, > > The git worktree man page mentions the `--detached` flag in the > section on `add`, but the flag is actually called `--detach`. Thanks for reporting this. I'll send a patch. -- brian m. carlson / brian with

[PATCH] Documentation: use brackets for optional arguments

2017-02-22 Thread brian m. carlson
The documentation for git blame used vertical bars for optional arguments to -M and -C, which is unusual and potentially confusing. Since most man pages use brackets for optional items, and that's consistent with how we document the same options for git diff and friends, use brackets here, too.

  1   2   >