[PATCH v4 4/6] sha1-name.c: move around the collect_ambiguous() function

2018-05-10 Thread Ævar Arnfjörð Bjarmason
A subsequent change will make use of this static function in the get_short_oid() function, which is defined above where the collect_ambiguous() function is now. Without this we'd then have a compilation error due to a forward declaration. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.

[PATCH v4 3/6] git-p4: change "commitish" typo to "committish"

2018-05-10 Thread Ævar Arnfjörð Bjarmason
This was the only occurrence of "commitish" in the tree, but as the log will reveal we've had others in the past. Fixes up code added in 00ad6e3182 ("git-p4: work with a detached head", 2015-11-21). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- gi

[PATCH v4 0/6] get_short_oid UI improvements

2018-05-10 Thread Ævar Arnfjörð Bjarmason
top of this. Ævar Arnfjörð Bjarmason (6): sha1-name.c: remove stray newline sha1-array.h: align function arguments git-p4: change "commitish" typo to "committish" sha1-name.c: move around the collect_ambiguous() function get_short_oid: sort ambiguous obj

[PATCH v4 5/6] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-10 Thread Ævar Arnfjörð Bjarmason
ox.org/git/874ljrzctc@evledraar.gmail.com/ Helped-by: Derrick Stolee <dsto...@microsoft.com> Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/technical/api-oid-array.txt | 17 +++ sha1-array.c | 17 +++

Re: Implementing reftable in Git

2018-05-09 Thread Ævar Arnfjörð Bjarmason
On Wed, May 09 2018, Stefan Beller wrote: > Hi Christian, > > On Wed, May 9, 2018 at 7:33 AM, Christian Couder > wrote: >> Hi, >> >> I might start working on implementing reftable in Git soon. > > Cool! Everyone is waiting for it as they dream about the > performance

Re: [PATCH] sha1dc: fix for compiling on AIX using IBM XLC compiler

2018-05-09 Thread Ævar Arnfjörð Bjarmason
On Wed, May 09 2018, jens persson wrote: > Hello, first patch. I'm having trouble compiling on AIX using IBMs > compiler, leading to > unusable binaries. The following patch solved the problem for 2.17.0. > The patch below is cut via gmail to allow for firewalls, but > exists in an unmolested

Re: [PATCH v3 09/12] get_short_oid / peel_onion: ^{tree} should be tree, not treeish

2018-05-09 Thread Ævar Arnfjörð Bjarmason
On Wed, May 09 2018, Jeff King wrote: > On Tue, May 08, 2018 at 08:53:10PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> >> "X^{tree}" should *RESULT* in a tree, but it should *REQUIRE* X to >> >> be a tree-ish. It is unclear "should be tree" is a

Re: [PATCH v3 09/12] get_short_oid / peel_onion: ^{tree} should be tree, not treeish

2018-05-08 Thread Ævar Arnfjörð Bjarmason
On Tue, May 08 2018, Jeff King wrote: > On Mon, May 07, 2018 at 01:08:46PM +0900, Junio C Hamano wrote: > >> Ævar Arnfjörð Bjarmason <ava...@gmail.com> writes: >> >> > Right, and I'm with you so far, this makes sense to me for all existing >> > uses o

Re: [PATCH] pack-format.txt: more details on pack file format

2018-05-08 Thread Ævar Arnfjörð Bjarmason
On Tue, May 08 2018, Nguyễn Thái Ngọc Duy wrote: > The current document mentions OBJ_* constants without their actual > values. A git developer would know these are from cache.h but that's > not very friendly to a person who wants to read this file to implement > a pack file parser. > >

Re: [PATCH v4 7/7] contrib/git-jump/git-jump: jump to match column in addition to line

2018-05-06 Thread Ævar Arnfjörð Bjarmason
On Sun, May 06 2018, Martin Ågren wrote: > On 5 May 2018 at 04:43, Taylor Blau wrote: >> Take advantage of 'git-grep(1)''s new option, '--column' in order to >> teach Peff's 'git-jump' script how to jump to the correct column for any >> given match. >> >> 'git-grep(1)''s

Re: [PATCH v4 5/7] builtin/grep.c: add '--column' option to 'git-grep(1)'

2018-05-06 Thread Ævar Arnfjörð Bjarmason
On Sat, May 05 2018, Taylor Blau wrote: > + test_expect_success "grep -w $L (with --{line,column}-number)" ' It's now --column in v4 but this still refers to v3 --column-number.

Re: [PATCH 2/2] builtin/grep.c: teach '-o', '--only-matching' to 'git-grep'

