Re: lib-httpd/apache.conf and mod_unixd.so

2016-06-12 Thread Duy Nguyen
On Sun, Jun 12, 2016 at 8:00 PM, Jeff King wrote: > On Sun, Jun 12, 2016 at 05:48:42PM +0700, Duy Nguyen wrote: > >> A quick search shows that loading mod_unixd.so will do (and did make >> httpd run for me). Problem is, can I just update apache.conf to load >> it when apache

[PATCH] Document the 'svn propset' command.

2016-06-12 Thread Alfred Perlstein
Junio + all, A week ago I was requested to provide documentation for the 'svn propset' command. I have attached a diff off of the 'maint' branch for this, however it seems to apply cleanly to 'master' as well. Thank you for your patience. This is also available on my github here:

Re: [GIT PULL] l10n updates for 2.9.0 rc0

2016-06-12 Thread Junio C Hamano
Jiang Xin writes: > Please pull the following git l10n updates. > > The following changes since commit 3a0f269e7c82aa3a87323cb7ae04ac5f129f036b: > > Git 2.9-rc0 (2016-05-23 15:02:48 -0700) > > are available in the git repository at: > >

[PATCH 1/3] repack: document --unpack-unreachable option

2016-06-12 Thread Jeff King
This was added back in 7e52f56 (gc: do not explode objects which will be immediately pruned, 2012-04-07), but not documented at the time, since it was an internal detail between git-gc and git-repack. However, as people with complicated setups may want to effectively reimplement the steps of

[PATCH 0/3] repack --keep-unreachable

2016-06-12 Thread Jeff King
On Sun, Jun 12, 2016 at 07:43:27PM -0600, Nasser Grainawi wrote: > On Jun 12, 2016, at 4:13 PM, Jeff King wrote: > > > >At GitHub we actually have a patch to `repack` that keeps all > >objects, reachable or not, in the pack, and use it for all of our > >automated

[PATCH 2/3] repack: add --keep-unreachable option

2016-06-12 Thread Jeff King
The usual way to do a full repack (and what is done by git-gc) is to run "repack -Ad --unpack-unreachable=", which will loosen any unreachable objects newer than "", and drop any older ones. This is a safer alternative to "repack -ad", because "" becomes a grace period during which we will not

[PATCH 3/3] repack: extend --keep-unreachable to loose objects

2016-06-12 Thread Jeff King
If you use "repack -adk" currently, we will pack all objects that are already packed into the new pack, and then drop the old packs. However, loose unreachable objects will be left as-is. In theory these are meant to expire eventually with "git prune". But if you are using "repack -k", you

Re: Repacking a repository uses up all available disk space

2016-06-12 Thread Jeff King
On Mon, Jun 13, 2016 at 07:24:51AM +0700, Duy Nguyen wrote: > >> - git fsck --full > >> - git repack -Adl -b --pack-kept-objects > >> - git pack-refs --all > >> - git prune > >> > >> The reason it's split into repack + prune instead of just gc is because > >> we use alternates to save on disk

[PATCH 0/3] fix parse-opt string_list leaks

2016-06-12 Thread Jeff King
On Mon, Jun 13, 2016 at 07:08:55AM +0700, Duy Nguyen wrote: > > So if we are doing the conservative thing, then I think the resulting > > code should either look like: > > > > if (!v->strdup_strings) > > die("BUG: OPT_STRING_LIST should always use strdup_strings"); > >

[PATCH 2/3] interpret-trailers: don't duplicate option strings

2016-06-12 Thread Jeff King
There's no need to do so; the argv strings will last until the end of the program. Signed-off-by: Jeff King --- builtin/interpret-trailers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/interpret-trailers.c b/builtin/interpret-trailers.c index

[PATCH 3/3] blame,shortlog: don't make local option variables static

2016-06-12 Thread Jeff King
There's no need for these option variables to be static, except that they are referenced by the options array itself, which is static. But having all of this static is simply unnecessary and confusing (and inconsistent with most other commands, which either use a static global option list or a

[no subject]

2016-06-12 Thread Financial Service
Greetings, Have you been looking for finance options for your new home purchase, construction, refinance, medical cash, family cash, personal or business purpose. Welcome to the future! Finance made easy with us. Contact us as we offer our finance service at a low and affordable interest rate

Re: [PATCH] lib-httpd.sh: print error.log on error

