Re: Feature request: Add --no-edit to git tag command

2019-04-03 Thread Taylor Blau
Hi Peff, On Wed, Apr 03, 2019 at 09:57:44PM -0400, Jeff King wrote: > On Wed, Apr 03, 2019 at 09:38:02AM -0500, Robert Dailey wrote: > > > Similar to git commit, it would be nice to have a --no-edit option for > > git tag. Use case is when I force-recreate a tag: > > > > $ git tag -af 1.0 123abc >

Re: [PATCH v2 2/2] diff: batch fetching of missing blobs

2019-04-03 Thread SZEDER Gábor
On Fri, Mar 29, 2019 at 02:39:28PM -0700, Jonathan Tan wrote: > diff --git a/t/t4067-diff-partial-clone.sh b/t/t4067-diff-partial-clone.sh > new file mode 100755 > index 00..349851be7d > --- /dev/null > +++ b/t/t4067-diff-partial-clone.sh > @@ -0,0 +1,103 @@ > +#!/bin/sh > + > +test_descrip

Re: [PATCH v2.5 2/2] tag: prevent nested tags

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 02:33:18PM -0700, Denton Liu wrote: > > I am not sure if this is so bad, actually. Why do we need to treat > > it as a mistake? When a command that wants a commit is fed a tag > > (either a tag that directly refers to a commit, or a tag that tags > > another tag that refe

Re: Feature request: Add --no-edit to git tag command

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 09:38:02AM -0500, Robert Dailey wrote: > Similar to git commit, it would be nice to have a --no-edit option for > git tag. Use case is when I force-recreate a tag: > > $ git tag -af 1.0 123abc > > An editor will be prompted with the previous annotated tag message. I > wou

Re: [PATCH 0/2] create FLEX_ALLOC_MEM to FLEX_ALLOC_STR cocci rule

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 03:00:03PM -0700, Denton Liu wrote: > I was playing around with coccinelle and I noticed that we have a use of > FLEX_ALLOC_MEM that could be converted into FLEX_ALLOC_STR. Convert it > and write a cocci rule to prevent this from happening. > > Note that this was more of a

Re: [PATCH] revision: use a prio_queue to hold rewritten parents

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 09:41:09PM -0400, Jeff King wrote: > A few items to note: > > - the cache-list tweak does improve the bad case for llvm-project.git > that started my digging into this problem. But it performs terribly > on linux.git, barely helping at all. Oops, that should be

[PATCH] revision: use a prio_queue to hold rewritten parents

2019-04-03 Thread Jeff King
On Tue, Apr 02, 2019 at 09:27:56AM -0400, Jeff King wrote: > On Tue, Apr 02, 2019 at 11:31:59AM +, Björn Pettersson A wrote: > > > Example: > > > > Run "git log --parents" for an old file (bswap.ll), and a brand new file > > (dummy). > > Interesting case. I was able to reproduce it here pr

Re: Bad performance when using git log --parents (used by gitk)

2019-04-03 Thread Jeff King
On Tue, Apr 02, 2019 at 08:20:05PM +0200, Johannes Schindelin wrote: > > Hitting some quadratic complexity algorithm explains why the "degradation" > > is so huge. And if I understand it correctly we are more or less "unlucky" > > to hit such access patterns more often in the new repo. > > > > Any

Re: [PATCH] clone: do faster object check for partial clones

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 01:57:48PM -0700, Jonathan Tan wrote: > > This isn't strictly true, since we could get objects from elsewhere via > > --shared or --reference. Those might not be promisor objects. > > I don't think local clones (which --shared or --reference implies) can > be partial, but

Re: Questions on GSoC 2019 Ideas

2019-04-03 Thread Matheus Tavares Bernardino
Hi, I've been studying the codebase and looking for older emails in the ML that discussed what I want to propose as my GSoC project. In particular, I found a thread about slow git commands on chromium, so I reached them out at chromium's ML to ask if it's still an issue. I got the following answer

Re: [PATCH] clone: do faster object check for partial clones

2019-04-03 Thread Josh Steadmon
On 2019.04.03 13:57, Jonathan Tan wrote: > > On Wed, Apr 03, 2019 at 10:27:21AM -0700, Josh Steadmon wrote: > > > > > For partial clones, doing a full connectivity check is wasteful; we skip > > > promisor objects (which, for a partial clone, is all known objects), and > > > excluding them all fro

Re: [PATCH v2 4/4] dir: do not traverse repositories with no commits

2019-04-03 Thread Kyle Meyer
Junio C Hamano writes: > Kyle Meyer writes: >> As the required update to t3700-add shows, being looser with the check >> means that we're stricter when adding empty repositories to the index: >> >> % git add repo >> warning: adding embedded git repository: repo >> hint: You've added anoth

Re: [PATCH v2 2/4] t3000: move non-submodule repo test to separate file

2019-04-03 Thread Kyle Meyer
Junio C Hamano writes: > Kyle Meyer writes: > >> a2d5156c2b (resolve_gitlink_ref: ignore non-repository paths, >> 2016-01-22) added a test to t3000-ls-files-others.sh to check that >> 'ls-files -o' does not die() when given a subdirectory that looks like >> a repository but is actually a subdire

fatal: ... is already checked out at ...

2019-04-03 Thread Mark Kharitonov
Hi, Please, observe: C:\Dayforce\56 [release/r-856 ≡]> git --version git version 2.18.0.windows.1 C:\Dayforce\56 [release/r-856 ≡]> git worktree list C:/Dayforce/tipc80539e06d [arch/shelve/532684] C:/Dayforce/55 1362776f49 [release/r-855] C:/Dayforce/55WFM 00 [wfm/855wfm] C:/Dayfo

Re: [PATCH v4 02/11] Add initial support for many promisor remotes

2019-04-03 Thread SZEDER Gábor
On Mon, Apr 01, 2019 at 06:40:36PM +0200, Christian Couder wrote: > diff --git a/promisor-remote.c b/promisor-remote.c > new file mode 100644 > index 00..0c768210ee > --- /dev/null > +++ b/promisor-remote.c > @@ -0,0 +1,92 @@ > +#include "cache.h" > +#include "promisor-remote.h" > +#include

[PATCH 2/2] cocci: FLEX_ALLOC_MEM to FLEX_ALLOC_STR

2019-04-03 Thread Denton Liu
Ensure that a FLEX_MALLOC_MEM that uses 'strlen' for its 'len' uses FLEX_ALLOC_STR instead, since these are equivalent forms. Signed-off-by: Denton Liu --- contrib/coccinelle/flex_alloc.cocci | 13 + 1 file changed, 13 insertions(+) create mode 100644 contrib/coccinelle/flex_alloc.c

[PATCH 1/2] midx.c: convert FLEX_ALLOC_MEM to FLEX_ALLOC_STR

2019-04-03 Thread Denton Liu
Signed-off-by: Denton Liu --- midx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/midx.c b/midx.c index 8a505fd423..cb8190329a 100644 --- a/midx.c +++ b/midx.c @@ -70,7 +70,7 @@ struct multi_pack_index *load_multi_pack_index(const char *object_dir, int local midx

[PATCH 0/2] create FLEX_ALLOC_MEM to FLEX_ALLOC_STR cocci rule

2019-04-03 Thread Denton Liu
I was playing around with coccinelle and I noticed that we have a use of FLEX_ALLOC_MEM that could be converted into FLEX_ALLOC_STR. Convert it and write a cocci rule to prevent this from happening. Note that this was more of an exercise to teach myself how to use coccinelle. I'm just submitting a

Re: [RFC PATCH 0/1] Fuzzy blame

2019-04-03 Thread Michael Platings
Thanks Barret. I've cooled off on the git-notes idea since learning that notes branches have to be pulled explicitly. And different people may have different ideas about which types of commits they want to ignore, so not predefining the name of the ignore file(s) does seem like the best option, eve

Re: [PATCH v2.5 2/2] tag: prevent nested tags

2019-04-03 Thread Denton Liu
On Wed, Apr 03, 2019 at 04:32:27PM +0900, Junio C Hamano wrote: > Denton Liu writes: > > > This is the first use of the '%n$' style of printf format in the > > *.[ch] files in our codebase, but it's supported by POSIX[1] and there > > are existing uses for it in po/*.po files, so hopefully it won

Re: [GSoC][RFC] proposal: convert git-submodule to builtin script

2019-04-03 Thread Khalid Ali
First of all, thank you so much for the detailed feedback. I wasn't sure how much to include in the proposal, but I see it still needs a lot of work. > When you talk about "Convert each main task in git-submodule into a C > function." and "If certain functionality is missing, add it to the correct

Re: [PATCH] clone: do faster object check for partial clones

2019-04-03 Thread Jonathan Tan
> On Wed, Apr 03, 2019 at 10:27:21AM -0700, Josh Steadmon wrote: > > > For partial clones, doing a full connectivity check is wasteful; we skip > > promisor objects (which, for a partial clone, is all known objects), and > > excluding them all from the connectivity check can take a significant > >

[GSoC] [RFC] Unify ref-filter formats with other --pretty formats

2019-04-03 Thread Kapil Jain
Reference: https://git.github.io/SoC-2019-Ideas/#unify-ref-filter-formats-with-other---pretty-formats I have spent some time with both pretty.* and ref-filter.* First off, we are aiming to reuse ref-filter, so avoiding any sort of re-implementation is recommended. Now, coming to pretty.* and re

Re: [PATCH] clone: do faster object check for partial clones

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 10:27:21AM -0700, Josh Steadmon wrote: > For partial clones, doing a full connectivity check is wasteful; we skip > promisor objects (which, for a partial clone, is all known objects), and > excluding them all from the connectivity check can take a significant > amount of t

Re: [PATCH] clone: do faster object check for partial clones

2019-04-03 Thread Jonathan Tan
> For partial clones, doing a full connectivity check is wasteful; we skip > promisor objects (which, for a partial clone, is all known objects), and > excluding them all from the connectivity check can take a significant > amount of time on large repos. Instead of "excluding them all", I would wo

Re: [GSoC][RFC] proposal: convert git-submodule to builtin script

2019-04-03 Thread Johannes Schindelin
Hi, On Tue, 2 Apr 2019, Khalid Ali wrote: > My name is Khalid Ali and I am looking to convert the git-submodule to > a builtin C script. The link below contains my first proposal draft > [1] and my microproject is at [2]. My main concern is that my second > task is not verbose enough. I am not su

Re: [PATCH v2.5 2/2] tag: prevent nested tags

2019-04-03 Thread Robert Dailey
On Wed, Apr 3, 2019 at 3:50 AM Junio C Hamano wrote: > > Junio C Hamano writes: > > > I am not sure if this is so bad, actually. Why do we need to treat > > it as a mistake? When a command that wants a commit is fed a tag > > (either a tag that directly refers to a commit, or a tag that tags >

Re: [PATCH v2.5 2/2] tag: prevent nested tags

2019-04-03 Thread Johannes Sixt
Am 03.04.19 um 09:32 schrieb Junio C Hamano: > Denton Liu writes: > >> This is the first use of the '%n$' style of printf format in the >> *.[ch] files in our codebase, but it's supported by POSIX[1] and there >> are existing uses for it in po/*.po files, so hopefully it won't cause > > The latt

[PATCH] clone: do faster object check for partial clones

2019-04-03 Thread Josh Steadmon
For partial clones, doing a full connectivity check is wasteful; we skip promisor objects (which, for a partial clone, is all known objects), and excluding them all from the connectivity check can take a significant amount of time on large repos. At most, we want to make sure that we get the objec

[PATCH v5 3/6] blame: optionally track the line starts during fill_blame_origin()

2019-04-03 Thread Barret Rhoden
The line_starts array is an index of line number to file offset, so that we can quickly find where a particular line begins in a file. Prior to this commit, we only tracked this information for the final file image, i.e. the current version of the file. This commit adds the ability to track this

[PATCH v5 0/6] blame: add the ability to ignore commits

2019-04-03 Thread Barret Rhoden
This patch set adds the ability to ignore a set of commits and their changes when blaming. This can be used to ignore a commit deemed 'not interesting,' such as reformatting. The last patch in the series is an RFC, and the others could be merged without it. That last patch changes the heuristic

[PATCH v5 1/6] Move init_skiplist() outside of fsck

2019-04-03 Thread Barret Rhoden
init_skiplist() took a file consisting of SHA-1s and comments and added the objects to an oidset. This functionality is useful for other commands. Signed-off-by: Barret Rhoden --- fsck.c | 37 + oidset.c| 35 ++

[PATCH v5 2/6] blame: use a helper function in blame_chunk()

2019-04-03 Thread Barret Rhoden
The same code for splitting a blame_entry at a particular line was used twice in blame_chunk(), and I'll use the helper again in an upcoming patch. Signed-off-by: Barret Rhoden --- blame.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) diff

[PATCH v5 6/6] RFC blame: use a fingerprint heuristic to match ignored lines

2019-04-03 Thread Barret Rhoden
This replaces the heuristic used to identify lines from ignored commits with one that finds likely candidate lines in the parent's version of the file. The old heuristic simply assigned lines in the target to the same line number (plus offset) in the parent. The new function uses fingerprinting b

[PATCH v5 5/6] blame: add a config option to mark ignored lines

2019-04-03 Thread Barret Rhoden
When ignoring commits, the commit that is blamed might not be responsible for the change. Users might want to know when a particular line has a potentially inaccurate blame. This patch adds a config option to identify these lines by specifying blame.markIgnoredFiles. When this option is set, eac

[PATCH v5 4/6] blame: add the ability to ignore commits and their changes

2019-04-03 Thread Barret Rhoden
Commits that make formatting changes or function renames are often not interesting when blaming a file. A user may deem such a commit as 'not interesting' and want to ignore and its changes it when assigning blame. For example, say a file has the following git history / rev-list: ---O---A---X---

Re: [RFC PATCH 0/1] Fuzzy blame

2019-04-03 Thread Barret Rhoden
Hi - On 3/25/19 7:21 PM, Michael Platings wrote: The first thing that comes to mind for me is to plug your fuzzy logic into my patch set. Please do! It should be easy to pluck fuzzy_find_matching_lines() and its dependencies out. Just to set your expectations, I have not yet optimised it and it

来自:Julian M. Worker(慈善捐款基金)

2019-04-03 Thread Julian Worker
美好的一天 我以万能的耶和华的名,向你们问候一切善行的人。良好的一天和季节的赞美,我知道这是真的,这封信可能会来到你一个惊喜。然而,我谦恭地要求你给我注意,并听到我很好,但我恳求你花时间仔细阅读这个消息,因为你做出的决定将有很长的路要确定我的未来存在。我是Julian Worker夫人,一个58岁的寡妇,来自美国拉斯维加斯,与联合国合作;我患有肺癌,目前住院在布基纳法索普通医院。我有一些资金,我继承了我已故的丈夫,总和(USD $ 14.5百万美元),我需要一个非常诚实和神害怕谁可以提取这笔钱,然后使用的资金用于慈善工作。我想把这些基金给你的慈善工作。我发现你的电子邮件地址从互联网

Feature request: Add --no-edit to git tag command

2019-04-03 Thread Robert Dailey
Similar to git commit, it would be nice to have a --no-edit option for git tag. Use case is when I force-recreate a tag: $ git tag -af 1.0 123abc An editor will be prompted with the previous annotated tag message. I would like to add --no-edit to instruct it to use any previously provided message

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread David Kastrup
Jeff King writes: > On Wed, Apr 03, 2019 at 07:06:02PM +0700, Duy Nguyen wrote: > >> On Wed, Apr 3, 2019 at 6:36 PM Jeff King wrote: >> > I suspect we could do even better by storing and reusing not just the >> > original blob between diffs, but the intermediate diff state (i.e., the >> > hashes

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 07:06:02PM +0700, Duy Nguyen wrote: > On Wed, Apr 3, 2019 at 6:36 PM Jeff King wrote: > > I suspect we could do even better by storing and reusing not just the > > original blob between diffs, but the intermediate diff state (i.e., the > > hashes produced by xdl_prepare(),

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread Duy Nguyen
On Wed, Apr 3, 2019 at 6:36 PM Jeff King wrote: > I suspect we could do even better by storing and reusing not just the > original blob between diffs, but the intermediate diff state (i.e., the > hashes produced by xdl_prepare(), which should be usable between > multiple diffs). That's quite a bit

[PATCH v2 32/32] sha1-name.c: remove the_repo from get_oid_mb()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 3 ++- sha1-name.c | 18 +++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/cache.h b/cache.h index 871a167bf8..9a600a8b50 100644 --- a/cache.h +++ b/cache.h @@ -1386,6 +1386,7 @@ int repo_get_oid_committish(st

[PATCH v2 29/32] submodule-config.c: use repo_get_oid for reading .gitmodules

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Since 76e9bdc437 (submodule: support reading .gitmodules when it's not in the working tree - 2018-10-25), every time you do git grep --recurse-submodules you are likely to see one warning line per submodule (unless all those submodules also have submodules). On a superproject with plenty of s

[PATCH v2 31/32] sha1-name.c: remove the_repo from other get_oid_*

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 18 -- sha1-name.c | 35 --- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/cache.h b/cache.h index 3718b3db8a..871a167bf8 100644 --- a/cache.h +++ b/cache.h @@ -1381,12 +1381,1

[PATCH v2 30/32] sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 4 +++- setup.c | 7 --- sha1-name.c | 6 -- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cache.h b/cache.h index f6e87194d0..3718b3db8a 100644 --- a/cache.h +++ b/cache.h @@ -1387,7 +1387,9 @@ extern int get_oid

[PATCH v2 24/32] sha1-name.c: remove the_repo from handle_one_ref()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 5741a9f821..d9050776dd 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -1189,15 +1189,21 @@ static enum get_oid_result get_oid

[PATCH v2 23/32] sha1-name.c: remove the_repo from get_oid_1()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
There is a cyclic dependency between one of these functions so they cannot be converted one by one, so all related functions are converted at once. Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 7 +-- sha1-name.c | 59 - 2 files ch

[PATCH v2 18/32] sha1-name.c: remove the_repo from interpret_branch_mark()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index af8bf5b351..7d9512ac44 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -1412,9 +1412,9 @@ static int reinterpret(const char *name, in

[PATCH v2 19/32] sha1-name.c: add repo_interpret_branch_name()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 7d9512ac44..49c62d5254 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -1390,7 +1390,8 @@ static int interpret_empty_at(const cha

[PATCH v2 25/32] sha1-name.c: remove the_repo from diagnose_invalid_index_path()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- dir.c | 8 dir.h | 4 +++- sha1-name.c | 7 --- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/dir.c b/dir.c index b2cabadf25..e6d97343f4 100644 --- a/dir.c +++ b/dir.c @@ -2315,6 +2315,14 @@ int file_exists(const c

[PATCH v2 22/32] sha1-name.c: remove the_repo from get_oid_basic()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 1cda854f02..d4c135aea8 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -773,8 +773,8 @@ static inline int push_mark(con

[PATCH v2 26/32] sha1-name.c: remove the_repo from resolve_relative_path()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
"remove" is not entirely correct. But at least the function is aware that if the given repo is not the_repository, then $CWD and is_inside_work_tree() means nothing. Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh

[PATCH v2 28/32] sha1-name.c: add repo_get_oid()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 3 ++- sha1-name.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cache.h b/cache.h index 2149dc4f56..f6e87194d0 100644 --- a/cache.h +++ b/cache.h @@ -1380,7 +1380,8 @@ enum get_oid_result { */

[PATCH v2 27/32] sha1-name.c: remove the_repo from get_oid_with_context_1()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sha1-name.c b/sha1-name.c index 6b53ea2eeb..64a50d1291 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -12,6 +12,7 @@ #include "packfile.h" #include "object-store.h"

[PATCH v2 20/32] sha1-name.c: remove the_repo from get_oid_oneline()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 49c62d5254..fb80306f1a 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -15,7 +15,7 @@ #include "midx.h" #include "commit-reach.h"

[PATCH v2 21/32] sha1-name.c: remove the_repo from get_describe_name()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index fb80306f1a..1cda854f02 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -1097,7 +1097,9 @@ static int peel_onion(const char *name, int len,

[PATCH v2 15/32] sha1-name.c: add repo_for_each_abbrev()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 3 ++- sha1-name.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cache.h b/cache.h index 4f8ebb0a67..0cb95c0d4f 100644 --- a/cache.h +++ b/cache.h @@ -1392,7 +1392,8 @@ extern enum get_oid_result get_oid_with_contex

[PATCH v2 11/32] sha1-name.c: remove the_repo from sort_ambiguous()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 15a1107998..7558ce51a3 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -383,10 +383,11 @@ static int collect_ambiguous(const struc

[PATCH v2 17/32] sha1-name.c: remove the_repo from interpret_nth_prior_checkout()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 2643b75b54..af8bf5b351 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -771,7 +771,7 @@ static inline int push_mark(const char *

[PATCH v2 12/32] sha1-name.c: remove the_repo from find_abbrev_len_packed()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 7558ce51a3..b9381aaba6 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -514,6 +514,7 @@ struct min_abbrev_data { unsigned int init_le

[PATCH v2 13/32] sha1-name.c: add repo_find_unique_abbrev_r()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 6 -- sha1-name.c | 15 +-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/cache.h b/cache.h index fcb24b5781..4f8ebb0a67 100644 --- a/cache.h +++ b/cache.h @@ -1045,8 +1045,10 @@ extern void check_repository_

[PATCH v2 10/32] commit.c: add repo_get_commit_tree()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- commit.c| 5 +++-- commit.h| 3 ++- contrib/coccinelle/commit.cocci | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/commit.c b/commit.c index a5333c7ac6..f0a5506f04 100644 --- a/commit

[PATCH v2 16/32] sha1-name.c: remove the_repo from get_short_oid()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index cdcf84b826..2643b75b54 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -436,7 +436,8 @@ static void sort_ambiguous_oid_array(str

[PATCH v2 14/32] sha1-name.c: store and use repo in struct disambiguate_state

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-name.c | 95 + 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 9b57787b76..a75992eb54 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -17,13 +17,14 @@

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread Jeff King
On Wed, Apr 03, 2019 at 04:32:30PM +0700, Duy Nguyen wrote: > That might explain why I could not see significant gain when blaming > linux.git's MAINTAINERS file (0.5s was shaved out of 13s) even though > the number of objects read was cut by half (8424 vs 15083). I did a few timings, too, and ma

[PATCH v2 09/32] refs.c: remove the_repo from read_ref_at()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/show-branch.c | 6 -- refs.c| 7 --- refs.h| 3 ++- sha1-name.c | 3 ++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/builtin/show-branch.c b/builtin/show-branch.c index 934e514944

[PATCH v2 06/32] refs.c: remove the_repo from expand_ref()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c| 10 ++ refs.h| 2 +- upload-pack.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index 44df049796..1f5864aa36 100644 --- a/refs.c +++ b/refs.c @@ -558,12 +558,13 @@ static char *subs

[PATCH v2 08/32] refs.c: add repo_dwim_log()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 21 +++-- refs.h | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index bd0fec5776..edea001446 100644 --- a/refs.c +++ b/refs.c @@ -603,9 +603,11 @@ int expand_ref(struct repository *repo, cons

[PATCH v2 07/32] refs.c: add repo_dwim_ref()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 12 +--- refs.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index 1f5864aa36..bd0fec5776 100644 --- a/refs.c +++ b/refs.c @@ -555,14 +555,20 @@ static char *substitute_branch_name(struct repositor

[PATCH v2 05/32] refs.c: remove the_repo from substitute_branch_name()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h | 8 ++-- refs.c | 9 + sha1-name.c | 8 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/cache.h b/cache.h index ac92421f3a..fcb24b5781 100644 --- a/cache.h +++ b/cache.h @@ -1468,8 +1468,12 @@ extern in

[PATCH v2 04/32] refs.c: add refs_shorten_unambiguous_ref()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 11 +-- refs.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index b869f32d8b..3dde824aab 100644 --- a/refs.c +++ b/refs.c @@ -1169,7 +1169,8 @@ int update_ref(const char *msg, const char *refname,

[PATCH v2 03/32] refs.c: add refs_ref_exists()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 142888a40a..b869f32d8b 100644 --- a/refs.c +++ b/refs.c @@ -241,9 +241,14 @@ int read_ref(const char *refname, struct object_id *oid) return read_

Re: [PATCH v3.1 5/6] ci: stick with Asciidoctor v1.5.8 for now

2019-04-03 Thread Martin Ågren
Hi Junio On Fri, 29 Mar 2019 at 20:52, SZEDER Gábor wrote: > > On Fri, Mar 29, 2019 at 01:35:19PM +0100, SZEDER Gábor wrote: > > The release of Asciidoctor v2.0.0 two days ago broke our documentation > > Well, what happened "two days ago" when I sent v2 is now seven days > ago... Let's just say

[PATCH v2 02/32] packfile.c: add repo_approximate_object_count()

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- packfile.c | 14 +++--- packfile.h | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packfile.c b/packfile.c index 16bcb75262..2ad4fab2f8 100644 --- a/packfile.c +++ b/packfile.c @@ -893,25 +893,25 @@ static void prepare_packe

[PATCH v2 01/32] rebase: 'make coccicheck' cleanup

2019-04-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/rebase.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index 77deebc65c..c064909329 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1592,8 +1592,7 @@ int cmd_rebase(int argc, co

[PATCH v2 00/32] nd/sha1-name-c-wo-the-repository updates

2019-04-03 Thread Nguyễn Thái Ngọc Duy
v2 fixes commit.cocci, found by Szeder. While at there I see there are two other changes suggested by cocci that haven't made it to 'pu' so I added them in the new 01/32. Nguyễn Thái Ngọc Duy (32): rebase: 'make coccicheck' cleanup packfile.c: add repo_approximate_object_count() refs.c: add

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread David Kastrup
Junio C Hamano writes: > David Kastrup writes: > >> When a parent blob already has chunks queued up for blaming, dropping >> the blob at the end of one blame step will cause it to get reloaded >> right away, doubling the amount of I/O and unpacking when processing a >> linear history. >> >> Keep

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread Duy Nguyen
On Wed, Apr 3, 2019 at 2:45 PM Junio C Hamano wrote: > > David Kastrup writes: > > > When a parent blob already has chunks queued up for blaming, dropping > > the blob at the end of one blame step will cause it to get reloaded > > right away, doubling the amount of I/O and unpacking when processi

Re: [PATCH v1 0/2] minor asciidoc/tor formatting fixes

2019-04-03 Thread Martin Ågren
On Sat, 30 Mar 2019 at 19:30, Todd Zullinger wrote: > > Just chipping away at the remaining differences between asciidoc and > asciidoctor. > > Todd Zullinger (2): > Documentation/rev-list-options: wrap --date= block with "--" > Documentation/git-status: fix titles in porcelain v2 section Nic

Re: Fw: git describe issue

2019-04-03 Thread Philip Oakley
On 03/04/2019 09:11, Bryan Turner wrote: On Wed, Apr 3, 2019 at 1:00 AM Amiel Elboim wrote: Very helpful! annotated tag is good solution for us. However fix of this issue is important, because it's confusing when you want to track on your version using git tags. Lightweight tags have no met

Re: [PATCH v2.5 2/2] tag: prevent nested tags

2019-04-03 Thread Junio C Hamano
Junio C Hamano writes: > I am not sure if this is so bad, actually. Why do we need to treat > it as a mistake? When a command that wants a commit is fed a tag > (either a tag that directly refers to a commit, or a tag that tags > another tag that refers to a commit), the command knows how to pe

Re: [PATCH v1 2/2] Documentation/git-status: fix titles in porcelain v2 section

2019-04-03 Thread Jeff Hostetler
On 3/30/2019 2:30 PM, Todd Zullinger wrote: Asciidoc uses either one-line or two-line syntax for document/section titles[1]. The two-line form is used in git-status. Fix a few section titles in the porcelain v2 section which were inadvertently using markdown syntax. [1] http://asciidoc.org/

Re: Fw: git describe issue

2019-04-03 Thread Bryan Turner
On Wed, Apr 3, 2019 at 1:00 AM Amiel Elboim wrote: > > Very helpful! annotated tag is good solution for us. > > However fix of this issue is important, because it's confusing when you want > to track on your version using git tags. Lightweight tags have no metadata to allow for ordering, so I'm

Re: [PATCH v2 4/4] dir: do not traverse repositories with no commits

2019-04-03 Thread Junio C Hamano
Kyle Meyer writes: > The above case is a corner case in an already unusual situation of the > working tree containing a repository that is not a tracked submodule, > but we might as well treat anything that looks like a repository > consistently. Makes sense. > As the required update to t3700-a

Re: [PATCH v2 2/4] t3000: move non-submodule repo test to separate file

2019-04-03 Thread Junio C Hamano
Kyle Meyer writes: > a2d5156c2b (resolve_gitlink_ref: ignore non-repository paths, > 2016-01-22) added a test to t3000-ls-files-others.sh to check that > 'ls-files -o' does not die() when given a subdirectory that looks like > a repository but is actually a subdirectory containing a bogus .git >

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread Junio C Hamano
David Kastrup writes: > When a parent blob already has chunks queued up for blaming, dropping > the blob at the end of one blame step will cause it to get reloaded > right away, doubling the amount of I/O and unpacking when processing a > linear history. > > Keeping such parent blobs in memory se

Re: [PATCH v2.5 2/2] tag: prevent nested tags

2019-04-03 Thread Junio C Hamano
Denton Liu writes: > This is the first use of the '%n$' style of printf format in the > *.[ch] files in our codebase, but it's supported by POSIX[1] and there > are existing uses for it in po/*.po files, so hopefully it won't cause The latter is a stronger indication that this should be OK than

Re: [PATCH v3 2/8] git-p4: add failing test for "git-p4: match branches case insensitively if configured"

2019-04-03 Thread Junio C Hamano
SZEDER Gábor writes: > I wonder whether it would be worth amending 07353d9042 to keep > 'kill_p4d' around as a wrapper around 'stop_and_cleanup_p4d' for the > time being. I think renaming was the right thing to do; "show --cc" shows that the post-image lives in the new world order where calling

Re: Fw: git describe issue

2019-04-03 Thread Bryan Turner
On Tue, Apr 2, 2019 at 11:47 PM Amiel Elboim wrote: > Hi! > > I've found strange behavior with 'git describe' command, look like for me as > bug. > > In the case I create 2 tags on same commit and I run 'git describe --tags' I > expect to get the latest tag, but always I get the first tag I crea