Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-16 Thread Junio C Hamano
Junio C Hamano writes: > Lars Schneider writes: > >> A quick bisect indicates that this patch might break >> t9807-git-p4-submit.sh 8 and 13. I haven't looked into >> it further, yet. > > As I do not do P4, help in diagnosing why it breaks is

[PATCH] grep: fix build with no thread support

2017-03-16 Thread Rahul Bedarkar
Commit 0281e487fd91 ("grep: optionally recurse into submodules") added functions grep_submodule() and grep_submodule_launch() which uses "struct work_item" which is defined only when thread support is available. When building git with toolchain that don't have thread support, we get following

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-16 Thread Junio C Hamano
Lars Schneider writes: > A quick bisect indicates that this patch might break > t9807-git-p4-submit.sh 8 and 13. I haven't looked into > it further, yet. As I do not do P4, help in diagnosing why it breaks is appreciated. If the test script expects a commit, that can

Re: [GSoC][PATCH v5 3/3] credential-cache: add tests for XDG functionality

2017-03-16 Thread Junio C Hamano
Devin Lehmacher writes: > +# test that the daemon works with no special setup > helper_test cache > + > +test_expect_success 'socket defaults to ~/.cache/git/credential/socket' ' > + test_when_finished " > + git credential-cache exit && > + rmdir

Re: Commiting files larger than 4 GB on Windows

2017-03-16 Thread Torsten Bögershausen
On 15/03/17 22:29, Junio C Hamano wrote: Torsten Bögershausen writes: The real "show stopper" is at the end. ... == And it seams as if zlib is the limitation here. Unless we include the zlib source code into Git and redefine uLong, is there a nice way

Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-16 Thread Junio C Hamano
Stefan Beller writes: > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: >> Sync does some work determining what URLs should be used for a submodule >> but then throws this work away if the submodule isn't active. Instead >> perform the activity

Re: [PATCH] wt-status.c: improve readability for wt_shortstatus_print

2017-03-16 Thread Junio C Hamano
Jonathan Nieder writes: > Stefan Beller wrote: > >> Subject: wt-status.c: improve readability for wt_shortstatus_print > > Maybe: > > wt-status: simplify by using for_each_string_list_item > > Improve readability by using the for_each_string_list_item helper >

Re: [PATCH 4/5] Makefile: add USE_SHA1DC knob

2017-03-16 Thread Junio C Hamano
Jeff King writes: > On Thu, Mar 16, 2017 at 03:43:13PM -0700, Junio C Hamano wrote: > >> Jeff King writes: >> >> > +ifdef USE_SHA1DC >> > + LIB_OBJS += sha1dc/sha1.o >> > + LIB_OBJS += sha1dc/ubc_check.o >> > + BASIC_CFLAGS += -DSHA1_SHA1DC >> >> The name of

Re: [PATCH 0/2] Re-integrate sha1dc

2017-03-16 Thread Junio C Hamano
Jeff King writes: > On Thu, Mar 16, 2017 at 03:23:59PM -0700, Junio C Hamano wrote: > >> I am wondering if we should queue another one for .travis.yml on top >> to force use of USE_SHA1DC=YesPlease during the tests. I expect >> that we'd be encouraging its use for ordinary users

Re: [PATCH 2/2] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-16 Thread Lars Schneider
> On 16 Mar 2017, at 06:50, Junio C Hamano wrote: > > "git name-rev" assigned a phony "far in the future" date to tips of > refs that are not pointing at tag objects, and favored names based > on a ref with the oldest date. This made it almost impossible for > an unannotated

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Lars Schneider
> On 17 Mar 2017, at 11:18, Lars Schneider wrote: > > >> On 17 Mar 2017, at 03:22, Linus Torvalds >> wrote: >> >> I think there's a semantic merge error and it clashes with >> f18f816cb158 ("hash.h: move SHA-1 implementation selection

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Lars Schneider
> On 17 Mar 2017, at 03:22, Linus Torvalds > wrote: > > I think there's a semantic merge error and it clashes with > f18f816cb158 ("hash.h: move SHA-1 implementation selection into a > header file"). > > Suggested possible merge resolution attached. > >

[GSoC][PATCH v5 1/3] path.c: add xdg_cache_home

