Re: [PATCH v2 3/7] prefer "!=" when checking read_in_full() result

2017-09-26 Thread Junio C Hamano
Jeff King writes: > diff --git a/csum-file.c b/csum-file.c > index a172199e44..2adae04073 100644 > --- a/csum-file.c > +++ b/csum-file.c > @@ -19,7 +19,7 @@ static void flush(struct sha1file *f, const void *buf, > unsigned int count) > > if (ret < 0) > die_e

Re: [PATCH v2 4/7] avoid looking at errno for short read_in_full() returns

2017-09-26 Thread Junio C Hamano
Jeff King writes: > When a caller tries to read a particular set of bytes via > read_in_full(), there are three possible outcomes: > > 1. An error, in which case -1 is returned and errno is > set. > > 2. A short read, in which fewer bytes are returned and > errno is unspecified (we

Re: [PATCH v2 0/7] read/write_in_full leftovers

2017-09-26 Thread Junio C Hamano
Jeff King writes: > I dropped the "read_in_full() should set errno on short reads" idea (3/7 > in the earlier series). It really is the caller's fault for looking at > errno when they know there hasn't been an error in the first place. We > should just bite the bullet and have the callers do the

[PATCH v2] git: add --no-optional-locks option

2017-09-26 Thread Jeff King
This is an update of my --no-optional-locks patch. The only difference is that I updated the documentation to be a bit less clunky (Thanks, Kaartic). For the other comments on v1, I decided not to make any changes: - JSixt suggested marking this as a local-repo variable. I think we really d

Re: [PATCH] git: add --no-optional-locks option

2017-09-26 Thread Jeff King
On Mon, Sep 25, 2017 at 11:51:31AM -0700, Stefan Beller wrote: > > diff --git a/read-cache.c b/read-cache.c > > index 65f4fe8375..fc1ba122a3 100644 > > --- a/read-cache.c > > +++ b/read-cache.c > > @@ -1563,7 +1563,8 @@ static int read_index_extension(struct index_state > > *istate, > > > > int

Re: [PATCH] git: add --no-optional-locks option

2017-09-26 Thread Jeff King
On Sun, Sep 24, 2017 at 01:08:41PM +0530, Kaartic Sivaraam wrote: > On Thursday 21 September 2017 10:02 AM, Jeff King wrote: > > Some tools like IDEs or fancy editors may periodically run > > commands like "git status" in the background to keep track > > of the state of the repository. > > I migh

Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-26 Thread Stefan Beller
> +extern enum protocol_version get_protocol_version_config(void); > +extern enum protocol_version determine_protocol_version_server(void); > +extern enum protocol_version determine_protocol_version_client(const char > *server_response); It would be cool to have some documentation here.

Re: [PATCH v2 7/9] connect: tell server that the client understands v1

2017-09-26 Thread Junio C Hamano
Junio C Hamano writes: >> +# Client requested to use protocol v1 >> +grep "version=1" log && >> +# Server responded using protocol v1 >> +grep "clone< version 1" log > > This looked a bit strange to check "clone< version 1" for one > direction, but did not check "$something> versi

Re: [PATCH v2 8/9] http: tell server that the client understands v1

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > @@ -897,6 +898,21 @@ static void set_from_env(const char **var, const char > *envname) > *var = val; > } > > +static void protocol_http_header(void) > +{ > + if (get_protocol_version_config() > 0) { > + struct strbuf protocol_header = S

Re: [PATCH v2 7/9] connect: tell server that the client understands v1

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > Teach the connection logic to tell a serve that it understands protocol > v1. This is done in 2 different ways for the built in protocols. > > 1. git:// >A normal request is structured as "command path/to/repo\0host=..\0" >and due to a bug in an old version of

[PATCH 3/3] validate_headref: use get_oid_hex for detached HEADs

2017-09-26 Thread Jeff King
If a candidate HEAD isn't a symref, we check that it contains a viable sha1. But in a post-sha1 world, we should be checking whether it has any plausible object-id. We can do that by switching to get_oid_hex(). Note that both before and after this patch, we only check for a plausible object id at

[PATCH 0/3] validate_headref: avoid reading uninitialized bytes

2017-09-26 Thread Jeff King
While looking at read_in_full() callers for a nearby patch series, I noticed this fairly harmless bug. The first patch fixes it, and the other two do some cleanups on top. I'm tempted to say the whole thing ought to just use a strbuf. We typically only call this function once per program, and git

[PATCH 1/3] validate_headref: NUL-terminate HEAD buffer

2017-09-26 Thread Jeff King
When we are checking to see if we have a git repo, we peek into the HEAD file and see if it's a plausible symlink, symref, or detached HEAD. For the latter two, we read the contents with read_in_full(), which means they aren't NUL-terminated. The symref check is careful to respect the length we go

[PATCH 2/3] validate_headref: use skip_prefix for symref parsing

2017-09-26 Thread Jeff King
Since the previous commit guarantees that our symref buffer is NUL-terminated, we can just use skip_prefix() and friends to parse it. This is shorter and saves us having to deal with magic numbers and keeping the "len" counter up to date. While we're at it, let's name the rather obscure "buf" to "

[PATCH v2 7/7] worktree: check the result of read_in_full()

2017-09-26 Thread Jeff King
We try to read "len" bytes into a buffer and just assume that it happened correctly. In practice this should usually be the case, since we just stat'd the file to get the length. But we could be fooled by transient errors or by other processes racily truncating the file. Let's be more careful. Th

[PATCH v2 5/7] distinguish error versus short read from read_in_full()

2017-09-26 Thread Jeff King
Many callers of read_in_full() expect to see the exact number of bytes requested, but their error handling lumps together true read errors and short reads due to unexpected EOF. We can give more specific error messages by separating these cases (showing errno when appropriate, and otherwise descri

[PATCH v2 6/7] worktree: use xsize_t to access file size

2017-09-26 Thread Jeff King
To read the "gitdir" file into memory, we stat the file and allocate a buffer. But we store the size in an "int", which may be truncated. We should use a size_t and xsize_t(), which will detect truncation. An overflow is unlikely for a "gitdir" file, but it's a good practice to model. Signed-off-

[PATCH v2 4/7] avoid looking at errno for short read_in_full() returns

2017-09-26 Thread Jeff King
When a caller tries to read a particular set of bytes via read_in_full(), there are three possible outcomes: 1. An error, in which case -1 is returned and errno is set. 2. A short read, in which fewer bytes are returned and errno is unspecified (we never saw a read error, so we

[PATCH v2 3/7] prefer "!=" when checking read_in_full() result

2017-09-26 Thread Jeff King
Comparing the result of read_in_full() using less-than is potentially dangerous, as a negative return value may be converted to an unsigned type and be considered a success. This is discussed further in 561598cfcf (read_pack_header: handle signed/unsigned comparison in read result, 2017-09-13). Ea

[PATCH v2 2/7] notes-merge: drop dead zero-write code

2017-09-26 Thread Jeff King
We call write_in_full() with a size that we know is greater than zero. The return value can never be zero, then, since write_in_full() converts such a failed write() into ENOSPC and returns -1. We can just drop this branch of the error handling entirely. Suggested-by: Jonathan Nieder Signed-off-

[PATCH v2 1/7] files-backend: prefer "0" for write_in_full() error check

2017-09-26 Thread Jeff King
Commit 06f46f237a (avoid "write_in_full(fd, buf, len) != len" pattern, 2017-09-13) converted this callsite from: write_in_full(...) != 1 to write_in_full(...) < 0 But during the conflict resolution in c50424a6f0 (Merge branch 'jk/write-in-full-fix', 2017-09-25), this morphed into write_i

[PATCH v2 0/7] read/write_in_full leftovers

2017-09-26 Thread Jeff King
On Mon, Sep 25, 2017 at 04:26:47PM -0400, Jeff King wrote: > This series addresses the bits leftover from the discussion two weeks > ago in: > > > https://public-inbox.org/git/20170913170807.cyx7rrpoyhaau...@sigill.intra.peff.net/ > > and its subthread. I don't think any of these is a real pr

Re: [PATCH v2 6/9] connect: teach client to recognize v1 server response

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > +/* Returns 1 if packet_buffer is a protocol version pkt-line, 0 otherwise. */ > +static int process_protocol_version(void) > +{ > + switch (determine_protocol_version_client(packet_buffer)) { > + case protocol_v1: > + return 1; > +

Re: [PATCH v2 5/9] upload-pack, receive-pack: introduce protocol version 1

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > @@ -1963,6 +1964,19 @@ int cmd_receive_pack(int argc, const char **argv, > const char *prefix) > else if (0 <= receive_unpack_limit) > unpack_limit = receive_unpack_limit; > > + switch (determine_protocol_version_server()) { > + case proto

Re: [PATCH v2 4/9] daemon: recognize hidden request arguments

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > A normal request to git-daemon is structured as > "command path/to/repo\0host=..\0" and due to a bug in an old version of > git-daemon 73bb33a94 (daemon: Strictly parse the "extra arg" part of the > command, 2009-06-04) we aren't able to place any extra args (separated

Re: -s theirs use-case(s) Was: BUG: merge -s theirs is not in effect

2017-09-26 Thread Yaroslav Halchenko
On Wed, 27 Sep 2017, Junio C Hamano wrote: > > and that is where the gotcha comes -- what if "my" changes were already > > published? then I would like to avoid the rebase, and would -s theirs > > to choose "their" solution in favor of mine and be able to push so > > others could still "fast-for

Re: [PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > +`GIT_PROTOCOL`:: > + For internal use only. Used in handshaking the wire protocol. > + Contains a colon ':' separated list of keys with optional values > + 'key[=value]'. Presence of unknown keys must be tolerated. Is this meant to be used only on the "s

Re: [PATCH 3/7] read_in_full: reset errno before reading

2017-09-26 Thread Junio C Hamano
Jeff King writes: > You actually don't need errno for that. You can write: > > ret = read_in_full(..., size); > if (ret < 0) > die_errno("oops"); > else if (ret != size) > die("short read"); > > So I think using errno as a sentinel value to tell between the two cases > doesn't h

Re: [PATCH 3/7] read_in_full: reset errno before reading

2017-09-26 Thread Jeff King
On Tue, Sep 26, 2017 at 01:11:59PM +0900, Junio C Hamano wrote: > Jeff King writes: > > >> #ifndef EUNDERFLOW > >> # ifdef ENODATA > >> # define EUNDERFLOW ENODATA > >> # else > >> # define EUNDERFLOW ESPIPE > >> # endif > >> #endif > > > > Right, I think our mails just crossed but I'm leaning

Darlehensangebot

2017-09-26 Thread Norton Finance Company
Guten Tag Sir / ma, Wir Norton Finanzierung Unternehmen hier in Großbritannien gibt Darlehen an Kunden mit 2,4% Zinssatz. und auch Geld für Investitionen und andere finanzielle Zwecke unabhängig von ihrer Lage, Geschlecht, Familienstand, Bildung, Job-Status, sondern muss ein gese

Re: [PATCH 1/1] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-26 Thread Junio C Hamano
"Eric Rannaud" writes: > Any comments on the testing strategy with a background fast-import? > > To summarize: > - fast-import is started in the background with a command stream that > ends with "checkpoint\nprogress checkpoint\n". fast-import keeps > running after reaching the last command (

REPLY NOW:

2017-09-26 Thread Mrs Mavis Wanczyk
Did you receive my previous message about my donation to you? for philanthropic and humanitarian work for all of mankind who are in great need among your friends, family and people around you. REPLY FOR MORE DETAILS. Regards Mrs Mavis Wanczyk.

Re: [PATCH] t7406: submodule..update command must not be run from .gitmodules

2017-09-26 Thread Junio C Hamano
Stefan Beller writes: > submodule..update can be assigned an arbitrary command via setting > it to "!command". When this command is found in the regular config, Git > ought to just run that command instead of other update mechanisms. > > However if that command is just found in the .gitmodules fi

Re: [PATCH 4/3] branch: fix "copy" to never touch HEAD

2017-09-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I do think however that we also need to update the docs, the relevant > origin/master...gitster/sd/branch-copy diff is currently: > > +The `-c` and `-C` options have the exact same semantics as `-m` and > +`-M`, except instead of the branch being renamed

Re: git apply fails silently when on the wrong directory

2017-09-26 Thread Jeff King
On Tue, Sep 26, 2017 at 05:53:55PM -0700, Ernesto Alfonso wrote: > I recently ran into a similar issue as described here: > > https://stackoverflow.com/questions/24821431/git-apply-patch-fails-silently-no-errors-but-nothing-happens > > I was using the alias: > > alias ganw='git diff -U0 -w --no

Re: [PATCH v2 6/9] connect: teach client to recognize v1 server response

2017-09-26 Thread Junio C Hamano
Brandon Williams writes: > +/* Returns 1 if packet_buffer is a protocol version pkt-line, 0 otherwise. */ > +static int process_protocol_version(void) > +{ > + switch (determine_protocol_version_client(packet_buffer)) { > + case protocol_v1: > + return 1; > +

Re: git apply fails silently when on the wrong directory

2017-09-26 Thread Ernesto Alfonso
Also, has there been a feature request for a '-w' option to 'git add', analogous to the same option in 'git diff'? Ernesto Alfonso writes: > I recently ran into a similar issue as described here: > > https://stackoverflow.com/questions/24821431/git-apply-patch-fails-silently-no-errors-but-nothin

git apply fails silently when on the wrong directory

2017-09-26 Thread Ernesto Alfonso
I recently ran into a similar issue as described here: https://stackoverflow.com/questions/24821431/git-apply-patch-fails-silently-no-errors-but-nothing-happens I was using the alias: alias ganw='git diff -U0 -w --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -' to stag

Re: [PATCH] submodule: correct error message for missing commits.

2017-09-26 Thread Junio C Hamano
Stefan Beller writes: > When a submodule diff should be displayed we currently just add the > submodule objects to the main object store and then e.g. walk the > revision graph and create a summary for that submodule. > > It is possible that we are missing the submodule either completely or > par

Re: [PATCH 0/3] Comment fixes

2017-09-26 Thread Junio C Hamano
Han-Wen Nienhuys writes: > follow more commit log conventions; verified it compiled (yay). ;-) > (should I send patches that are in 'pu' again as well?) Because these look more or less independent changes that can be queued on separate topics, I do not think resending is needed at all, even th

Re: -s theirs use-case(s) Was: BUG: merge -s theirs is not in effect

2017-09-26 Thread Junio C Hamano
Yaroslav Halchenko writes: > and that is where the gotcha comes -- what if "my" changes were already > published? then I would like to avoid the rebase, and would -s theirs > to choose "their" solution in favor of mine and be able to push so > others could still "fast-forward" to the new state.

Re: [PATCH v2 0/9] Teach 'run' perf script to read config files

2017-09-26 Thread Junio C Hamano
Roberto Tyley writes: > I had a quick look at git-send-email.perl, I see the trick is the `time++` one > introduced with https://github.com/git/git/commit/a5370b16 - seems reasonable! > > SubmitGit makes all emails in-reply-to the initial email, which I > think is correct behaviour, > but I can s

[PATCH v2 0/9] protocol transition

2017-09-26 Thread Brandon Williams
v2 of this series has the following changes: * Included Jonathan Tan's patch as [1/9] with a small tweak to not rely on hardcoding the side of sha1 into the capability line check. * Reworked some of the logic in daemon.c * Added the word 'Experimental' to protocol.version to indicate that us

[PATCH v2 5/9] upload-pack, receive-pack: introduce protocol version 1

2017-09-26 Thread Brandon Williams
Teach upload-pack and receive-pack to understand and respond using protocol version 1, if requested. Protocol version 1 is simply the original and current protocol (what I'm calling version 0) with the addition of a single packet line, which precedes the ref advertisement, indicating the protocol

[PATCH v2 8/9] http: tell server that the client understands v1

2017-09-26 Thread Brandon Williams
Tell a server that protocol v1 can be used by sending the http header 'Git-Protocol' indicating this. Also teach the apache http server to pass through the 'Git-Protocol' header as an environment variable 'GIT_PROTOCOL'. Signed-off-by: Brandon Williams --- cache.h | 2 ++ http.

[PATCH v2 3/9] protocol: introduce protocol extention mechanisms

2017-09-26 Thread Brandon Williams
Create protocol.{c,h} and provide functions which future servers and clients can use to determine which protocol to use or is being used. Also introduce the 'GIT_PROTOCOL' environment variable which will be used to communicate a colon separated list of keys with optional values to a server. Unkno

[PATCH v2 2/9] pkt-line: add packet_write function

2017-09-26 Thread Brandon Williams
Add a function which can be used to write the contents of an arbitrary buffer. This makes it easy to build up data in a buffer before writing the packet instead of formatting the entire contents of the packet using 'packet_write_fmt()'. Signed-off-by: Brandon Williams --- pkt-line.c | 6 ++

[PATCH v2 1/9] connect: in ref advertisement, shallows are last

2017-09-26 Thread Brandon Williams
From: Jonathan Tan Currently, get_remote_heads() parses the ref advertisement in one loop, allowing refs and shallow lines to intersperse, despite this not being allowed by the specification. Refactor get_remote_heads() to use two loops instead, enforcing that refs come first, and then shallows.

[PATCH v2 7/9] connect: tell server that the client understands v1

2017-09-26 Thread Brandon Williams
Teach the connection logic to tell a serve that it understands protocol v1. This is done in 2 different ways for the built in protocols. 1. git:// A normal request is structured as "command path/to/repo\0host=..\0" and due to a bug in an old version of git-daemon 73bb33a94 (daemon: Stric

[PATCH v2 9/9] i5700: add interop test for protocol transition

2017-09-26 Thread Brandon Williams
Signed-off-by: Brandon Williams --- t/interop/i5700-protocol-transition.sh | 68 ++ 1 file changed, 68 insertions(+) create mode 100755 t/interop/i5700-protocol-transition.sh diff --git a/t/interop/i5700-protocol-transition.sh b/t/interop/i5700-protocol-transiti

[PATCH v2 4/9] daemon: recognize hidden request arguments

2017-09-26 Thread Brandon Williams
A normal request to git-daemon is structured as "command path/to/repo\0host=..\0" and due to a bug in an old version of git-daemon 73bb33a94 (daemon: Strictly parse the "extra arg" part of the command, 2009-06-04) we aren't able to place any extra args (separated by NULs) besides the host. In orde

[PATCH v2 6/9] connect: teach client to recognize v1 server response

2017-09-26 Thread Brandon Williams
Teach a client to recognize that a server understands protocol v1 by looking at the first pkt-line the server sends in response. This is done by looking for the response "version 1" send by upload-pack or receive-pack. Signed-off-by: Brandon Williams --- connect.c | 30 +

Re: RFC v3: Another proposed hash function transition plan

2017-09-26 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > Sorry, you are asking cryptography experts to spend their time on the Git > mailing list. I tried to get them to speak out on the Git mailing list. > They respectfully declined. > > I can't fault them, they have real jobs to do, and none of their managers > would

Re: [PATCH] technical doc: add a design doc for hash function transition

2017-09-26 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > From: Jonathan Nieder I go by jrnie...@gmail.com upstream. :) > This is "RFC v3: Another proposed hash function transition plan" from > the git mailing list. > > Signed-off-by: Jonathan Nieder > Signed-off-by: Jonathan Tan > Signed-off-by: Brandon Williams > Signe

Re: [PATCH] submodule: correct error message for missing commits.

2017-09-26 Thread Jacob Keller
On Tue, Sep 26, 2017 at 11:27 AM, Stefan Beller wrote: > When a submodule diff should be displayed we currently just add the > submodule objects to the main object store and then e.g. walk the > revision graph and create a summary for that submodule. > > It is possible that we are missing the subm

Google indexing https://public-inbox.org/git (was: BUG in git diff-index)

2017-09-26 Thread Marc Herbert
[Reduced Cc: and change Subject:] On 26/09/17 13:11, Eric Wong wrote: > There's no blocks on public-inbox.org and I'm completely against > any sort of blocking/throttling. Maybe there's too many pages > to index? Or the Message-IDs in URLs are too ugly/scary? Not > sure what to do about that...

Re: [PATCH 09/13] rev-list: add object filtering support

2017-09-26 Thread Jonathan Tan
On Fri, 22 Sep 2017 20:30:13 + Jeff Hostetler wrote: > + if (filter_options.relax) { Add some documentation about how this differs from ignore_missing_links in struct rev_info.

Re: [PATCH 07/13] object-filter: common declarations for object filtering

2017-09-26 Thread Jonathan Tan
On Fri, 22 Sep 2017 20:30:11 + Jeff Hostetler wrote: > Makefile| 1 + > object-filter.c | 269 > > object-filter.h | 173 > 3 files changed, 443 insertions(+) > create mode 100644 object

Re: [PATCH 03/13] list-objects: filter objects in traverse_commit_list

2017-09-26 Thread Jonathan Tan
On Fri, 22 Sep 2017 20:26:22 + Jeff Hostetler wrote: > From: Jeff Hostetler > > Create traverse_commit_list_filtered() and add filtering You mention _filtered() here, but this patch contains _worker(). > list-objects.h | 30 ++ > 2 files changed, 80 insertions(+),

[PATCH] technical doc: add a design doc for hash function transition

2017-09-26 Thread Stefan Beller
From: Jonathan Nieder This is "RFC v3: Another proposed hash function transition plan" from the git mailing list. Signed-off-by: Jonathan Nieder Signed-off-by: Jonathan Tan Signed-off-by: Brandon Williams Signed-off-by: Stefan Beller --- This takes the original Google Doc[1] and adds it to

Re: [PATCH 02/13] oidset2: create oidset subclass with object length and pathname

2017-09-26 Thread Jonathan Tan
On Fri, 22 Sep 2017 20:26:21 + Jeff Hostetler wrote: > From: Jeff Hostetler > > Create subclass of oidset where each entry has a > field to store the length of the object's content > and an optional pathname. > > This will be used in a future commit to build a > manifest of omitted objects

Re: RFC v3: Another proposed hash function transition plan

2017-09-26 Thread Johannes Schindelin
Hi Jason, On Tue, 26 Sep 2017, Jason Cooper wrote: > On Thu, Sep 14, 2017 at 08:45:35PM +0200, Johannes Schindelin wrote: > > On Wed, 13 Sep 2017, Linus Torvalds wrote: > > > On Wed, Sep 13, 2017 at 6:43 AM, demerphq wrote: > > > > SHA3 however uses a completely different design where it mixes a

Re: [PATCH 4/3] branch: fix "copy" to never touch HEAD

2017-09-26 Thread Ævar Arnfjörð Bjarmason
On Fri, Sep 22 2017, Junio C. Hamano jotted: > When creating a new branch B by copying the branch A that happens to > be the current branch, it also updates HEAD to point at the new > branch. It probably was made this way because "git branch -c A B" > piggybacked its implementation on "git branc

Re: BUG in git diff-index

2017-09-26 Thread Eric Wong
Marc Herbert wrote: > PS: I used NNTP and http://dir.gmane.org/gmane.comp.version-control.git > to quickly find this old thread (what could we do without NNTP?). Then > I googled for a web archive of this thread and Google could only find > this one: > http://git.661346.n2.nabble.com/BUG-in-git-d

[PATCH] t7406: submodule..update command must not be run from .gitmodules

2017-09-26 Thread Stefan Beller
submodule..update can be assigned an arbitrary command via setting it to "!command". When this command is found in the regular config, Git ought to just run that command instead of other update mechanisms. However if that command is just found in the .gitmodules file, it is potentially untrusted,

Re: [PATCH] t7406: submodule..update command must not be run from .gitmodules

2017-09-26 Thread Johannes Sixt
Am 26.09.2017 um 20:54 schrieb Stefan Beller: +test_expect_success 'submodule update - command in .gitmodules is ignored' ' + test_when_finished "git -C super reset --hard HEAD^" && + + git -C super config -f .gitmodules submodule.submodule.update "!false" && + git -C super com

Re: BUG in git diff-index

2017-09-26 Thread Marc Herbert
On 31/03/16 13:39, Junio C Hamano wrote: > Andy Lowry writes: > >> So I think now that the script should do "update-index --refresh" >> followed by "diff-index --quiet HEAD". Sound correct? > > Yes. That has always been one of the kosher ways for any script to > make sure that the files in the

Re: [PATCH v2 0/9] Teach 'run' perf script to read config files

2017-09-26 Thread Stefan Beller
> "Note: Amazon SES overrides any Date header you provide with the > time that Amazon > SES accepts the message." > > http://docs.aws.amazon.com/ses/latest/DeveloperGuide/header-fields.html > > ...so the only way SubmitGit can offset the times is to literally > delay the sending of the emails,

Re: [PATCH v2 0/9] Teach 'run' perf script to read config files

2017-09-26 Thread Roberto Tyley
On 26 September 2017 at 16:40, Christian Couder wrote: > On Sun, Sep 24, 2017 at 9:59 AM, Junio C Hamano wrote: >> Christian Couder writes: >> >>> (It looks like smtp.gmail.com isn't working anymore for me, so I am >>> trying to send this using Gmail for the cover letter and Submitgit for >>> th

Re: [PATCH 00/13] RFC object filtering for parital clone

2017-09-26 Thread Jeff Hostetler
On 9/26/2017 10:55 AM, Jeff Hostetler wrote: On 9/22/2017 8:39 PM, Jonathan Tan wrote: On Fri, 22 Sep 2017 20:26:19 + Jeff Hostetler wrote: ... I tried applying your patches and it doesn't apply cleanly on master. Could you try rebasing? In particular, the code references get_sha1_with

[PATCH] t7406: submodule..update command must not be run from .gitmodules

2017-09-26 Thread Stefan Beller
submodule..update can be assigned an arbitrary command via setting it to "!command". When this command is found in the regular config, Git ought to just run that command instead of other update mechanisms. However if that command is just found in the .gitmodules file, it is potentially untrusted,

Re: [PATCH v5] connect: in ref advertisement, shallows are last

2017-09-26 Thread Brandon Williams
On 09/26, Jonathan Tan wrote: > Currently, get_remote_heads() parses the ref advertisement in one loop, > allowing refs and shallow lines to intersperse, despite this not being > allowed by the specification. Refactor get_remote_heads() to use two > loops instead, enforcing that refs come first, an

[PATCH] submodule: correct error message for missing commits.

2017-09-26 Thread Stefan Beller
When a submodule diff should be displayed we currently just add the submodule objects to the main object store and then e.g. walk the revision graph and create a summary for that submodule. It is possible that we are missing the submodule either completely or partially, which we currently differen

[PATCH v5] connect: in ref advertisement, shallows are last

2017-09-26 Thread Jonathan Tan
Currently, get_remote_heads() parses the ref advertisement in one loop, allowing refs and shallow lines to intersperse, despite this not being allowed by the specification. Refactor get_remote_heads() to use two loops instead, enforcing that refs come first, and then shallows. This also makes it e

[ANNOUNCE] Git for Windows 2.14.2

2017-09-26 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.14.2 is available from: https://git-for-windows.github.io/ Changes since Git for Windows v2.14.1 (August 10th 2017) New Features * Comes with Git v2.14.2. * Comes with cURL v7.55.1. * The XP-compatibility layer

Re: RFC: Design and code of partial clones (now, missing commits and trees OK) (part 3)

2017-09-26 Thread Jonathan Tan
On Tue, 26 Sep 2017 10:25:16 -0400 Jeff Hostetler wrote: > >> Perhaps you could augment the OID lookup to remember where the object > >> was found (essentially a .promisor bit set). Then you wouldn't need > >> to touch them all. > > > > Sorry - I don't understand this. Are you saying that missi

Re: RFC v3: Another proposed hash function transition plan

2017-09-26 Thread Jason Cooper
Hi all, Sorry for late commentary... On Thu, Sep 14, 2017 at 08:45:35PM +0200, Johannes Schindelin wrote: > On Wed, 13 Sep 2017, Linus Torvalds wrote: > > On Wed, Sep 13, 2017 at 6:43 AM, demerphq wrote: > > > SHA3 however uses a completely different design where it mixes a 1088 > > > bit block

Re: [PATCH v2 0/9] Teach 'run' perf script to read config files

2017-09-26 Thread Christian Couder
On Sun, Sep 24, 2017 at 9:59 AM, Junio C Hamano wrote: > Christian Couder writes: > >> (It looks like smtp.gmail.com isn't working anymore for me, so I am >> trying to send this using Gmail for the cover letter and Submitgit for >> the patches.) > > SubmitGit may want to learn the "change the tim

Re: RFC: Design and code of partial clones (now, missing commits and trees OK)

2017-09-26 Thread Michael Haggerty
On 09/22/2017 12:42 AM, Jonathan Tan wrote: > On Thu, 21 Sep 2017 13:57:30 Jeff Hostetler wrote: > [...] >> I struggled with the terms here a little when looking at the source. >> () A remote responding to a partial-clone is termed a >> "promisor-remote". () Packfiles received from a promisor-remo

Re: git config credential.helper with absolute path on windows not working properly

2017-09-26 Thread bcampolo
My situation was a little different, but I was able to get this to work with some interesting escaping. helper = !"\"C:\\Path with spaces\\executable\"" --option1 value1 credential-helper $@ Notice the exclamation, quoted path of executable and extra escaped quotes inside of that, plus escaped ba

Re: [PATCH 00/13] RFC object filtering for parital clone

2017-09-26 Thread Jeff Hostetler
On 9/22/2017 8:39 PM, Jonathan Tan wrote: On Fri, 22 Sep 2017 20:26:19 + Jeff Hostetler wrote: This draft contains filters to: () omit all blobs () omit blobs larger than some size () omit blobs using a sparse-checkout specification In addition to specifying the filter criteria, the rev

Re: [PATCH] git: add --no-optional-locks option

2017-09-26 Thread Jeff Hostetler
On 9/25/2017 12:17 PM, Johannes Schindelin wrote: Hi Kaartic, On Sun, 24 Sep 2017, Kaartic Sivaraam wrote: On Thursday 21 September 2017 10:02 AM, Jeff King wrote: Some tools like IDEs or fancy editors may periodically run commands like "git status" in the background to keep track of the st

Re: RFC: Design and code of partial clones (now, missing commits and trees OK) (part 3)

2017-09-26 Thread Jeff Hostetler
On 9/22/2017 6:58 PM, Jonathan Tan wrote: On Fri, 22 Sep 2017 17:32:00 -0400 Jeff Hostetler wrote: I guess I'm afraid that the first call to is_promised() is going cause a very long pause as it loads up a very large hash of objects. Yes, the first call will cause a long pause. (I think fsc

Re: RFC: Design and code of partial clones (now, missing commits and trees OK) (part 2/3)

2017-09-26 Thread Jeff Hostetler
On 9/22/2017 6:52 PM, Jonathan Tan wrote: On Fri, 22 Sep 2017 17:19:50 -0400 Jeff Hostetler wrote: In your specific example, how would rev-list know, on the client, to include (or exclude) a large blob in its output if it does not have it, and thus does not know its size? The client doesn

Re: -X theirs does not resolve symlink conflict Was: BUG: merge -s theirs is not in effect

2017-09-26 Thread Yaroslav Halchenko
On Tue, 26 Sep 2017, Junio C Hamano wrote: > >> I do not recall people talking about symbolic links but the case of > >> binary files has been on the wishlist for a long time, and I do not > >> know of anybody who is working on (or is planning to work on) it. > > Ah, I misremembered. > > We've a

Re: -s theirs use-case(s) Was: BUG: merge -s theirs is not in effect

2017-09-26 Thread Yaroslav Halchenko
On Tue, 26 Sep 2017, Junio C Hamano wrote: > Yaroslav Halchenko writes: > > 1. As a workaround for absence of -m theirs I using mtheirs git alias: > > (I believe provided to me awhile back here on the list): > > mtheirs = !sh -c 'git merge -s ours --no-commit $1 && git read-tree -m > > -u

Re: [PATCH 4/4] Move documentation of string_list into string-list.h

2017-09-26 Thread Han-Wen Nienhuys
On Tue, Sep 26, 2017 at 7:22 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> >> Thanks. I am not sure if you can safely reorder the contents of the >> header files in general, but I trust that you made sure that this >> does not introduce problems (e.g. referrals before definition). > >

[PATCH 3/3] string-list.h: move documentation from Documentation/api/ into header

2017-09-26 Thread Han-Wen Nienhuys
This mirrors commit 'bdfdaa497 ("strbuf.h: integrate api-strbuf.txt documentation, 2015-01-16") which did the same for strbuf.h: * API documentation uses /** */ to set it apart from other comments. * Function names were stripped from the comments. * Ordering of the header was adjusted to follow

[PATCH 2/3] read_gitfile_gently: clarify return value ownership.

2017-09-26 Thread Han-Wen Nienhuys
Signed-off-by: Han-Wen Nienhuys --- setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.c b/setup.c index 42400fcc5..8c95841d5 100644 --- a/setup.c +++ b/setup.c @@ -541,7 +541,8 @@ void read_gitfile_error_die(int error_code, const char *path, const char *dir)

[PATCH 1/3] real_path: clarify return value ownership

2017-09-26 Thread Han-Wen Nienhuys
Signed-off-by: Han-Wen Nienhuys --- abspath.c | 4 1 file changed, 4 insertions(+) diff --git a/abspath.c b/abspath.c index 708aff8d4..985798532 100644 --- a/abspath.c +++ b/abspath.c @@ -202,6 +202,10 @@ char *strbuf_realpath(struct strbuf *resolved, const char *path, return retva

[PATCH 0/3] Comment fixes

2017-09-26 Thread Han-Wen Nienhuys
follow more commit log conventions; verified it compiled (yay). (should I send patches that are in 'pu' again as well?) Han-Wen Nienhuys (3): real_path: clarify return value ownership read_gitfile_gently: clarify return value ownership. string-list.h: move documentation from Documentation/a

[PATCH 1/1] fast-import: checkpoint: dump branches/tags/marks even if object_count==0

2017-09-26 Thread Eric Rannaud
The checkpoint command cycles packfiles if object_count != 0, a sensible test or there would be no pack files to write. Since 820b931012, the command also dumps branches, tags and marks, but still conditionally. However, it is possible for a command stream to modify refs or create marks without cre

Re: [PATCH v2 2/5] p0008-abbrev.sh: Test find_unique_abbrev() perf

2017-09-26 Thread Junio C Hamano
Derrick Stolee writes: > diff --git a/t/helper/test-abbrev.c b/t/helper/test-abbrev.c > new file mode 100644 > index 0..6866896eb > --- /dev/null > +++ b/t/helper/test-abbrev.c > @@ -0,0 +1,19 @@ > +#include "cache.h" > +#include Same comment on as [1/5] applies. > + > +int cmd_main(i

Re: [PATCH v2 1/5] test-list-objects: List a subset of object ids

2017-09-26 Thread Junio C Hamano
Derrick Stolee writes: > diff --git a/t/helper/test-list-objects.c b/t/helper/test-list-objects.c > new file mode 100644 > index 0..83b1250fe > --- /dev/null > +++ b/t/helper/test-list-objects.c > @@ -0,0 +1,85 @@ > +#include "cache.h" > +#include "packfile.h" > +#include If you include