2018-05-05 Thread Ævar Arnfjörð Bjarmason
On Sat, May 05 2018, Taylor Blau wrote: > +--o:: > +--only-matching:: > + Show only the matching part of the lines. > + Makes sense to steal GNU grep's description here: Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. > +

Re: [RFC] Other chunks for commit-graph, part 1 - Bloom filters, topo order, etc.

2018-05-04 Thread Ævar Arnfjörð Bjarmason
On Fri, May 04 2018, Jakub Narebski wrote: (Just off-the cuff here and I'm surely about to be corrected by Derrick...) > * What to do about merge commits, and octopus merges in particular? > Should Bloom filter be stored for each of the parents? How to ensure > fast access then

Re: [RFC] Other chunks for commit-graph, part 1 - Bloom filters, topo order, etc.

2018-05-04 Thread Ævar Arnfjörð Bjarmason
On Fri, May 04 2018, Jakub Narebski wrote: > With early parts of commit-graph feature (ds/commit-graph and > ds/lazy-load-trees) close to being merged into "master", see > https://public-inbox.org/git/xmqq4ljtz87g@gitster-ct.c.googlers.com/ > I think it would be good idea to think what other

Re: [PATCH v2] checkout & worktree: introduce checkout.implicitRemote

2018-05-04 Thread Ævar Arnfjörð Bjarmason
On Fri, May 04 2018, Duy Nguyen wrote: > On Fri, May 4, 2018 at 9:54 AM, Ævar Arnfjörð Bjarmason > <ava...@gmail.com> wrote: >> Realistically the way we do hooks now would make the UI of this suck, >> i.e. you couldn't configure it globally or system-wide easily. Someth

Re: [PATCH v3 09/12] get_short_oid / peel_onion: ^{tree} should be tree, not treeish

2018-05-04 Thread Ævar Arnfjörð Bjarmason
On Fri, May 04 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason <ava...@gmail.com> writes: > >> The reason I'm doing this is because I found it confusing that I can't >> do: >> >> for t in tag commit tree blob; do ./git --exec-path=$PWD rev-par

Re: [PATCH v2] checkout & worktree: introduce checkout.implicitRemote

2018-05-04 Thread Ævar Arnfjörð Bjarmason
On Thu, May 03 2018, Duy Nguyen wrote: > On Thu, May 3, 2018 at 3:18 PM, Ævar Arnfjörð Bjarmason > <ava...@gmail.com> wrote: >> Introduce a checkout.implicitRemote setting which can be used to >> designate a remote to prefer (via checkout.implicitRemote=origin) when >&

Re: [PATCH 00/18] Add `branch-diff`, a `tbdiff` lookalike

2018-05-03 Thread Ævar Arnfjörð Bjarmason
On Thu, May 03 2018, Johannes Schindelin wrote: > The incredibly useful `git-tbdiff` tool to compare patch series (say, to see > what changed between two iterations sent to the Git mailing list) is slightly > less useful for this developer due to the fact that it requires the > `hungarian` >

Re: [PATCH 11/18] branch-diff: add tests

2018-05-03 Thread Ævar Arnfjörð Bjarmason
On Thu, May 03 2018, Johannes Schindelin wrote: > *before* the existing emtpy line. And apparently xdiff picks a different s/emtpy/empty/

[PATCH v2] checkout & worktree: introduce checkout.implicitRemote

2018-05-03 Thread Ævar Arnfjörð Bjarmason
re.* that made sense (core.implicitRemoteForCheckout?). See also 70c9ac2f19 ("DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz"", 2009-10-18) which introduced this DWIM feature to begin with, and 4e85333197 ("worktree: make add dwim",

Re: [PATCH v3 09/12] get_short_oid / peel_onion: ^{tree} should be tree, not treeish

2018-05-03 Thread Ævar Arnfjörð Bjarmason
On Thu, May 03 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason <ava...@gmail.com> writes: > >> But ^{tree} shows just the trees, but would previously be equivalent >> to the above: >> >> $ git rev-parse e8f2^{tree} >> error: short SHA1 e8f

Re: [PATCH] checkout & worktree: introduce a core.DWIMRemote setting

2018-05-02 Thread Ævar Arnfjörð Bjarmason
On Wed, May 02 2018, Eric Sunshine wrote: > On Wed, May 2, 2018 at 11:21 AM, Duy Nguyen <pclo...@gmail.com> wrote: >> On Wed, May 2, 2018 at 12:54 PM, Ævar Arnfjörð Bjarmason >> <ava...@gmail.com> wrote: >>> Introduce a core.DWIMRemote setting which c

[PATCH] checkout & worktree: introduce a core.DWIMRemote setting

2018-05-02 Thread Ævar Arnfjörð Bjarmason
have similar DWIM behavior in the presence of one remote. See also 70c9ac2f19 ("DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz"", 2009-10-18) which introduced this DWIM feature to begin with, and 4e85333197 ("worktree: make add dwim"

Re: [RFC PATCH v4 0/3] Optional sub hierarchy for remote tags

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Wink Saville wrote: > As discussed on the git email list [1] with the subject > "Fetching tags overwrites existing tags" there is a bug > where fetching tags can overwrite existing tags. > > Ævar Arnfjörð Bjarmasono, has created a patch series [2] > which requires a

Re: [RFC PATCH v4 1/3] Teach remote add the --remote-tags option

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Wink Saville wrote: > [1]: > https://public-inbox.org/git/xmqqbme51rgn@gitster-ct.c.googlers.com/T/#me7f7f153b8ba742c0dc48d8ec79c280c9682d32e Better to link to https://public-inbox.org/git/xmqqzi1s3y5h@gitster-ct.c.googlers.com/

Re: js/no-pager-shorthand [was: What's cooking in git.git (Apr 2018, #04; Mon, 30)]

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Johannes Schindelin wrote: > I wonder whether `-!p` would be better/feasible? In *nix shells `git -!p ...` unquoted will turn that !p into whatever command you last ran that started with a "p", in my case `git -ping 8.8.8.8`. So there's a reason that's not the idiom in any

[PATCH v3 06/12] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
ox.org/git/874ljrzctc@evledraar.gmail.com/ Helped-by: Derrick Stolee <dsto...@microsoft.com> Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/technical/api-oid-array.txt | 17 +++ sha1-array.c | 17 +++

[PATCH v3 07/12] get_short_oid: learn to disambiguate by ^{tag}

2018-05-01 Thread Ævar Arnfjörð Bjarmason
know we want a tree-ish", 2013-03-31) has been extended to support it. $ git rev-parse e8f2^{tag} e8f2650052f3ff646023725e388ea1112b020e79 Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- cache.h | 5 +++-- sha1-name.c

[PATCH v3 11/12] config doc: document core.disambiguate

2018-05-01 Thread Ævar Arnfjörð Bjarmason
The core.disambiguate variable was added in 5b33cb1fd7 ("get_short_sha1: make default disambiguation configurable", 2016-09-27) but never documented. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/config.txt | 13 + 1 file changed, 13 ins

[PATCH v3 12/12] get_short_oid: document & warn if we ignore the type selector

2018-05-01 Thread Ævar Arnfjörð Bjarmason
no object of the requested type matched the provide short SHA1 06fa Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/config.txt| 4 sha1-name.c | 11 ++- t/t1512-rev-parse-disambiguation.sh | 5 - 3 f

[PATCH v3 00/12] get_short_oid UI improvements

2018-05-01 Thread Ævar Arnfjörð Bjarmason
Comments inline: Ævar Arnfjörð Bjarmason (12): sha1-name.c: remove stray newline No changes. sha1-array.h: align function arguments Mention the correct commit to blame for disalignment in the commit message, and also fix it in the *.c file. git-p4: change "commitish" typo to &

[PATCH v3 01/12] sha1-name.c: remove stray newline

2018-05-01 Thread Ævar Arnfjörð Bjarmason
This stray newline was accidentally introduced in d2b7d9c7ed ("sha1_name: convert disambiguate_hint_fn to take object_id", 2017-03-26). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sha1-name.c b/s

[PATCH v3 10/12] get_short_oid / peel_onion: ^{commit} should be commit, not committish

2018-05-01 Thread Ævar Arnfjörð Bjarmason
2015-05-10 - Documentation: note behavior for multiple remote.url entries [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 +- t/t1512-rev-parse-disambiguation.sh | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-)

[PATCH v3 08/12] get_short_oid: learn to disambiguate by ^{blob}

2018-05-01 Thread Ævar Arnfjörð Bjarmason
b} [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 ++ t/t1512-rev-parse-disambiguation.sh | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sha1-name.c b/sha1-name.c index 68d5f65362..023f9471a8 100644 --

[PATCH v3 04/12] cache.h: add comment explaining the order in object_type

2018-05-01 Thread Ævar Arnfjörð Bjarmason
com. Makes sense to me, add that as a comment. Helped-by: Derrick Stolee <dsto...@microsoft.com> Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- cache.h | 8 1 file changed, 8 insertions(+) diff --git a/cache.h b/cache.h index 77b7acebb6..354903c3ea 100644 --- a

[PATCH v3 02/12] sha1-array.h: align function arguments

2018-05-01 Thread Ævar Arnfjörð Bjarmason
The arguments weren't lined up with the opening parenthesis. Fixes up code added in aae0caf19e ("sha1-array.h: align function arguments", 2018-04-30). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-array.c | 4 ++-- sha1-array.h | 4 ++-- 2 files changed, 4

[PATCH v3 05/12] sha1-name.c: move around the collect_ambiguous() function

2018-05-01 Thread Ævar Arnfjörð Bjarmason
A subsequent change will make use of this static function in the get_short_oid() function, which is defined above where the collect_ambiguous() function is now. Without this we'd then have a compilation error due to a forward declaration. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.

[PATCH v3 09/12] get_short_oid / peel_onion: ^{tree} should be tree, not treeish

2018-05-01 Thread Ævar Arnfjörð Bjarmason
hint: The candidates are: hint: e8f2093055 tree hint: e8f25a3a50 tree hint: e8f28d537c tree hint: e8f2cf6ec0 tree [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 +- t/t1512-rev-parse-disambiguation.sh | 18 +

[PATCH v3 03/12] git-p4: change "commitish" typo to "committish"

2018-05-01 Thread Ævar Arnfjörð Bjarmason
This was the only occurrence of "commitish" in the tree, but as the log will reveal we've had others in the past. Fixes up code added in 00ad6e3182 ("git-p4: work with a detached head", 2015-11-21). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- gi

Re: [PATCH v2 06/11] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Derrick Stolee wrote: > On 5/1/2018 9:39 AM, Ævar Arnfjörð Bjarmason wrote: >> On Tue, May 01 2018, Derrick Stolee wrote: >> >>> From: Ævar Arnfjörð Bjarmason <ava...@gmail.com> >>> >>> Here is what I mean by sort

Re: [PATCH v2 06/11] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Derrick Stolee wrote: > From: Ævar Arnfjörð Bjarmason <ava...@gmail.com> > > Here is what I mean by sorting during for_each_abbrev(). This seems to work > for > me, so I don't know what the issue is with this one-pass approach. > [...] > +stat

Re: [PATCH 0/4] subtree: move out of contrib

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Johannes Schindelin wrote: > Hi Ævar, > > On Mon, 30 Apr 2018, Ævar Arnfjörð Bjarmason wrote: > >> I think at this point git-subtree is widely used enough to move out of >> contrib/, maybe others disagree, but patches are always better for >>

Re: [PATCH 4/9] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Derrick Stolee wrote: > On 5/1/2018 7:27 AM, Ævar Arnfjörð Bjarmason wrote: >> On Tue, May 01 2018, Derrick Stolee wrote: >> >>> On 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote: >>>> Since we show the commit data in the output tha

[PATCH v2 11/12] config doc: document core.disambiguate

2018-05-01 Thread Ævar Arnfjörð Bjarmason
The core.disambiguate variable was added in 5b33cb1fd7 ("get_short_sha1: make default disambiguation configurable", 2016-09-27) but never documented. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/config.txt | 13 + 1 file changed, 13 ins

[PATCH v2 10/12] get_short_oid / peel_onion: ^{commit} should be commit, not committish

2018-05-01 Thread Ævar Arnfjörð Bjarmason
2015-05-10 - Documentation: note behavior for multiple remote.url entries [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 +- t/t1512-rev-parse-disambiguation.sh | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-)

[PATCH v2 12/12] get_short_oid: document & warn if we ignore the type selector

2018-05-01 Thread Ævar Arnfjörð Bjarmason
no object of the requested type matched the provide short SHA1 06fa Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/config.txt| 4 sha1-name.c | 11 ++- t/t1512-rev-parse-disambiguation.sh | 5 - 3 f

[PATCH v2 08/12] get_short_oid: learn to disambiguate by ^{blob}

2018-05-01 Thread Ævar Arnfjörð Bjarmason
b} [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 ++ t/t1512-rev-parse-disambiguation.sh | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sha1-name.c b/sha1-name.c index 68d5f65362..023f9471a8 100644 --

[PATCH v2 01/12] sha1-name.c: remove stray newline

2018-05-01 Thread Ævar Arnfjörð Bjarmason
This stray newline was accidentally introduced in d2b7d9c7ed ("sha1_name: convert disambiguate_hint_fn to take object_id", 2017-03-26). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sha1-name.c b/s

[PATCH v2 06/12] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
ther places. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/technical/api-oid-array.txt | 17 +++ sha1-array.c | 17 +++ sha1-array.h | 3 ++ sha1-name.c

[PATCH v2 02/12] sha1-array.h: align function arguments

2018-05-01 Thread Ævar Arnfjörð Bjarmason
The arguments weren't lined up with the opening parenthesis. Fixes up code added in cff38a5e11 ("receive-pack: eliminate duplicate .have refs", 2011-05-19). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 de

[PATCH v2 00/12] get_short_oid UI improvements

2018-05-01 Thread Ævar Arnfjörð Bjarmason
A v2 addressing feedback so far. Comments inline per-patch. Ævar Arnfjörð Bjarmason (12): sha1-name.c: remove stray newline sha1-array.h: align function arguments No changes. git-p4: change "commitish" typo to "committish" New, I fixed my own "commitish&q

[PATCH v2 09/12] get_short_oid / peel_onion: ^{tree} should be tree, not treeish

2018-05-01 Thread Ævar Arnfjörð Bjarmason
hint: The candidates are: hint: e8f2093055 tree hint: e8f25a3a50 tree hint: e8f28d537c tree hint: e8f2cf6ec0 tree [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 +- t/t1512-rev-parse-disambiguation.sh | 18 +

[PATCH v2 03/12] git-p4: change "commitish" typo to "committish"

2018-05-01 Thread Ævar Arnfjörð Bjarmason
This was the only occurrence of "commitish" in the tree, but as the log will reveal we've had others in the past. Fixes up code added in 00ad6e3182 ("git-p4: work with a detached head", 2015-11-21). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- gi

[PATCH v2 04/12] cache.h: add comment explaining the order in object_type

2018-05-01 Thread Ævar Arnfjörð Bjarmason
com. Makes sense to me, add that as a comment. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- cache.h | 8 1 file changed, 8 insertions(+) diff --git a/cache.h b/cache.h index 77b7acebb6..354903c3ea 100644 --- a/cache.h +++ b/cache.h @@ -376,6 +376,14 @@ extern voi

[PATCH v2 07/12] get_short_oid: learn to disambiguate by ^{tag}

2018-05-01 Thread Ævar Arnfjörð Bjarmason
know we want a tree-ish", 2013-03-31) has been extended to support it. $ git rev-parse e8f2^{tag} e8f2650052f3ff646023725e388ea1112b020e79 Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- cache.h | 5 +++-- sha1-name.c

[PATCH v2 05/12] sha1-name.c: move around the collect_ambiguous() function

2018-05-01 Thread Ævar Arnfjörð Bjarmason
A subsequent change will make use of this static function in the get_short_oid() function, which is defined above where the collect_ambiguous() function is now. Without this we'd then have a compilation error due to a forward declaration. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.

Re: [PATCH 4/9] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Derrick Stolee wrote: > On 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote: >> Since we show the commit data in the output that's nicely aligned once >> we sort by object type. The decision to show tags before commits is >> pretty arbitrary, but

Re: [PATCH v2] wt-status: use rename settings from init_diff_ui_defaults

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Eckhard S. Maaß wrote: > Since the very beginning, git status behaved differently for rename > detection than other rename aware commands like git log or git show as > it has the use of rename hard coded into it. Can you elaborate on this? It seems initial rename detection

Re: [PATCH 0/4] subtree: move out of contrib

2018-04-30 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 30 2018, Avery Pennarun wrote: > On Mon, Apr 30, 2018 at 5:38 PM, Stefan Beller wrote: > There's one exception, which is doing a one-time permanent merge of > two projects into one. That's a nice feature, but is probably used > extremely rarely. FWIW this is

[PATCH 7/9] get_short_oid / peel_onion: ^{tree} should mean tree, not treeish

2018-04-30 Thread Ævar Arnfjörð Bjarmason
hint: The candidates are: hint: e8f2093055 tree hint: e8f25a3a50 tree hint: e8f28d537c tree hint: e8f2cf6ec0 tree [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 +- t/t1512-rev-parse-disambiguation.sh | 18 +

[PATCH 2/9] sha1-array.h: align function arguments

2018-04-30 Thread Ævar Arnfjörð Bjarmason
The arguments weren't lined up with the opening parenthesis. Fixes up code added in cff38a5e11 ("receive-pack: eliminate duplicate .have refs", 2011-05-19). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 de

[PATCH 9/9] config doc: document core.disambiguate

2018-04-30 Thread Ævar Arnfjörð Bjarmason
The core.disambiguate variable was added in 5b33cb1fd7 ("get_short_sha1: make default disambiguation configurable", 2016-09-27) but never documented. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/config.txt | 14 ++ 1 file changed, 14 ins

[PATCH 8/9] get_short_oid / peel_onion: ^{tree} should mean commit, not commitish

2018-04-30 Thread Ævar Arnfjörð Bjarmason
[...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 +- t/t1512-rev-parse-disambiguation.sh | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index b61c0558d9..1d2a74a29c 100644 ---

[PATCH 5/9] get_short_oid: learn to disambiguate by ^{tag}

2018-04-30 Thread Ævar Arnfjörð Bjarmason
know we want a tree-ish", 2013-03-31) has been extended to support it. $ git rev-parse e8f2^{tag} e8f2650052f3ff646023725e388ea1112b020e79 Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- cache.h | 5 +++-- sha1-name.c

[PATCH 6/9] get_short_oid: learn to disambiguate by ^{blob}

2018-04-30 Thread Ævar Arnfjörð Bjarmason
b} [...] Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 2 ++ t/t1512-rev-parse-disambiguation.sh | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sha1-name.c b/sha1-name.c index 68d5f65362..023f9471a8 100644 --

[PATCH 1/9] sha1-name.c: remove stray newline

2018-04-30 Thread Ævar Arnfjörð Bjarmason
This stray newline was accidentally introduced in d2b7d9c7ed ("sha1_name: convert disambiguate_hint_fn to take object_id", 2017-03-26). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-name.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sha1-name.c b/s

[PATCH 0/9] get_short_oid UI improvements

2018-04-30 Thread Ævar Arnfjörð Bjarmason
I started out just wanting to do 04/09 so I'd get prettier output, but then noticed that ^{tag}, ^{commit}< ^{blob} and ^{tree} didn't behave as expected with the disambiguation output, and that core.disambiguate had never been documented. Ævar Arnfjörð Bjarmason (9): sha1-name.c: remove st

[PATCH 4/9] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-04-30 Thread Ævar Arnfjörð Bjarmason
is pretty arbitrary, but it's much less likely that we'll display a tag, so if there is one it makes sense to show it first. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- sha1-array.c | 15 +++ sha1-array.h | 3 +++ sha1-name.c | 37 ++

[PATCH 3/9] sha1-name.c: move around the collect_ambiguous() function

2018-04-30 Thread Ævar Arnfjörð Bjarmason
A subsequent change will make use of this static function in the get_short_oid() function, which is defined above where the collect_ambiguous() function is now, which would result in a compilation error due to a forward declaration. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.

Re: git-submodule is missing --dissociate option

2018-04-30 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 30, 2018 at 1:30 PM, Casey Fitzpatrick wrote: > It also seems to be missing "--progress", and I imagine others. > Perhaps submodule add/update should be reworked to automatically > accept all the options that clone would? --progress is not missing, but I see that

[PATCH 3/4] subtree: fix a test failure under GETTEXT_POISON

2018-04-30 Thread Ævar Arnfjörð Bjarmason
Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- t/t7900-subtree.sh | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/t7900-subtree.sh b/t/t7900-subtree.sh index eb223ff049..a6e7103f92 100755 --- a/t/t7900-subtree.sh +++ b/t/t7900-subtree.sh @@

[PATCH 4/4] i18n: translate the git-subtree command

2018-04-30 Thread Ævar Arnfjörð Bjarmason
GIT_GETTEXT_POISON=1. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- git-subtree.sh | 90 +++--- t/t7900-subtree.sh | 4 +-- 2 files changed, 56 insertions(+), 38 deletions(-) diff --git a/git-subtree.sh b/git-subtree.sh index 1b8c

[PATCH 2/4] subtree: remove support for git version <1.7

2018-04-30 Thread Ævar Arnfjörð Bjarmason
Now that git-subtree is in-tree there's no reason to be supporting older git Versions. This reverts & amends 448e71e263 ("Use 'git merge -Xsubtree' when git version >= 1.7.0.", 2010-05-07). Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- git-subtree.sh | 19

[PATCH 0/4] subtree: move out of contrib

2018-04-30 Thread Ævar Arnfjörð Bjarmason
I think at this point git-subtree is widely used enough to move out of contrib/, maybe others disagree, but patches are always better for discussion that patch-less ML posts. Ævar Arnfjörð Bjarmason (4): git-subtree: move from contrib/subtree/ subtree: remove support for git version <

[PATCH 1/4] git-subtree: move from contrib/subtree/

2018-04-30 Thread Ævar Arnfjörð Bjarmason
to things we have in-tree. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- .gitignore| 1 + Documentation/git-submodule.txt | 2 +- .../subtree => Documentation}/git-subtree.txt | 3 + Makefile

[PATCH 0/8] "git fetch" should not clobber existing tags without --force

2018-04-29 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 27 2018, Ævar Arnfjörð Bjarmason wrote: > On Tue, Apr 24, 2018 at 9:57 PM, Wink Saville <w...@saville.com> wrote: >> If have a repository with a tag "v1.0.0" and I add a remote repository >> which also has a tag "v1.0.0" tag is overwritte

[PATCH 8/8] fetch: stop clobbering existing tags without --force

2018-04-29 Thread Ævar Arnfjörð Bjarmason
le: limit the fetch refspec to fetched branch", 2012-09-20) is being changed to use --force where a clone would clobber a tag. This changes nothing about the existing behavior of the test. 1. https://public-inbox.org/git/2023221658.ga22...@sigill.intra.peff.net/ Signed-off-by: Ævar Arnfjör

[PATCH 3/8] push tests: add more testing for forced tag pushing

2018-04-29 Thread Ævar Arnfjörð Bjarmason
Improve the tests added in dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29) to assert that the same behavior applies various forms other refspecs, and that "+" in a refspec will override the "--no-force" option (but not the other way around).

[PATCH 5/8] push doc: correct lies about how push refspecs work

2018-04-29 Thread Ævar Arnfjörð Bjarmason
t all), and that could be covered separately as an advanced topic. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Documentation/git-push.txt | 30 ++ Documentation/gitrevisions.txt | 7 --- 2 files changed, 26 insertions(+), 11 deletions(-) diff

[PATCH 7/8] fetch tests: add a test clobbering tag behavior

2018-04-29 Thread Ævar Arnfjörð Bjarmason
The test suite only incidentally (and unintentionally) tested for the current behavior of eager tag clobbering on "fetch". This follow-up to the previous "push tests: assert re-pushing annotated tags" change tests for it explicitly. Signed-off-by: Ævar Arnfjörð Bjarmason <a

[PATCH 6/8] fetch tests: correct a comment "remove it" -> "remove them"

2018-04-29 Thread Ævar Arnfjörð Bjarmason
f-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- t/t5510-fetch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index ae5a530a2d..9bd2783521 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -613,7 +613,7 @@ test_confi

[PATCH 4/8] push tests: assert re-pushing annotated tags

2018-04-29 Thread Ævar Arnfjörð Bjarmason
There was no reason to suspect that the receive machinery wouldn't behave the same way with annotated tags, but now we know for sure. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- t/t5516-fetch-push.sh | 66 --- 1 file changed, 37 insert

[PATCH 1/8] push tests: remove redundant 'git push' invocation

2018-04-29 Thread Ævar Arnfjörð Bjarmason
as there was nothing new to push. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- t/t5516-fetch-push.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 82239138d5..7b5a553398 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t55

[PATCH 2/8] push tests: fix logic error in "push" test assertion

2018-04-29 Thread Ævar Arnfjörð Bjarmason
, the code was not creating a new tag at all, and then failing to push the previous tag for the unrelated reason of providing a refspec that doesn't make any sense. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- t/t5516-fetch-push.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 de

Re: [RFC PATCH] checkout: Force matching mtime between files

2018-04-27 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 27, 2018 at 7:18 PM, Michał Górny wrote: > W dniu śro, 25.04.2018 o godzinie 11∶18 -0400, użytkownik Marc Branchaud > napisał: >> On 2018-04-25 04:48 AM, Junio C Hamano wrote: >> > "Robin H. Johnson" writes: >> > >> > > In the thread from 6

Re: Fetching tags overwrites existing tags

2018-04-27 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 24, 2018 at 9:57 PM, Wink Saville wrote: > If have a repository with a tag "v1.0.0" and I add a remote repository > which also has a tag "v1.0.0" tag is overwritten. I feel like this thread has gotten somewhat side-tracked by the valid discussion about whether we

[PATCH 0/3] enable userdiff for more things in git.git

2018-04-26 Thread Ævar Arnfjörð Bjarmason
). Ævar Arnfjörð Bjarmason (3): .gitattributes: add *.pl extension for Perl .gitattributes: use the "perl" differ for Perl .gitattributes: add a diff driver for Python .gitattributes | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.17.0.290.gded63e768a

[PATCH 3/3] .gitattributes: add a diff driver for Python

2018-04-26 Thread Ævar Arnfjörð Bjarmason
Declare that the *.py files in our tree are Python for the purposes of diffing, and as in 00ddc9d13c ("Fix build with core.autocrlf=true", 2017-05-09) set eol=lf on them, which makes sense like with the *.perl files. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> ---

[PATCH 2/3] .gitattributes: use the "perl" differ for Perl

2018-04-26 Thread Ævar Arnfjörð Bjarmason
As noted in gitattributes(5) this gives better patch context for these types of files. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 482a

[PATCH 1/3] .gitattributes: add *.pl extension for Perl

2018-04-26 Thread Ævar Arnfjörð Bjarmason
Change the list of Perl extensions added in 00ddc9d13c ("Fix build with core.autocrlf=true", 2017-05-09) to also include *.pl, we have some of those in the tree, e.g. in t/. Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- .gitattributes | 1 + 1 file changed, 1 in

Re: Antw: Re: java diffs show no method context

2018-04-26 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 26 2018, Ulrich Windl wrote: > Thanks for that. It sounds plausible, but I wonder why it works automagically > for C, but not for Java (Politcal reasons put aside): Using ".c" for C is > about > as common as using ".java" for Java ;-) It has a bit to do with it being in C, but not

Re: What's cooking in git.git (Apr 2018, #03; Wed, 25)

2018-04-25 Thread Ævar Arnfjörð Bjarmason
On Wed, Apr 25 2018, Junio C. Hamano wrote: > THe command line completion (in contrib/) has been taught that "git > * js/colored-push-errors (2018-04-24) 4 commits > - config: document the settings to colorize push errors/hints > - push: test to verify that push errors are colored > - push:

Re: [RFC PATCH] checkout: Force matching mtime between files

2018-04-25 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 23 2018, Junio C. Hamano wrote: > "Robin H. Johnson" writes: > >> On Fri, Apr 13, 2018 at 07:01:29PM +0200, Michał Górny wrote: >>> Currently git does not control mtimes of files being checked out. This >>> means that the only assumption you could make is that

Re: [PATCH v2 2/6] grep.c: take column number as argument to show_line()

2018-04-23 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 23 2018, Taylor Blau wrote: > For your consideration: https://github.com/ttaylorr/git/compare/tb/grep-colno Looks good to me aside from two minor issues I noticed: * In "grep.c: display column number of first match" you use a comment style we don't normally use, i.e. /**\n not

Re: [PATCH v2 2/6] grep.c: take column number as argument to show_line()

2018-04-23 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 23 2018, Eric Sunshine wrote: > On Sun, Apr 22, 2018 at 9:17 PM, Taylor Blau wrote: > One important issue I noticed is that patch 3/7 neglects to update > grep.c:init_grep_defaults() to initialize opt.color_columnno. I think this is fine for fields that are 0 by

Re: [PATCH v2 6/6] contrib/git-jump/git-jump: use column number when grep-ing

2018-04-22 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 22 2018, Taylor Blau wrote: > This patch adds the '--column-number' synonym '-m' to the default > grep command so that callers are brought to the correct line _and_ > column of each matched location. > [...] > diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump > index

Re: [PATCH v2 5/6] builtin/grep.c: show column numbers via --column-number

2018-04-22 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 22 2018, Taylor Blau wrote: I think this part though... > While we're at it, change color.grep.linenumber to color.grep.lineNumber > to match the casing of nearby variables. > [...] > -`linenumber`;; > +`lineNumber`;; Makes sense as its own patch at the beginning of the series,

Re: [PATCH v2 3/6] grep.[ch]: teach columnnum, color_columnno to grep_opt

2018-04-22 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 22 2018, Taylor Blau wrote: I think [345]/6 would make much more sense as just one patch. Comments on them to follow... > In preparation of adding --column-number to 'git-grep(1)', we extend > grep_opt to take in the requisite new members. Just a nit: Makes sense to refer to these

Re: RFC: How should we handle un-deleted remote branches?

2018-04-22 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 22 2018, Andreas Heiduk wrote: > Am 22.04.2018 um 13:17 schrieb Ævar Arnfjörð Bjarmason: >> >> On Sun, Apr 22 2018, Andreas Heiduk wrote: >> >>> Am 20.04.2018 um 14:14 schrieb Ævar Arnfjörð Bjarmason: >>>> But this is a possible work-aro

Re: RFC: How should we handle un-deleted remote branches?

2018-04-22 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 22 2018, Andreas Heiduk wrote: > Am 20.04.2018 um 14:14 schrieb Ævar Arnfjörð Bjarmason: >> But this is a possible work-around: >> >> git init /tmp/empty.git >> git remote add avar file:///tmp/empty.git >> git remote prune avar >>

<    5   6   7   8   9   10   11   12   13   14   >