2017-03-16 Thread Devin Lehmacher
We already have xdg_config_home to format paths relative to XDG_CONFIG_HOME. Let's provide a similar function xdg_cache_home to do the same for paths relative to XDG_CACHE_HOME. Signed-off-by: Devin Lehmacher --- cache.h | 7 +++ path.c | 15 +++ 2 files

[GSoC][PATCH v5 3/3] credential-cache: add tests for XDG functionality

2017-03-16 Thread Devin Lehmacher
Signed-off-by: Devin Lehmacher --- t/t0301-credential-cache.sh | 94 + 1 file changed, 94 insertions(+) diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index 82c841121..82c4dfa07 100755 ---

[GSoC][PATCH v5 2/3] credential-cache: use XDG_CACHE_HOME for socket

2017-03-16 Thread Devin Lehmacher
Make git-credential-cache follow the XDG base path specification by default. This increases consistency with other applications and helps keep clutter out of users' home directories. Check the old socket location, ~/.git-credential-cache/, and use ~/.git-credential-cache/socket if that directory

Shared repositories no longer securable against privilege escalation

2017-03-16 Thread Joe Rayhawk
Git has started requiring write access to the root of bare repositories in order to create /HEAD.lock. This is a major security problem in shared environments as it also entails control over the /config link i.e. core.hooksPath. Permission to write objects and update refs should be entirely

Re: [PATCH 0/2] Re-integrate sha1dc

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 03:23:59PM -0700, Junio C Hamano wrote: > I am wondering if we should queue another one for .travis.yml on top > to force use of USE_SHA1DC=YesPlease during the tests. I expect > that we'd be encouraging its use for ordinary users without any > specific needs in the

Re: sequencer "edit" command always issues a warning

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 11:59:35PM +0100, Johannes Schindelin wrote: > I do not recall why I chose warning(); probably just an oversight on my > part. Your patch looks good. Thanks. Here it is with a commit message. I agree with Junio that if we had "info()" it would perhaps be the right thing

Getting ready for 2.12.1

2017-03-16 Thread Junio C Hamano
So far I've merged the following topics to 'maint' in preparation for the first maintenance update for 2.12: * Reduce authentication round-trip over HTTP when the server supports just a single authentication method. This also improves the behaviour when Git is misconfigured to enable

Re: [PATCH 4/5] Makefile: add USE_SHA1DC knob

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 03:43:13PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > +ifdef USE_SHA1DC > > + LIB_OBJS += sha1dc/sha1.o > > + LIB_OBJS += sha1dc/ubc_check.o > > + BASIC_CFLAGS += -DSHA1_SHA1DC > > The name of this CPP symbol is one difference between

Re: [PATCH v4 06/10] submodule: decouple url and submodule interest

2017-03-16 Thread Stefan Beller
On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: > Currently the submodule..url config option is used to determine if > a given submodule is of interest to the user. This ends up being > cumbersome in a world where we want to have different submodules checked > out in

Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-16 Thread Stefan Beller
On Thu, Mar 16, 2017 at 4:24 PM, Stefan Beller wrote: > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: >> Sync does some work determining what URLs should be used for a submodule >> but then throws this work away if the submodule isn't active.

Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-16 Thread Brandon Williams
On 03/16, Stefan Beller wrote: > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: > > Sync does some work determining what URLs should be used for a submodule > > but then throws this work away if the submodule isn't active. Instead > > perform the activity check

Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-16 Thread Stefan Beller
On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: > Sync does some work determining what URLs should be used for a submodule > but then throws this work away if the submodule isn't active. Instead > perform the activity check earlier and skip inactive submodule in order

Re: sequencer "edit" command always issues a warning

2017-03-16 Thread Johannes Schindelin
Hi Peff, On Thu, 16 Mar 2017, Jeff King wrote: > I was rebasing with the new built-in sequencer code today, and I was > surprised to see the use of warning() here: > > $ git rebase -i > [set one commit to 'edit'] > warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile

Re: Proposal for "fetch-any-blob Git protocol" and server design

2017-03-16 Thread Jonathan Tan
On 03/16/2017 02:17 PM, Junio C Hamano wrote: Yeah, the example was solely to see how the system was to be extended, as one of the selling point of the proposal was: > === Endpoint support for forward compatibility > > This "server" endpoint requires that the first line be