2016-06-12 Thread Jeff King
On Sun, Jun 12, 2016 at 05:41:54PM +0700, Nguyễn Thái Ngọc Duy wrote: > Failure to bring up httpd for testing is not considered an error, so the > trash directory, which contains this error.log file, is removed and we > don't know what made httpd fail to start. Improve the situation a bit. > >

Re: lib-httpd/apache.conf and mod_unixd.so

2016-06-12 Thread Jeff King
On Sun, Jun 12, 2016 at 05:48:42PM +0700, Duy Nguyen wrote: > A quick search shows that loading mod_unixd.so will do (and did make > httpd run for me). Problem is, can I just update apache.conf to load > it when apache version >= 2.4? I don't know if doing that would cause > failure for other

Re: Repacking a repository uses up all available disk space

2016-06-12 Thread Jeff King
On Sun, Jun 12, 2016 at 05:25:14PM -0400, Konstantin Ryabitsev wrote: > Hello: > > I have a problematic repository that: > > - Takes up 9GB on disk > - Passes 'git fsck --full' with no errors > - When cloned with --mirror, takes up 38M on the target system Cloning will only copy the objects

Re: [PATCH] parse-options-cb.c: use string_list_append_nodup in OPT_STRING_LIST()

2016-06-12 Thread Jeff King
On Fri, Jun 10, 2016 at 06:57:26PM +0700, Nguyễn Thái Ngọc Duy wrote: > If the given string list has strdup_strings set (*), the string will be > duplicated again. Pointless and leak memory. Ignore that flag. > > (*) only interpret-trailers.c does it at the moment > > Signed-off-by: Nguyễn Thái

Re: Repacking a repository uses up all available disk space

2016-06-12 Thread Konstantin Ryabitsev
On Sun, Jun 12, 2016 at 05:38:04PM -0400, Jeff King wrote: > > - When attempting to repack, creates millions of files and eventually > > eats up all available disk space > > That means these objects fall into the unreachable category. Git will > prune unreachable loose objects after a grace

Repacking a repository uses up all available disk space

2016-06-12 Thread Konstantin Ryabitsev
Hello: I have a problematic repository that: - Takes up 9GB on disk - Passes 'git fsck --full' with no errors - When cloned with --mirror, takes up 38M on the target system - When attempting to repack, creates millions of files and eventually eats up all available disk space Repacking the

Re: Repacking a repository uses up all available disk space

2016-06-12 Thread Jeff King
On Sun, Jun 12, 2016 at 05:54:36PM -0400, Konstantin Ryabitsev wrote: > > git gc --prune=now > > You are correct, this solves the problem, however I'm curious. The usual > maintenance for these repositories is a regular run of: > > - git fsck --full > - git repack -Adl -b --pack-kept-objects

Re: [PATCH] parse-options-cb.c: use string_list_append_nodup in OPT_STRING_LIST()

2016-06-12 Thread Duy Nguyen
On Mon, Jun 13, 2016 at 5:03 AM, Jeff King wrote: > On Fri, Jun 10, 2016 at 06:57:26PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> If the given string list has strdup_strings set (*), the string will be >> duplicated again. Pointless and leak memory. Ignore that flag. >> >> (*) only

Re: Repacking a repository uses up all available disk space

2016-06-12 Thread Duy Nguyen
On Mon, Jun 13, 2016 at 5:13 AM, Jeff King wrote: > On Sun, Jun 12, 2016 at 05:54:36PM -0400, Konstantin Ryabitsev wrote: > >> > git gc --prune=now >> >> You are correct, this solves the problem, however I'm curious. The usual >> maintenance for these repositories is a regular

Re: Repacking a repository uses up all available disk space

2016-06-12 Thread Nasser Grainawi
On Jun 12, 2016, at 4:13 PM, Jeff King wrote: > >At GitHub we actually have a patch to `repack` that keeps all >objects, reachable or not, in the pack, and use it for all of our >automated maintenance. Since we don't drop objects at all, we can't >ever have such a

DONATION OF $ 1.5 MILLION DOLLARS!!!

2016-06-12 Thread Colin & Chris Weir
My wife and I have awarded you with a donation of $ 1.5 million Dollars from part of our Jackpot Lottery of 161,653,000 Million Pounds, send your name,address, phone for claims. View http://www.bbc.co.uk/news/uk-scotland-glasgow-west-18801698 We await your earliest response and God Bless you.

