[PATCH v2 4/4] am: fix --interactive HEAD tree resolution

2019-05-23 Thread Jeff King
In --interactive mode, "git am --resolved" will try to generate a patch based on what is in the index, so that it can prompt "apply this patch?". To do so it needs the tree of HEAD, which it tries to get with get_oid_tree(). However, this doesn't yield a tree object; the "tree" part just means "if

git archive generates tar with malformed pax extended attribute

2019-05-23 Thread Keegan Carruthers-Smith
Hello, git archive can generate a malformed tar archive. bsdtar reports the error "tar: Ignoring malformed pax extended attribute" when reading the archive. Go's "tar/archive" package also reports the error "archive/tar: invalid tar header". However, BusyBox's tar does not report the error (unsure

Re: [PATCH 4/4] am: fix --interactive HEAD tree resolution

2019-05-23 Thread Jeff King
On Thu, May 23, 2019 at 09:12:27AM +0200, Johannes Schindelin wrote: > > + if (!get_oid("HEAD", &head)) { > > + struct object *obj; > > + struct commit *commit; > > + > > + obj = parse_object_or_die(&head, NULL); > > + commit = object_as_type(the_repositor

Re: [PATCH 3/4] am: drop tty requirement for --interactive

2019-05-23 Thread Jeff King
On Thu, May 23, 2019 at 08:44:31AM +0200, Johannes Schindelin wrote: > > perl test-terminal.perl sh -c ' > > for i in 0 1 2; do > > echo $i is $(test -t $i || echo not) a tty > > done > > ' > > > it _usually_ says "0 is a tty", but racily may say "not a tty". If you > > pu

Re: [GSoC] How to protect cached_objects

2019-05-23 Thread Jeff King
On Thu, May 23, 2019 at 01:51:47PM -0300, Matheus Tavares Bernardino wrote: > As one of my first tasks in GSoC, I'm looking to protect the global > states at sha1-file.c for future parallelizations. Currently, I'm > analyzing how to deal with the cached_objects array, which is a small > set of in-

Re: [PATCH v2] server-info: do not list unlinked packs

2019-05-23 Thread Jeff King
On Thu, May 23, 2019 at 05:27:23PM +, Eric Wong wrote: > ALLOC_GROW makes the whole thing much nicer. > Thanks for the hint :> > > -8<- > Subject: [PATCH] server-info: do not list unlinked packs This looks fine to me (though the "v2" note is in your co

Re: [PATCH v1 2/5] list-objects-filter-options: error is localizeable

2019-05-23 Thread Emily Shaffer
On Tue, May 21, 2019 at 05:21:51PM -0700, Matthew DeVore wrote: > The "invalid filter-spec" message is user-facing and not a BUG, so make > it localizeable. What does it look like? Is it human-readable in its current form? I ask because (without having looked ahead) I think you're going to move it

Re: [PATCH v1 1/5] list-objects-filter: refactor into a context struct

2019-05-23 Thread Emily Shaffer
On Tue, May 21, 2019 at 05:21:50PM -0700, Matthew DeVore wrote: > The next patch will create and manage filters in a new way, which means > that this bundle of data will have to be managed at a new callsite. Make > this bundle of data more manageable by putting it in a struct and > making it part o

[PATCH] clone: respect user supplied origin name when setting up partial clone

2019-05-23 Thread Xin Li
Signed-off-by: Xin Li Reviewed-by: Jonathan Nieder --- builtin/clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/clone.c b/builtin/clone.c index 50bde99618..822208a346 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1215,7 +1215,7 @@ int cmd_clone(int arg

Re: [PATCH] Use user supplied origin name for extension.partialcone instead of hardcoded value.

2019-05-23 Thread Jonathan Nieder
Xin Li wrote: > Subject: Use user supplied origin name for extension.partialcone instead of > hardcoded value. Good catch! Nits: - s/partialcone/partialclone/ (missing "l") - subject lines in git.git tend to be of the form "subsystem: lowercase summary" with no trailing period. So maybe

[PATCH] Use user supplied origin name for extension.partialcone instead of hardcoded value.

2019-05-23 Thread Xin Li
Signed-off-by: Xin Li --- builtin/clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/clone.c b/builtin/clone.c index 50bde99618..822208a346 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1215,7 +1215,7 @@ int cmd_clone(int argc, const char **argv, const ch

Re: standalone library/tool to query commit-graph?

2019-05-23 Thread Derrick Stolee
On 5/23/2019 6:20 PM, SZEDER Gábor wrote: > On Thu, May 23, 2019 at 11:54:22PM +0200, Ævar Arnfjörð Bjarmason wrote: >> >> On Thu, May 23 2019, Jakub Narebski wrote: >> >>> Derrick Stolee writes: On 5/22/2019 2:49 PM, Karl Ostmo wrote: >>> > After producing the file ".git/objects/info/com

[PATCH v3] builtin/merges: clarify --squash behavior with --commit

2019-05-23 Thread Vishal Verma
From: Vishal Verma Convert option_commit to tristate, representing the states of 'default/untouched', 'enabled-by-cli', 'disabled-by-cli'. With this in place, check whether option_commit was enabled by cli when squashing a merge. If so, error out, as this is not supported. Previously, when --squ

Re: standalone library/tool to query commit-graph?

2019-05-23 Thread SZEDER Gábor
On Thu, May 23, 2019 at 11:54:22PM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Thu, May 23 2019, Jakub Narebski wrote: > > > Derrick Stolee writes: > >> On 5/22/2019 2:49 PM, Karl Ostmo wrote: > > > >>> After producing the file ".git/objects/info/commit-graph" with the > >>> command "git commit

Re: standalone library/tool to query commit-graph?

2019-05-23 Thread Ævar Arnfjörð Bjarmason
On Thu, May 23 2019, Jakub Narebski wrote: > Derrick Stolee writes: >> On 5/22/2019 2:49 PM, Karl Ostmo wrote: > >>> After producing the file ".git/objects/info/commit-graph" with the >>> command "git commit-graph write", is there a way to answer queries >>> like "git merge-base --is-ancestor"

Re: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Ævar Arnfjörð Bjarmason
On Thu, May 23 2019, Jonathan Nieder wrote: > Eric S. Raymond wrote: >> Jakub Narebski : > >>> Currently Git makes use of the fact that SHA-1 and SHA-256 identifiers >>> are of different lengths to distinguish them (see section "Meaning of >>> signatures") in Documentation/technical/hash-functio

RE: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Randall S. Becker
On May 23, 2019 17:19, Eric S. Raymond wrote: > Jonathan Nieder : > > Honestly, I do think you have missed some fundamental issues. > > https://public-inbox.org/git/ab3222ab-9121-9534-1472- > fac790bf08a4@gmai > > l.com/ > > discusses this further. > > Have re-read. That was a different pair of p

Re: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Eric S. Raymond
Jonathan Nieder : > Honestly, I do think you have missed some fundamental issues. > https://public-inbox.org/git/ab3222ab-9121-9534-1472-fac790bf0...@gmail.com/ > discusses this further. Have re-read. That was a different pair of proposals. I have abandoned the idea of forcing timestamp uniquene

Re: New diff test failures on s390x architecture (was: [ANNOUNCE] Git v2.22.0-rc1)

2019-05-23 Thread Todd Zullinger
Hi, Duy Nguyen wrote: > On Fri, May 24, 2019 at 2:14 AM Todd Zullinger wrote: >> I am guessing it's no coincidence that this only fails on >> s390x and it is the only big endian architecture in the >> fedora build system. > > I see a problem with -w and wrong type casting. sizeof(int) and > size

Re: Revision walking, commit dates, slop

2019-05-23 Thread Jakub Narebski
Derrick Stolee writes: > On 5/22/2019 2:29 PM, Jakub Narebski wrote: >> Derrick Stolee writes: >>> On 5/20/2019 7:27 PM, Jakub Narebski wrote: >> >> Restating it yet again: >> >>A. corrected_date(C) = max(committer_date(C), >>max_P(committer_date(P) + offset(

RE: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh

2019-05-23 Thread Johannes Schindelin
Hi Randall, On Thu, 23 May 2019, Randall S. Becker wrote: > On May 21, 2019 20:48, brian m. carlson wrote: > > To: Randall S. Becker > > Cc: 'Git Mailing List' > > Subject: Re: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh > > > > On 2019-05-21 at 21:47:54, Randall S. Becker wrote: > > > When run

RE: Issues with t7519.19, was RE: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh

2019-05-23 Thread Johannes Schindelin
Hi Randall, On Thu, 23 May 2019, Randall S. Becker wrote: > On May 23, 2019 16:06, Johannes Schindelin wrote: > > On Wed, 22 May 2019, Randall S. Becker wrote: > > > > > On May 21, 2019 20:48, brian m. carlson wrote: > > > > To: Randall S. Becker > > > > Cc: 'Git Mailing List' > > > > Subject:

Re: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Jonathan Nieder
Eric S. Raymond wrote: > Jakub Narebski : >> Currently Git makes use of the fact that SHA-1 and SHA-256 identifiers >> are of different lengths to distinguish them (see section "Meaning of >> signatures") in Documentation/technical/hash-function-transition.txt > > That's the obvious hack. As a fu

Re: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Eric S. Raymond
Jonathan Nieder : > In other words, usually the benefit of supporting multiple hash > functions as a reader is that you want the strength of the strongest > of those hash functions and you need a migration path to get there. > If you don't have a way to eventually drop support for the weaker > hash

Re: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Eric S. Raymond
Jakub Narebski : > You want both more (stable IDs for all commits, not only those signed) > and less (you don't need verification down the tree using IDs used for > commit ID). That's right. My assumption is that future VCSes will do their own hash chaining in ways we don't really want to try to

Re: [PATCH 0/2] Fix fsmonitor after discard_index()

2019-05-23 Thread Johannes Schindelin
Hi Ævar, On Mon, 18 Mar 2019, Ævar Arnfjörð Bjarmason wrote: > > On Sat, Mar 16 2019, Johannes Schindelin via GitGitGadget wrote: > > > It was reported by Ævar Arnfjörð Bjarmason > > [https://public-inbox.org/git/nycvar.qro.7.76.6.1903142058130...@tvgsbejvaqbjf.bet/T/#mb8718fe52e4721dacd3b143a091

Re: [PATCH v4] grep: fail if call could output and name is null

2019-05-23 Thread Jonathan Nieder
Emily Shaffer wrote: > Signed-off-by: Emily Shaffer > Reviewed-by: Jonathan Nieder > --- > Since v3, only the commit message has changed. Reworked based on > Jonathan Nieder's suggestions (with some modifications for readability). > > grep.c | 4 > 1 file changed, 4 insertions(+) This is

Re: New diff test failures on s390x architecture (was: [ANNOUNCE] Git v2.22.0-rc1)

2019-05-23 Thread Duy Nguyen
On Fri, May 24, 2019 at 2:14 AM Todd Zullinger wrote: > > I wrote: > > While running the 2.22.0-rc1 tests on Fedora, I hit a few > > new test failures since 2.21.0 -- but only on the s390x > > architecture. > > > > I haven't had time to dig into these the past few days, so I > > thought I would se

[PATCH v4] grep: fail if call could output and name is null

2019-05-23 Thread Emily Shaffer
grep_source(), which performs much of the work for Git's grep library, allows passing an arbitrary struct grep_source which represents the text which grep_source() should search to match a pattern in the provided struct grep_opt. In most callers, the grep_source::name field is set to an appropriate

RE: Issues with t7519.19, was RE: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh

2019-05-23 Thread Randall S. Becker
On May 23, 2019 16:06, Johannes Schindelin wrote: > On Wed, 22 May 2019, Randall S. Becker wrote: > > > On May 21, 2019 20:48, brian m. carlson wrote: > > > To: Randall S. Becker > > > Cc: 'Git Mailing List' > > > Subject: Re: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh > > > > > > On 2019-05-21

Re: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Jonathan Nieder
Hi, Jakub Narebski wrote: > I think Documentation/technical/hash-function-transition.txt misses > considerations for fast-import format (it talks about problem with > submodules, shallow clones, and currently not solved problem of > translating notes; it does not talk about git-replace, either).

Issues with t7519.19, was RE: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh

2019-05-23 Thread Johannes Schindelin
Hi Randall, On Wed, 22 May 2019, Randall S. Becker wrote: > On May 21, 2019 20:48, brian m. carlson wrote: > > To: Randall S. Becker > > Cc: 'Git Mailing List' > > Subject: Re: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh > > > > On 2019-05-21 at 21:47:54, Randall S. Becker wrote: > > > When run

RE: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh

2019-05-23 Thread Randall S. Becker
On May 21, 2019 20:48, brian m. carlson wrote: > To: Randall S. Becker > Cc: 'Git Mailing List' > Subject: Re: [Breakage] 2.22.0-rc1 t5401-update-hooks.sh > > On 2019-05-21 at 21:47:54, Randall S. Becker wrote: > > When running the test in isolation, it passes without incident whether > > or not

Re: New diff test failures on s390x architecture (was: [ANNOUNCE] Git v2.22.0-rc1)

2019-05-23 Thread Todd Zullinger
I wrote: > While running the 2.22.0-rc1 tests on Fedora, I hit a few > new test failures since 2.21.0 -- but only on the s390x > architecture. > > I haven't had time to dig into these the past few days, so I > thought I would send what I do have in case the problem is > obvious to someone else. I

Re: [PATCH v3] repack: enable bitmaps by default on bare repos

2019-05-23 Thread Ævar Arnfjörð Bjarmason
On Thu, May 23 2019, Jeff King wrote: > On Wed, Apr 10, 2019 at 06:57:21PM -0400, Jeff King wrote: > >> 2. The answer we get from a bitmap versus a regular traversal are not >> apples-to-apples equivalent. The regular traversal walks down to >> the UNINTERESTING commits, marks the bo

Re: standalone library/tool to query commit-graph?

2019-05-23 Thread Jakub Narebski
Derrick Stolee writes: > On 5/22/2019 2:49 PM, Karl Ostmo wrote: >> After producing the file ".git/objects/info/commit-graph" with the >> command "git commit-graph write", is there a way to answer queries >> like "git merge-base --is-ancestor" without having a .git directory? >> E.g. is there a l

Re: RFC: Separate commit identification from Merkle hashing

2019-05-23 Thread Jakub Narebski
e...@thyrsus.com (Eric S. Raymond) writes: > I have been thinking hard about the problems raised during my > request for unique timestamps. I think I've found a better way > to bust the box I was trying to break out of. I am therefore > withdrawing that proposal and replacing it with this one. >

Problem using 'submodule.recurse'

2019-05-23 Thread Maksim Odnoletkov
I have a problem using 'submodule.recurse' config option. I want to use it and at the same time fine-tune behavior for individual commands with more specific options. For example to keep 'on-demand' behavior for 'fetch' and 'pull'. * If I put 'fetch.recurseSubmodules = on-demand' *below* 'subm

[PATCH v2] server-info: do not list unlinked packs

2019-05-23 Thread Eric Wong
Jeff King wrote: > On Thu, May 23, 2019 at 08:59:59AM +, Eric Wong wrote: > > > > We never delete entries from the in-memory packed_git list; a reprepare > > > only adds to the list. You'd need to teach update_server_info() to > > > ignore packs which are no longer present (or switch to exec-

[GSoC] How to protect cached_objects

2019-05-23 Thread Matheus Tavares Bernardino
Hi, everyone As one of my first tasks in GSoC, I'm looking to protect the global states at sha1-file.c for future parallelizations. Currently, I'm analyzing how to deal with the cached_objects array, which is a small set of in-memory objects that read_object_file() is able to return although they

New diff test failures on s390x architecture (was: [ANNOUNCE] Git v2.22.0-rc1)

2019-05-23 Thread Todd Zullinger
[-cc: lkml, +cc: Duy as author of a good number of diff-related commits in 2.22.0 :) ] Hi, While running the 2.22.0-rc1 tests on Fedora, I hit a few new test failures since 2.21.0 -- but only on the s390x architecture. I haven't had time to dig into these the past few days, so I thought I would

Re: [PATCH 0/1] trace2: fix tracing when NO_PTHREADS is defined

2019-05-23 Thread Jeff Hostetler
On 5/23/2019 1:51 AM, Jeff King wrote: On Wed, May 22, 2019 at 09:23:39AM -0400, Jeff Hostetler wrote: I was wondering about that too as the proper long term solution. We would need (as the discussion suggests [1]) to properly respect/represent the pthread_key_t argument. For now, I've guar

Re: [PATCH v2 09/11] commit-graph: merge commit-graph chains

2019-05-23 Thread Derrick Stolee
On 5/22/2019 8:43 PM, Ævar Arnfjörð Bjarmason wrote: > > On Wed, May 22 2019, Derrick Stolee via GitGitGadget wrote: > >> To keep lookups fast, but also keep most incremental writes fast, create >> a strategy for merging levels of the commit-graph chain. The strategy is >> detailed in the commit-

Re: [PATCH v3] repack: enable bitmaps by default on bare repos

2019-05-23 Thread Derrick Stolee
On 5/23/2019 7:30 AM, Jeff King wrote: > On Wed, Apr 10, 2019 at 06:57:21PM -0400, Jeff King wrote: > >> 2. The answer we get from a bitmap versus a regular traversal are not >> apples-to-apples equivalent. The regular traversal walks down to >> the UNINTERESTING commits, marks the bou

Re: [PATCH v3] repack: enable bitmaps by default on bare repos

2019-05-23 Thread Jeff King
On Wed, Apr 10, 2019 at 06:57:21PM -0400, Jeff King wrote: > 2. The answer we get from a bitmap versus a regular traversal are not > apples-to-apples equivalent. The regular traversal walks down to > the UNINTERESTING commits, marks the boundaries trees and blobs as > UNINTERESTIN

urgent

2019-05-23 Thread MARTINS DONALD
Bonjour cher ami, Mon nom est (Farouk Martin Abdel) De la Libye en Afrique du Nord, je me suis échappé de mon pays vers le Togo où je me suis réfugiéau sein de la paroisse ( la mission de l'Alliance) du camp des réfugiés du Togo après l'assassinat de mes parents par des rebelles armés. Mont défunt

Re: [PATCH] server-info: do not list unlinked packs

2019-05-23 Thread Jeff King
On Thu, May 23, 2019 at 08:59:59AM +, Eric Wong wrote: > > We never delete entries from the in-memory packed_git list; a reprepare > > only adds to the list. You'd need to teach update_server_info() to > > ignore packs which are no longer present (or switch to exec-ing a > > separate update-se

Re: [PATCH v3] doc: hint about GIT_DEBUGGER in CodingGuidelines

2019-05-23 Thread Eric Sunshine
On Wed, May 22, 2019 at 8:56 PM Emily Shaffer wrote: > We check for a handy environment variable GIT_DEBUGGER when running via > bin-wrappers/, but this feature is undocumented. Add a hint to how to > use it into the CodingGuidelines (which is where other useful > environment settings like DEVELOP

Re: [PATCH] Make stashing nothing exit 1

2019-05-23 Thread Maksim Odnoletkov
> On 23 May 2019, at 07:14, Johannes Sixt wrote: > >> Am 23.05.19 um 01:57 schrieb Maksim Odnoletkov: >> The problem with current behaviour is it makes it hard to use stash in >> scripts. A natural stash use case is: wrap some operation requiring a >> clean working tree with a stash push-pop pair.

[PATCH] server-info: do not list unlinked packs

2019-05-23 Thread Eric Wong
Jeff King wrote: > On Wed, May 15, 2019 at 08:38:39PM +, Eric Wong wrote: > > > I've also noticed objects/info/packs contains stale entries > > after repack/gc runs on current git. > > > > Tried adding reprepare_packed_git before update_server_info, > > but that didn't seem to work; so maybe

Re: [PATCH 4/4] am: fix --interactive HEAD tree resolution

2019-05-23 Thread Johannes Schindelin
Hi Peff, On Mon, 20 May 2019, Jeff King wrote: > In interactive mode, "git am -i --resolved" will try to generate a patch > based on what is in the index, so that it can prompt "apply this > patch?". To do so it needs the tree of HEAD, which it tries to get with > get_oid_tree(). However, this do