Re: [PATCH v2] short status: improve reporting for submodule changes

2017-03-16 Thread Jonathan Nieder
Stefan Beller wrote: > Jonathan Nieder wrote: >> Is it important to avoid clutter by showing the submodule only once? >> What would you think of showing whatever subset of those three >> statuses apply to a given submodule as separate lines instead, to >> match the information that long-form "git

Re: [PATCH] wt-status.c: improve readability for wt_shortstatus_print

2017-03-16 Thread Jonathan Nieder
Stefan Beller wrote: > Subject: wt-status.c: improve readability for wt_shortstatus_print Maybe: wt-status: simplify by using for_each_string_list_item Improve readability by using the for_each_string_list_item helper instead of manually iterating with an integer

Re: [PATCH 4/5] Makefile: add USE_SHA1DC knob

2017-03-16 Thread Junio C Hamano
Jeff King writes: > +ifdef USE_SHA1DC > + LIB_OBJS += sha1dc/sha1.o > + LIB_OBJS += sha1dc/ubc_check.o > + BASIC_CFLAGS += -DSHA1_SHA1DC The name of this CPP symbol is one difference between this and Linus's version. Wouldn't "-DSHA1_DC" make more sense? Another

Re: [PATCH v2] short status: improve reporting for submodule changes

2017-03-16 Thread Stefan Beller
> > Is it important to avoid clutter by showing the submodule only once? > What would you think of showing whatever subset of those three > statuses apply to a given submodule as separate lines instead, to > match the information that long-form "git status" shows? I considered it, but it would

Re: [PATCH 0/2] Re-integrate sha1dc

2017-03-16 Thread Linus Torvalds
On Thu, Mar 16, 2017 at 3:04 PM, Jeff King wrote: > > There are a few things I think are worth changing. The die() message > should mention the sha1 we computed. That will be a big help if an old > version of git tries to unknowingly push a colliding object to a newer > version.

[PATCH v4 09/10] submodule--helper init: set submodule..active

2017-03-16 Thread Brandon Williams
When initializing a submodule set the submodule..active config to true if the module hasn't already been configured to be active by some other means (e.g. a pathspec set in submodule.active). Signed-off-by: Brandon Williams --- builtin/submodule--helper.c | 7 +++

[PATCH v4 01/10] submodule--helper: add is-active subcommand

2017-03-16 Thread Brandon Williams
The definition of which submodules are of interest by the user is tied to the configuration submodule..url; when it is set to a non-empty string, it is of interest. We'd want to be able to later change this definition, but there are many places that explicitly check this condition in the scripted

[PATCH v4 10/10] submodule add: respect submodule.active and submodule..active

2017-03-16 Thread Brandon Williams
In addition to adding submodule..url to the config, set submodule..active to true unless submodule.active is configured and the submodule's path matches the configured pathspec. Signed-off-by: Brandon Williams --- git-submodule.sh | 12

[PATCH v4 07/10] submodule init: initialize active submodules

2017-03-16 Thread Brandon Williams
Teach `submodule init` to initialize submodules which have been configured to be active by setting 'submodule.active' with a pathspec. Now if no path arguments are given and 'submodule.active' is configured, `init` will initialize all submodules which have been configured to be active. If no

[PATCH v4 08/10] clone: teach --recurse-submodules to optionally take a pathspec

2017-03-16 Thread Brandon Williams
Teach clone --recurse-submodules to optionally take a pathspec argument which describes which submodules should be recursively initialized and cloned. If no pathspec is provided, --recurse-submodules will recursively initialize and clone all submodules by using a default pathspec of ".". In

[PATCH v4 04/10] submodule sync: use submodule--helper is-active

2017-03-16 Thread Brandon Williams
Signed-off-by: Brandon Williams --- git-submodule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 577136148..db94dea3b 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -1089,14 +1089,14 @@ cmd_sync()

[PATCH v4 00/10] decoupling url and submodule interest

2017-03-16 Thread Brandon Williams
Lots of changes in v4 to address comments by Junio, Ramsay, and Stefan. * Overhaul a lot of the commit messages (thanks Junio for helping wordsmith) * Change how submodule.active functions with `submodule init` and clone --recurse-submodules. This allowed me to not have to add additional