Re: feature request: git svn dommit --preserve-timestamps

2016-06-12 Thread Peter Münster
On Sat, Jun 11 2016, Eric Wong wrote: > I'm sorry for your situation and hoping you migrate off SVN > entirely, soon :) I've done so, but my customer won't. He wants the code in his svn-repo. > Maybe you could look at how the _use_log_author and > _add_author_from options work. I've forgotten

[PATCH] lib-httpd.sh: print error.log on error

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Failure to bring up httpd for testing is not considered an error, so the trash directory, which contains this error.log file, is removed and we don't know what made httpd fail to start. Improve the situation a bit. Signed-off-by: Nguyễn Thái Ngọc Duy --- t/lib-httpd.sh | 1 +

Re: [PATCH 3/4] dir: introduce file_size() to check the size of file

2016-06-12 Thread Torsten Bögershausen
>> So what I understand, you want something like this: >> >> +ssize_t file_size_not_zero(const char *filename) >> +{ >> + struct stat st; >> + if (stat(filename, ) < 0) >> + return -1; >> + return !!st.st_size); >> +} > > For the purpose of bisect_reset(), Yes. BTW

[PATCH v2 09/27] upload-pack: make check_non_tip() clean things up on error

2016-06-12 Thread Nguyễn Thái Ngọc Duy
On error check_non_tip() will die and not closing file descriptors is no big deal. The next patch will split the majority of this function out for reuse in other cases, where die() may not be the only outcome. Same story for popping SIGPIPE out of the signal chain. So let's make sure we clean

[PATCH v2 17/27] fetch: define shallow boundary with --shallow-since

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 4 Documentation/git-fetch-pack.txt| 4 Documentation/gitremote-helpers.txt | 3 +++ builtin/fetch-pack.c| 4

[PATCH v2 13/27] fetch-pack.c: mark strings for translating

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- fetch-pack.c | 75 ++-- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c index

[PATCH v2 15/27] shallow.c: implement a generic shallow boundary finder based on rev-list

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Instead of a custom commit walker like get_shallow_commits(), this new function uses rev-list to mark NOT_SHALLOW to all reachable commits, except borders. The definition of reachable is to be defined by the protocol later. This makes it more flexible to define shallow boundary. The way we find

[PATCH v2 06/27] upload-pack: move "unshallow" sending code out of deepen()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Also add some more comments in this code because it takes too long to understand what it does (to me, who should be familiar enough to understand this code well!) Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 43 ++- 1 file

[PATCH v2 10/27] upload-pack: move rev-list code out of check_non_tip()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 7ce97ec..93c0522 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -451,7 +451,7

[PATCH v2 20/27] refs: add expand_ref()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
This is basically dwim_ref() without @{} support. To be used on the server side where we want to expand abbreviated to full ref names and nothing else. The first user is "git clone/fetch --shallow-exclude". Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano

[PATCH v2 18/27] clone: define shallow clone boundary based on time with --shallow-since

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 3 +++ builtin/clone.c | 16 +--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Documentation/git-clone.txt

[PATCH v2 22/27] fetch: define shallow boundary with --shallow-exclude

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 5 + Documentation/git-fetch-pack.txt| 5 + Documentation/gitremote-helpers.txt | 4 builtin/fetch-pack.c| 7

[PATCH v2 19/27] t5500, t5539: tests for shallow depth since a specific date

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t5500-fetch-pack.sh | 24 t/t5539-fetch-http-shallow.sh | 25 + 2 files changed, 49 insertions(+) diff --git

[PATCH v2 25/27] upload-pack: split check_unreachable() in two, prep for get_reachable_list()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 56 ++-- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index acc6d97..adb8e33 100644 --- a/upload-pack.c +++

[PATCH v2 24/27] t5500, t5539: tests for shallow depth excluding a ref

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t5500-fetch-pack.sh | 21 + t/t5539-fetch-http-shallow.sh | 22 ++ 2 files changed, 43 insertions(+) diff --git a/t/t5500-fetch-pack.sh

[PATCH v2 21/27] upload-pack: support define shallow boundary by excluding revisions

2016-06-12 Thread Nguyễn Thái Ngọc Duy
This should allow the user to say "create a shallow clone of this branch after version ". Short refs are accepted and expanded at the server side with expand_ref() because we cannot expand (unknown) refs from the client side. Like deepen-since, deepen-not cannot be used with deepen. But