[PATCH v4 02/10] submodule status: use submodule--helper is-active

2017-03-16 Thread Brandon Williams
Signed-off-by: Brandon Williams --- git-submodule.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 136e26a2c..ab233712d 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -1010,14 +1010,13 @@ cmd_status()

[PATCH v4 05/10] submodule--helper clone: check for configured submodules using helper

2017-03-16 Thread Brandon Williams
Use the 'is_submodule_initialized()' helper to check for configured submodules instead of manually checking for the submodule's URL in the config. Signed-off-by: Brandon Williams --- builtin/submodule--helper.c | 15 +++ 1 file changed, 3 insertions(+), 12

[PATCH v4 06/10] submodule: decouple url and submodule interest

2017-03-16 Thread Brandon Williams
Currently the submodule..url config option is used to determine if a given submodule is of interest to the user. This ends up being cumbersome in a world where we want to have different submodules checked out in different worktrees or a more generalized mechanism to select which submodules are of

[PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-16 Thread Brandon Williams
Sync does some work determining what URLs should be used for a submodule but then throws this work away if the submodule isn't active. Instead perform the activity check earlier and skip inactive submodule in order to avoid doing unnecessary work. Signed-off-by: Brandon Williams

Re: sequencer "edit" command always issues a warning

2017-03-16 Thread Junio C Hamano
Jeff King writes: > I was rebasing with the new built-in sequencer code today, and I was > surprised to see the use of warning() here: > > $ git rebase -i > [set one commit to 'edit'] > warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile > name >

Re: [PATCH 0/2] Re-integrate sha1dc

2017-03-16 Thread Junio C Hamano
Jeff King writes: > On Thu, Mar 16, 2017 at 06:04:56PM -0400, Jeff King wrote: > >> So here's my version. It's on top of the hash.h tweak, as well. >> >> [1/5]: add collision-detecting sha1 implementation >> [2/5]: sha1dc: adjust header includes for git >> [3/5]: sha1dc:

Re: [PATCH v2] short status: improve reporting for submodule changes

2017-03-16 Thread Jonathan Nieder
Hi, Yay, I like the change this makes. So I'll nitpick in the hope that that makes the patch more likely to stick. Stefan Beller wrote: > While we already have a porcelain2 layer for git-status, that is accurate > for submodules, users still like the way they are are used to of > 'status -s'.

Re: [PATCH 0/2] Re-integrate sha1dc

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 06:04:56PM -0400, Jeff King wrote: > So here's my version. It's on top of the hash.h tweak, as well. > > [1/5]: add collision-detecting sha1 implementation > [2/5]: sha1dc: adjust header includes for git > [3/5]: sha1dc: disable safe_hash feature > [4/5]:

[PATCH 4/5] Makefile: add USE_SHA1DC knob

2017-03-16 Thread Jeff King
This knob lets you use the sha1dc implementation from: https://github.com/cr-marcstevens/sha1collisiondetection which can detect certain types of collision attacks (even when we only see half of the colliding pair). So it mitigates any attack which consists of getting the "good" half of a

[PATCH 3/5] sha1dc: disable safe_hash feature

2017-03-16 Thread Jeff King
The safe_hash feature is designed to make sha1dc a drop-in replacement for sha1, where colliding entries will get a permuted hash to un-collide them. However, since we're handling the collision case ourselves, this isn't helpful (and is actually harmful, as it means you get the wrong object id if

[PATCH 2/5] sha1dc: adjust header includes for git

2017-03-16 Thread Jeff King
We can replace system includes with git-compat-util.h or cache.h (and should make sure it is included first in all C files). And we can drop includes from headers entirely, as every C file should include git-compat-util.h itself. We will add in new include guards around the header files, though

RE: [PATCH] Put sha1dc on a diet

2017-03-16 Thread Dan Shumow
Great! Keep us posted if there is anything else that you would like from the code. Or anyway we can make the process go more smoothly. Thanks, Dan -Original Message- From: Jeff King [mailto:p...@peff.net] Sent: Thursday, March 16, 2017 3:06 PM To: Marc Stevens

Re: [PATCH 0/2] Re-integrate sha1dc

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 01:24:02PM -0700, Linus Torvalds wrote: > I suspect the first patch will not make it to the list since it's over > 100kB in size, but oh well.. Junio and Jeff will see it. Yep, it didn't make it, but I got it. > It "WorksForMe(tm)" and the integration patches are now

Re: [PATCH] Put sha1dc on a diet

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 07:22:14PM +0100, Marc Stevens wrote: > Today I merged the perf-branch into master after code review and correctness > testing. > So master is now more performant and safe to use. Great, thank you (and Dan) so much for all your work. We're looking at integrating this

Re: [PATCH 00/10] RFC Partial Clone and Fetch

2017-03-16 Thread Jeff Hostetler
On 3/9/2017 3:18 PM, Jonathan Tan wrote: Overall, this fetch/clone approach seems reasonable to me, except perhaps some unanswered questions (some of which are also being discussed elsewhere): - does the server need to tell us of missing blobs? - if yes, does the server need to tell us their

[PATCH] wt-status.c: improve readability for wt_shortstatus_print

2017-03-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- wt-status.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/wt-status.c b/wt-status.c index d47012048f..a52d342695 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1785,34 +1785,24 @@ static void

Re: Proposal for "fetch-any-blob Git protocol" and server design

2017-03-16 Thread Junio C Hamano
Jonathan Tan writes: > On 03/15/2017 10:59 AM, Junio C Hamano wrote: >> ... >> but I am wondering how you would extend the proposed system to do >> so. Would you add "fetch-size-limited-blob-in-tree-pack" that runs >> parallel to "fetch-blob-pack" request? Would you

Re: [GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality

2017-03-16 Thread Devin Lehmacher
> > > +test_expect_success 'credential-cache --socket option overrides default > > > location' ' > > > + test_when_finished "rm -rf \"$HOME\"/dir/" && > > > + check approve "cache --socket \"$HOME/dir/socket\"" <<-\EOF && > > > + protocol=https > > > + host=example.com > > > + username=store-user

[PATCH v2] short status: improve reporting for submodule changes

2017-03-16 Thread Stefan Beller
While we already have a porcelain2 layer for git-status, that is accurate for submodules, users still like the way they are are used to of 'status -s'. As a submodule has more state than a file potentially, we need more letters indicating these states, we'll go with lower 'm' and single '?' for

[PATCH 2/2] Integrate the sha1dc code with the git build

2017-03-16 Thread Linus Torvalds
From: Linus Torvalds Date: Thu, 16 Mar 2017 13:08:38 -0700 Subject: [PATCH 2/2] Integrate the sha1dc code with the git build This adds the proper magic to actually build the sha1dc code as part of git when USE_SHA1DC is enabled. This includes - adjusting the

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Linus Torvalds
On Thu, Mar 16, 2017 at 12:51 PM, Linus Torvalds wrote: > > I'll send a patch on top of 'next', which already has the header file changes. Patches sent. It all looked fairly straightforward to me, but maybe I missed something. Linus

[PATCH 0/2] Re-integrate sha1dc

2017-03-16 Thread Linus Torvalds
I suspect the first patch will not make it to the list since it's over 100kB in size, but oh well.. Junio and Jeff will see it. This is sent as two patches, just to have the original upstream code as a first step, and then the second patch does the small modifications to integrate it with

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Linus Torvalds
On Thu, Mar 16, 2017 at 12:46 PM, Junio C Hamano wrote: > > That's easy to answer. What we have on 'pu' is a fair game for > wholesale replacement. That is the whole point of not merging > topics in flux to 'next' and declaring that 'pu' will constantly > rewind. Ok. I'll

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Junio C Hamano
Linus Torvalds writes: > I think there's a semantic merge error and it clashes with > f18f816cb158 ("hash.h: move SHA-1 implementation selection into a > header file"). > > Suggested possible merge resolution attached. > >Linus Obviously I have

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Junio C Hamano
Linus Torvalds writes: > On Thu, Mar 16, 2017 at 12:41 PM, Jeff King wrote: >> >> Potentially we should just eject sha1dc from "pu" for the moment. It >> needs re-rolled with the most recent version of the collision library >> (and I see Marc just

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Linus Torvalds
On Thu, Mar 16, 2017 at 12:41 PM, Jeff King wrote: > > Potentially we should just eject sha1dc from "pu" for the moment. It > needs re-rolled with the most recent version of the collision library > (and I see Marc just posted that they hit a stable point, which is > perhaps why

Re: USE_SHA1DC is broken in pu

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 12:22:00PM -0700, Linus Torvalds wrote: > I think there's a semantic merge error and it clashes with > f18f816cb158 ("hash.h: move SHA-1 implementation selection into a > header file"). > > Suggested possible merge resolution attached. Yeah, your resolution makes sense.

USE_SHA1DC is broken in pu

2017-03-16 Thread Linus Torvalds
I think there's a semantic merge error and it clashes with f18f816cb158 ("hash.h: move SHA-1 implementation selection into a header file"). Suggested possible merge resolution attached. Linus Makefile | 2 +- hash.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)

Re: [PATCH]v2 adding built-in driver for javascript

2017-03-16 Thread Brandon Williams
On 03/16, Christian Couder wrote: > On Thu, Mar 16, 2017 at 7:56 PM, Junio C Hamano wrote: > > Christian Couder writes: > > > >> On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal > >> wrote: > >>> javascript is one of the

Re: [PATCH]v2 adding built-in driver for javascript

2017-03-16 Thread Christian Couder
On Thu, Mar 16, 2017 at 7:56 PM, Junio C Hamano wrote: > Christian Couder writes: > >> On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal >> wrote: >>> javascript is one of the famous langugae,it's needs a built-in driver.

Re: [PATCH v2 4/5] replace snprintf with odb_pack_name()

2017-03-16 Thread Junio C Hamano
Jeff King writes: >> so that we can always use name.buf without having to do "?:" thing. > > See the next patch. :) Nice ;-) Thanks, queued the whole thing.

Re: [PATCH]v2 adding built-in driver for javascript

2017-03-16 Thread Junio C Hamano
Christian Couder writes: > On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal > wrote: >> javascript is one of the famous langugae,it's needs a built-in driver. > > Please use "Javascript" instead of "javascript". While we are typo-spotting

Re: [PATCH]v2 adding built-in driver for javascript

2017-03-16 Thread Christian Couder
On Mon, Mar 13, 2017 at 9:08 PM, sourav mondal wrote: > javascript is one of the famous langugae,it's needs a built-in driver. Please use "Javascript" instead of "javascript". There is a typo in "language" above, also maybe "it needs" instead of "it's needs", and

Re: [PATCH v2 4/5] replace snprintf with odb_pack_name()

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 11:33:36AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > + struct strbuf name = STRBUF_INIT; > > int err; > > > > if (!from_stdin) { > > @@ -1402,14 +1402,13 @@ static void final(const char *final_pack_name, > > const char

Re: [PATCH v2 4/5] replace snprintf with odb_pack_name()

2017-03-16 Thread Junio C Hamano
Jeff King writes: > + struct strbuf name = STRBUF_INIT; > int err; > > if (!from_stdin) { > @@ -1402,14 +1402,13 @@ static void final(const char *final_pack_name, const > char *curr_pack_name, > int keep_fd, keep_msg_len = strlen(keep_msg); > >

Re: [GSoC][PATCH v4 2/4] dir: add directory_exists

2017-03-16 Thread Junio C Hamano
Junio C Hamano writes: > Devin Lehmacher writes: > >> +int directory_exists(const char *path) >> +{ >> +struct stat sb; >> +int ret = lstat(path, ); >> +return ret == 0 && S_ISDIR(sb.st_mode); >> +} > > I am not a great fan of using

Re: [PATCH] Put sha1dc on a diet

2017-03-16 Thread Marc Stevens
Hi all, Today I merged the perf-branch into master after code review and correctness testing. So master is now more performant and safe to use. -- Marc

Re: [GSoC][PATCH v4 3/4] credential-cache: use XDG_CACHE_HOME for socket

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 09:20:29AM -0700, Junio C Hamano wrote: > static char *get_socket_path(void) > { > struct stat st; > char *path; > > path = expand_user_path("~/.git-credential-cache"); > if (path && !stat(path, ) && S_ISDIR(st.st_mode))) { >

Re: [GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 09:29:58AM -0700, Junio C Hamano wrote: > Devin Lehmacher writes: > > > @@ -20,4 +21,67 @@ helper_test_timeout cache --timeout=1 > > # our socket, leaving us with no way to access the daemon. > > git credential-cache exit > > > > +# we need to use

Re: [PATCH v2 2/5] sha1_file.c: make pack-name helper globally accessible

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 05:03:03PM +, Ramsay Jones wrote: > > Incidentally, this entire function could be implemented as: > > > > return git_path_buf(buf, "objects/pack/pack-%s.%s", > > sha1_to_hex(sha1), ext); > > > > as the git_path() functions are smart enough to

Re: Proposal for "fetch-any-blob Git protocol" and server design

2017-03-16 Thread Jonathan Tan
On 03/15/2017 10:59 AM, Junio C Hamano wrote: By "SHA-1s for which it wants blobs", you mean that "want" only allows one exact blob object name? I think it is necessary to support that mode of operation as a base case, and it is a good starting point. When you know - you have a "partial"

Re: [PATCH v2 2/5] sha1_file.c: make pack-name helper globally accessible

2017-03-16 Thread Ramsay Jones
On 16/03/17 14:31, Jeff King wrote: > On Thu, Mar 16, 2017 at 10:27:06AM -0400, Jeff King wrote: > >> -/* >> - * Return the name of the pack or index file with the specified sha1 >> - * in its filename. *base and *name are scratch space that must be >> - * provided by the caller. which should

Re: [PATCH v3 09/10] submodule--helper init: set submodule..active

2017-03-16 Thread Junio C Hamano
Brandon Williams writes: > So if we did > > git clone --submodule-spec=lib/ > > then each module under 'lib/' won't have their submodule..active > config set since submodule.active=lib/ already encompasses them. Ah, OK. That removes my worries ;-) Thanks for an

Viewing untracked+stashed files in git stash show

2017-03-16 Thread Okash Khawaja
Hi, If you have some untracked files and your run `git stash -u`. Then `git stash show` doesn't show the untracked files. Is there a flag that can be passed to git stash show to report untracked files? Thanks, Okash

Re: [GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality

2017-03-16 Thread Junio C Hamano
Devin Lehmacher writes: > @@ -20,4 +21,67 @@ helper_test_timeout cache --timeout=1 > # our socket, leaving us with no way to access the daemon. > git credential-cache exit > > +# we need to use rm -rf here since sometimes the daemon hasn't finished > +# cleaning up after

Re: [GSoC][PATCH v4 3/4] credential-cache: use XDG_CACHE_HOME for socket

2017-03-16 Thread Junio C Hamano
Devin Lehmacher writes: > + If your home directory is on a network-mounted filesystem, you > + may need to change this to a local filesystem. You must specify > + an absolute path. Nicely explained. If a socket cannot be created in "~/.git-credential-cache",

Re: [GSoC][PATCH v4 2/4] dir: add directory_exists

2017-03-16 Thread Junio C Hamano
Devin Lehmacher writes: > +int directory_exists(const char *path) > +{ > + struct stat sb; > + int ret = lstat(path, ); > + return ret == 0 && S_ISDIR(sb.st_mode); > +} I am not a great fan of using file_exists() [*1*] on anything other than paths in the working

Re: [PATCH v2 5/5] index-pack: make pointer-alias fallbacks safer

2017-03-16 Thread Ramsay Jones
On 16/03/17 14:27, Jeff King wrote: > The final() function accepts a NULL value for certain > parameters, and falls back to writing into a reusable "name" > buffer, and then either: > > 1. For "keep_name", requiring all uses to do "keep_name ? > keep_name : name.buf". This is awkward,

Re: [PATCH v2 4/5] replace snprintf with odb_pack_name()

2017-03-16 Thread Ramsay Jones
On 16/03/17 14:27, Jeff King wrote: > In several places we write the name of the pack filename > into a fixed-size buffer using snprintf(), but do not check > the return value. As a result, a very long object directory > could cause us to quietly truncate the pack filename > (potentially

Re: [PATCH v2 2/5] sha1_file.c: make pack-name helper globally accessible

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 10:27:06AM -0400, Jeff King wrote: > -/* > - * Return the name of the pack or index file with the specified sha1 > - * in its filename. *base and *name are scratch space that must be > - * provided by the caller. which should be "pack" or "idx". > - */ > -static char

[PATCH v2 5/5] index-pack: make pointer-alias fallbacks safer

2017-03-16 Thread Jeff King
The final() function accepts a NULL value for certain parameters, and falls back to writing into a reusable "name" buffer, and then either: 1. For "keep_name", requiring all uses to do "keep_name ? keep_name : name.buf". This is awkward, and it's easy to accidentally look at the

[PATCH v2 3/5] odb_pack_keep(): stop generating keepfile name

2017-03-16 Thread Jeff King
The odb_pack_keep() function generates the name of a .keep file and opens it. This has two problems: 1. It requires a fixed-size buffer to create the filename and doesn't notice when the result is truncated. 2. Of the two callers, one sometimes wants to open a filename it already

[PATCH v2 4/5] replace snprintf with odb_pack_name()

2017-03-16 Thread Jeff King
In several places we write the name of the pack filename into a fixed-size buffer using snprintf(), but do not check the return value. As a result, a very long object directory could cause us to quietly truncate the pack filename (potentially leading to a corrupted repository, as a newly written

[PATCH v2 1/5] move odb_* declarations out of git-compat-util.h

2017-03-16 Thread Jeff King
These functions were originally conceived as wrapper functions similar to xmkstemp(). They were later moved by 463db9b10 (wrapper: move odb_* to environment.c, 2010-11-06). The more appropriate place for a declaration is in cache.h. While we're at it, let's add some basic docstrings.

[PATCH v2 2/5] sha1_file.c: make pack-name helper globally accessible

2017-03-16 Thread Jeff King
We provide sha1_pack_name() and sha1_pack_index_name(), but the more generic form (which takes its own strbuf and an arbitrary extension) is only used to implement the other two. Let's make it available, but clean up a few things: 1. Name it odb_pack_name(), as the original

[PATCH v2 0/5] minor pack-name cleanups

2017-03-16 Thread Jeff King
Here's a re-roll of the series from: http://public-inbox.org/git/20170315212617.6x57bvltinuoz...@sigill.intra.peff.net/ The general gist is the same, but there are a number of changes: - I dropped the first patch factoring out finalize_file(), as Ramsay pointed out a subtle difference

sequencer "edit" command always issues a warning

2017-03-16 Thread Jeff King
I was rebasing with the new built-in sequencer code today, and I was surprised to see the use of warning() here: $ git rebase -i [set one commit to 'edit'] warning: stopped at 6ce6b914a... odb_pack_keep(): stop generating keepfile name You can amend the commit now, with [...more

Re: [PATCH] Makefile: escape ' in bin-wrappers rule

2017-03-16 Thread Jeff King
On Thu, Mar 16, 2017 at 02:17:38AM -0400, Devin Lehmacher wrote: > If the pwd contains a ' escape it as '\'' so that git will not fail > while building on a path containing '. I think this only fixes half the problem... > diff --git a/Makefile b/Makefile > index ed68700ac..5cf5d8537 100644 >

Re: [PATCH 0/2] Teach name-rev to pay more attention to lightweight tags

2017-03-16 Thread Jacob Keller
On Wed, Mar 15, 2017 at 3:50 PM, Junio C Hamano wrote: > Here is a reroll of what I did in > > http://public-inbox.org/git/xmqqd1die00j@gitster.mtv.corp.google.com/ > > Junio C Hamano (2): > name-rev: refactor logic to see if a new candidate is a better name >

Re: Finding a tag that introduced a submodule change

2017-03-16 Thread Jacob Keller
On Wed, Mar 15, 2017 at 10:10 AM, Stefan Beller wrote: > On Fri, Mar 3, 2017 at 7:40 AM, Robert Dailey > wrote: >> I have a repository with a single submodule in it. Since the parent >> repository represents the code base for an actual product, I

[PATCH] Makefile: escape ' in bin-wrappers rule

2017-03-16 Thread Devin Lehmacher
If the pwd contains a ' escape it as '\'' so that git will not fail while building on a path containing '. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed68700ac..5cf5d8537 100644 --- a/Makefile +++ b/Makefile @@ -2276,7 +2276,7 @@