[PATCH v2 23/27] clone: define shallow clone boundary with --shallow-exclude

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 5 + builtin/clone.c | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/git-clone.txt

[PATCH v2 26/27] upload-pack: add get_reachable_list()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- object.h | 2 +- upload-pack.c | 52 +--- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/object.h b/object.h index f8b6442..614a006 100644 --- a/object.h +++

[PATCH v2 16/27] upload-pack: add deepen-since to cut shallow repos based on time

2016-06-12 Thread Nguyễn Thái Ngọc Duy
This should allow the user to say "create a shallow clone containing the work from last year" (once the client side is fixed up, of course). In theory deepen-since and deepen (aka --depth) can be used together to draw the shallow boundary (whether it's intersection or union is up to discussion,

[PATCH v2 05/27] upload-pack: remove unused variable "backup"

2016-06-12 Thread Nguyễn Thái Ngọc Duy
After the last patch, "result" and "backup" are the same. "result" used to move, but the movement is now contained in send_shallow(). Delete this redundant variable. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- upload-pack.c | 9

[PATCH v2 07/27] upload-pack: use skip_prefix() instead of starts_with()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- upload-pack.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 73a8b28..fa7ce09 100644 ---

[PATCH v2 12/27] fetch-pack: use a common function for verbose printing

2016-06-12 Thread Nguyễn Thái Ngọc Duy
This reduces the number of "if (verbose)" which makes it a bit easier to read imo. It also makes it easier to redirect all these printouts, to a file for example. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- fetch-pack.c | 88

[PATCH v2 04/27] upload-pack: move "shallow" sending code out of deepen()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- upload-pack.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 97ed620..0eb9a0b 100644 ---

[PATCH v2 02/27] transport-helper.c: refactor set_helper_option()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
For now we can handle two types, string and boolean, in set_helper_option(). Later on we'll add string_list support, which does not fit well. The new function strbuf_set_helper_option() can be reused for a separate function that handles string-list. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH v2 01/27] remote-curl.c: convert fetch_git() to use argv_array

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- remote-curl.c | 46 ++ 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/remote-curl.c b/remote-curl.c index c704857..fd030c1

[PATCH v2 14/27] fetch-pack: use a separate flag for fetch in deepening mode

2016-06-12 Thread Nguyễn Thái Ngọc Duy
The shallow repo could be deepened or shortened when then user gives --depth. But in future that won't be the only way to deepen/shorten a repo. Stop relying on args->depth in this mode. Future deepening methods can simply set this flag on instead of updating all these if expressions. The new

[PATCH v2 03/27] upload-pack: move shallow deepen code out of receive_needs()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
This is a prep step for further refactoring. Besides reindentation and s/shallows\./shallows->/g, no other changes are expected. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- upload-pack.c | 99

[PATCH v2 00/27] nd/shallow-deepen updates

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Second update to address Junio comments. Interdiff diff --git a/upload-pack.c b/upload-pack.c index ef693bd..e40d15a 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -453,6 +453,9 @@ static int is_our_ref(struct object *o) return o->flags & ((allow_hidden_ref ? HIDDEN_REF : 0) |

[PATCH v2 11/27] fetch-pack: use skip_prefix() instead of starts_with()

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/fetch-pack.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index 9b2a514..8332d3d 100644 ---

[PATCH v2 08/27] upload-pack: tighten number parsing at "deepen" lines

2016-06-12 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- upload-pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index fa7ce09..8f4d7f4 100644 --- a/upload-pack.c +++ b/upload-pack.c

lib-httpd/apache.conf and mod_unixd.so

2016-06-12 Thread Duy Nguyen
I need help from apache experts. On my system (gentoo 64bit, apache-2.4.20), running an httpd test gives me -- 8< -- Initialized empty Git repository in /home/pclouds/w/git/temp/t/trash directory.t5539-fetch-http-shallow/.git/ checking prerequisite: NOT_ROOT mkdir -p

[PATCH v2 27/27] fetch, upload-pack: --deepen=N extends shallow boundary by N commits

2016-06-12 Thread Nguyễn Thái Ngọc Duy
In git-fetch, --depth argument is always relative with the latest remote refs. This makes it a bit difficult to cover this use case, where the user wants to make the shallow history, say 3 levels deeper. It would work if remote refs have not moved yet, but nobody can guarantee that, especially