Re: Git documentation on branching.

2017-04-10 Thread Konstantin Khomoutov
On Mon, 10 Apr 2017 12:24:47 +0200 Samuel Åslund wrote: [...] > >> One feature with "git branch xyz" and "git checkout xyz" that is > >> rather obvious if you know them but bit me a little since I did > >> not, is that uncommitted work in progress is not affected or saved >

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Jeff King
On Tue, Apr 11, 2017 at 01:23:32AM +0200, Ævar Arnfjörð Bjarmason wrote: > * Most of the tests fail because git clone can't deal with cloning a > repo with a \r in the path. The error we produce when we try is quite > bad and doesn't indicate what went wrong: > > $ rm -rf /tmp/git.*; mkdir

Re: [PATCH 4/5] run-command: prepare child environment before forking

2017-04-10 Thread Jonathan Nieder
Brandon Williams wrote: > In order to avoid allocation between 'fork()' and 'exec()' prepare the > environment to be used in the child process prior to forking. If using something like posix_spawn(), this would be needed anyway, so I'll review it. [...] > +++ b/run-command.c [...] > +static

Re: [PATCH 5/5] run-command: add note about forking and threading

2017-04-10 Thread Eric Wong
Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > --- a/run-command.c > > +++ b/run-command.c > > @@ -458,6 +458,14 @@ int start_command(struct child_process *cmd) > > argv_array_pushv(, cmd->argv); > > } > > > > + /* > > +* NOTE: In

Re: [PATCH] connect.c: handle errors from split_cmdline

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 08:30:23PM -0400, Jeff King wrote: > On Tue, Apr 11, 2017 at 01:23:32AM +0200, Ævar Arnfjörð Bjarmason wrote: > > > There's one segfault in there: > > > > $ ./t5601-clone.sh --root="xtmp.$(perl -e 'print chr 39')" -v -i -d > > [...] > > Cloning into

[PATCH] connect.c: handle errors from split_cmdline

2017-04-10 Thread Jeff King
On Tue, Apr 11, 2017 at 01:23:32AM +0200, Ævar Arnfjörð Bjarmason wrote: > There's one segfault in there: > > $ ./t5601-clone.sh --root="xtmp.$(perl -e 'print chr 39')" -v -i -d > [...] > Cloning into 'ssh-bracket-clone-plink-4'... > Segmentation fault > not ok 45 - single quoted plink.exe in

Re: [PATCH 5/5] run-command: add note about forking and threading

2017-04-10 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > --- a/run-command.c > +++ b/run-command.c > @@ -458,6 +458,14 @@ int start_command(struct child_process *cmd) > argv_array_pushv(, cmd->argv); > } > > + /* > + * NOTE: In order to prevent deadlocking when using threads special > +

[PATCH 3/5] run-command: allocate child_err before forking

2017-04-10 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' open the stream used for the child's error handeling prior to forking. Signed-off-by: Brandon Williams --- run-command.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH 4/5] run-command: prepare child environment before forking

2017-04-10 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' prepare the environment to be used in the child process prior to forking. Signed-off-by: Brandon Williams --- run-command.c | 84 --- 1 file changed, 75

[PATCH 1/5] run-command: convert sane_execvp to sane_execvpe

2017-04-10 Thread Brandon Williams
Convert 'sane_execvp()' to 'sane_execvpe()' which optionally takes a pointer to an array of 'char *' which should be used as the environment for the process being exec'd. If no environment is provided (by passing NULL instead) then the already existing environment, as stored in 'environ', will be

[PATCH 5/5] run-command: add note about forking and threading

2017-04-10 Thread Brandon Williams
Allocation was pushed before forking in order to avoid potential deadlocking when forking while multiple threads are running. This deadlocking is possible when a thread (other than the one forking) has acquired a lock and didn't get around to releasing it before the fork. This leaves the lock in

[PATCH 0/5] forking and threading

2017-04-10 Thread Brandon Williams
Forking and threading is a difficult thing to get right due to potential deadlocks which can occur if one thread holds a lock while another forks. The resulting process will still have the lock in a locked state with no hope of it ever being released (since forking doesn't replicate the threads

[PATCH 2/5] run-command: prepare argv before forking

2017-04-10 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' the argv array used in the exec call is prepared prior to forking the process. Signed-off-by: Brandon Williams --- run-command.c | 34 -- 1 file changed, 16 insertions(+), 18

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-10 Thread Jacob Keller
On Mon, Apr 10, 2017 at 2:58 AM, Ævar Arnfjörð Bjarmason wrote: > On Mon, Apr 10, 2017 at 10:08 AM, Jacob Keller wrote: >> On Sun, Apr 9, 2017 at 4:00 AM, Stefan Haller wrote: >>> Jacob Keller wrote: >>>

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 9, 2017 at 9:11 PM, Ævar Arnfjörð Bjarmason wrote: > Change the test library to insert non-alphanumeric ASCII characters > into the TRASH_DIRECTORY name, that's the directory the test library > creates, chdirs to and runs each individual test from. I did a bit more

Re: [PATCH v2] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-10 Thread René Scharfe
Am 10.04.2017 um 23:26 schrieb Jeff Hostetler: > On 4/8/2017 10:06 AM, René Scharfe wrote: >> Am 07.04.2017 um 17:53 schrieb g...@jeffhostetler.com: >>> +/* implicitly borrow buf[i-1] inside tree_desc[i] */ >>> +memcpy([i], [i-1], sizeof(struct tree_desc)); >> >> An

Re: [PATCH 0/3] quarantine-push loose ends

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 11, 2017 at 12:10 AM, Jeff King wrote: > On Mon, Apr 10, 2017 at 05:14:24PM -0400, Jeff King wrote: > >> > Also, I think this whole thing could really do with some documentation >> > in githooks(5). E.g. what hooks does it apply for? The test is just >> > for

[PATCH 3/3] refs: reject ref updates while GIT_QUARANTINE_PATH is set

2017-04-10 Thread Jeff King
As documented in git-receive-pack(1), updating a ref from within the pre-receive hook is dangerous and can corrupt your repo. This patch forbids ref updates entirely during the hook to make it harder for adventurous hook writers to shoot themselves in the foot. Signed-off-by: Jeff King

[PATCH 2/3] receive-pack: document user-visible quarantine effects

2017-04-10 Thread Jeff King
Commit 722ff7f87 (receive-pack: quarantine objects until pre-receive accepts, 2016-10-03) changed the underlying details of how we take in objects. This is mostly transparent to the user, but there are a few things they might notice. Let's document them. Signed-off-by: Jeff King

[PATCH 1/3] receive-pack: drop tmp_objdir_env from run_update_hook

2017-04-10 Thread Jeff King
Since 722ff7f87 (receive-pack: quarantine objects until pre-receive accepts, 2016-10-03), we have to feed the pre-receive hook the tmp_objdir environment, so that git programs run from the hook know where to find the objects. That commit modified run_update_hook() to do the same, but there it is

[PATCH 0/3] quarantine-push loose ends

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 05:14:24PM -0400, Jeff King wrote: > > Also, I think this whole thing could really do with some documentation > > in githooks(5). E.g. what hooks does it apply for? The test is just > > for pre-receive but the patch changes run_update_hook(), does it also > > take effect

Re: [PATCH v2] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-10 Thread Jeff Hostetler
On 4/10/2017 4:55 PM, Jeff King wrote: On Sat, Apr 08, 2017 at 04:06:41PM +0200, René Scharfe wrote: + } else if (i > 1 && are_same_oid([i], [i-2])) { + /* implicitly borrow buf[i-2] inside tree_desc[i] */ + memcpy([i], [i-2],

Re: [PATCH v2] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-10 Thread Jeff Hostetler
On 4/8/2017 10:06 AM, René Scharfe wrote: Am 07.04.2017 um 17:53 schrieb g...@jeffhostetler.com: From: Jeff Hostetler Teach traverse_trees_recursive() to not do redundant ODB lookups when both directories refer to the same OID. In operations such as read-tree,

Re: [PATCH v8 2/3] p0006-read-tree-checkout: perf test to time read-tree

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 09:14:02PM +, g...@jeffhostetler.com wrote: > From: Jeff Hostetler > > Created t/perf/repos/many-files.sh to generate large, but > artificial repositories. I think this is a good direction. In the long run we might want some kind of magic to

Re: [PATCH 4/6] receive-pack: quarantine objects until pre-receive accepts

2017-04-10 Thread Jeff King
On Sat, Apr 08, 2017 at 04:53:38PM +0200, Ævar Arnfjörð Bjarmason wrote: > Very late reply, but I have a question about this. Is there anything > you can do on the plumbing level to figure out which area an object is > in (of course that's not mutually exclusive). > > The use-case for that is

[PATCH v8 2/3] p0006-read-tree-checkout: perf test to time read-tree

2017-04-10 Thread git
From: Jeff Hostetler Created t/perf/repos/many-files.sh to generate large, but artificial repositories. Created t/perf/p0006-read-tree-checkout.sh to measure performance on various read-tree, checkout, and update-index operations. Signed-off-by: Jeff Hostetler

[PATCH v8 0/3] read-cache: speed up add_index_entry

2017-04-10 Thread git
From: Jeff Hostetler Version 8 addresses the following: () Refactors strcmp_offset() test helper to just compare the values and return results to stdout. () Updates t0065 to have the actual test logic. () Splits the synthetic test repo generation out of the

[PATCH v8 3/3] read-cache: speed up add_index_entry during checkout

2017-04-10 Thread git
From: Jeff Hostetler Teach add_index_entry_with_check() and has_dir_name() to see if the path of the new item is greater than the last path in the index array before attempting to search for it. During checkout, merge_working_tree() populates the new index in sorted

[PATCH v8 1/3] read-cache: add strcmp_offset function

2017-04-10 Thread git
From: Jeff Hostetler Add strcmp_offset() function to also return the offset of the first change. Add unit test and helper to verify. Signed-off-by: Jeff Hostetler --- Makefile | 1 + cache.h | 1 +

[PATCH] fetch-pack: show clearer error message upon ERR

2017-04-10 Thread Jonathan Tan
Currently, fetch-pack prints a confusing error message ("expected ACK/NAK") when the server it's communicating with sends a pkt-line starting with "ERR". Replace it with a less confusing error message. (Git will send "ERR" lines when a "want" line references an object that it does not have. This

Re: [PATCH v2] unpack-trees: avoid duplicate ODB lookups during checkout

2017-04-10 Thread Jeff King
On Sat, Apr 08, 2017 at 04:06:41PM +0200, René Scharfe wrote: > > + } else if (i > 1 && are_same_oid([i], [i-2])) { > > + /* implicitly borrow buf[i-2] inside tree_desc[i] */ > > + memcpy([i], [i-2], sizeof(struct tree_desc)); > > Similar case. > >

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-10 Thread Torsten Bögershausen
On 2017-04-09 21:11, Lars Schneider wrote: [] > + > +packet: git> command=smudge > +packet: git> pathname=path/testfile.dat > +packet: git> delay-able=1 > +packet: git> > +packet: git> CONTENT > +packet: git> >

[RFC 4/4] server-endpoint: serve blobs by hash

2017-04-10 Thread Jonathan Tan
Upgrade server-endpoint to also serve blobs in a packfile given their hashes. Reachability checks are performed before the packfile is sent - both an absent blob and an unreachable blob are reported to the user in the same way ("not our blob"). Due to a bug in "rev-list" in the absence of

[RFC 0/4] Implementation of fetch-blobs and fetch-refs

2017-04-10 Thread Jonathan Tan
My previous proposal about a possible new server endpoint that serves blobs and refs [1] didn't seem to garner much interest, so I thought I'd provide a possible implementation of that proposal as a work in progress. In particular, patch 1 demonstrates that a new server endpoint that serves refs

[RFC 2/4] fetch-pack: refactor "want" pkt-line generation

2017-04-10 Thread Jonathan Tan
In fetch-pack, refactor the generation of the initial request (containing the "want" lines) into its own function. This cleans up the code slightly in that the scopes of certain variables are reduced, but this commit mainly is in preparation for a subsequent one. Signed-off-by: Jonathan Tan

[RFC 1/4] server-endpoint: serve refs without advertisement

2017-04-10 Thread Jonathan Tan
Introduce a new binary that can act as an endpoint to serve refs without first sending the ref advertisement (a list of all ref names and associated hashes that the server contains). For very large repositories, including an internal Android repository with more than 70 refs, this would save

[RFC 3/4] fetch-pack: support new server endpoint

2017-04-10 Thread Jonathan Tan
This is a patch to demonstrate that fetch-pack only requires a small amount of changes to support the new server endpoint, and that things generally work in various situations, including both stateless RPC and non-stateless RPC (as can be seen from the tests). Some minor issues remain: - Names

[PATCH v1] convert: fix return value for apply_multi_file_filter() on SIGPIPE

2017-04-10 Thread Lars Schneider
If a pipe write fails and errno is set to EPIPE then we execute the "error" path. However, as "err" can still be 0 the return value of apply_multi_file_filter() would indicate success. Fix this by setting "err" to the value of "errno" in case of a pipe write failure. Noticed-by: Ben Peart

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 08:19:40PM +0200, Joachim Durchholz wrote: > > I very much disagree with that. Git's test operate under a set of > > assumptions, and if you violate those assumptions, then the failures are > > not meaningful. > > In that case the tests do not validate that git can

Re: broken text encoding in commit author name

2017-04-10 Thread Michał Walenciak
Dnia niedziela, 9 kwietnia 2017 00:07:52 CEST Igor Djordjevic pisze: > Hi Michał, > > For what it`s worth, looking at the timestamp of the broken commit > example you`ve shown, could the problem be related to amending commits? > > If so, are you amending through the command line, or maybe using

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-10 Thread Jeff King
On Sun, Apr 09, 2017 at 10:38:42AM +0200, Stefan Haller wrote: > Jeff King wrote: > > > > It might be possible to generate these lease tags prior to operations > > > which modify history and then maybe having a way to list them so you > > > can select which one you meant when you

Re: [RFC] dropping support for ancient versions of curl

2017-04-10 Thread Jeff King
On Fri, Apr 07, 2017 at 01:18:30PM +0200, Johannes Schindelin wrote: > On Thu, 6 Apr 2017, Jeff King wrote: > > > And it's not like people on ancient mission-critical systems get cut > > off. They can still run the version of Git they were running when their > > OS went out of support. > > You

Re: Modifying a bare repo directly

2017-04-10 Thread Eric Wong
Julian Goacher wrote: > Is it possible to modify a bare repo directly? e.g. is it possible to > insert a file into a bare repo without first cloning a non-bare copy? > I'm thinking along the lines of a command or sequence of commands that > modifies the file index and

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Joachim Durchholz
Am 10.04.2017 um 18:57 schrieb Jeff King: If there are security bugs where a malicious input can cause us to do something bad, that's something to care about. But that's very different than asking "do these tests run to completion with a funny input". If the tests do not complete, git is doing

Re: [PATCH] grep: plug a trivial memory leak

2017-04-10 Thread Brandon Williams
On 04/09, Ævar Arnfjörð Bjarmason wrote: > Change the cleanup phase for the grep command to free the pathspec > struct that's allocated earlier in the same block, and used just a few > lines earlier. > > With "grep hi README.md" valgrind reports a loss of 239 bytes now, > down from 351. > > The

Re: [PATCH] Make git log work for git CWD outside of work tree

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 07:01:00PM +0700, Duy Nguyen wrote: > > Similarly, if you replace "git add foo" with "git log", it still > > should work in the above, i.e. > > > > $ export GIT_DIR=~/myproject/.git GIT_WORK_TREE=~/myproject > > $ cd ~/myproject/../somewhere/else > > $ git log

Re: [PATCH] t6500: don't run detached auto gc at the end of the test script

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 06:56:30PM +0200, SZEDER Gábor wrote: > On Mon, Apr 10, 2017 at 6:35 PM, Jeff King wrote: > > On Mon, Apr 10, 2017 at 06:31:54PM +0200, SZEDER Gábor wrote: > > >> This means we can write this simply as: > >> > >> doesnt_matter=$(git gc --auto 9>&1) > >>

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 04:59:57PM +0200, Joachim Durchholz wrote: > Am 10.04.2017 um 15:38 schrieb Jeff King: > > Are those bugs? Maybe. Certainly they are limitations. But are they ones > > anybody _cares_ about? I think this may fall under "if it hurts, don't > > do it". > > It's not always

Re: [PATCH] t6500: don't run detached auto gc at the end of the test script

2017-04-10 Thread SZEDER Gábor
On Mon, Apr 10, 2017 at 6:35 PM, Jeff King wrote: > On Mon, Apr 10, 2017 at 06:31:54PM +0200, SZEDER Gábor wrote: >> This means we can write this simply as: >> >> doesnt_matter=$(git gc --auto 9>&1) >> >> It's still hackery :) > > Heh. Yeah, I would call that _more_ hackery in

Re: [PATCH] t6500: don't run detached auto gc at the end of the test script

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 06:31:54PM +0200, SZEDER Gábor wrote: > Indeed this seems to work, and luckily we don't need that much > hackery. When there is a single variable assignment and the expansion > of a command substitution is assigned to the variable, then the exit > status is that of the

Re: [PATCH] http: honnor empty http.proxy option to bypass proxy

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 06:15:56PM +0300, Sergey Ryazanov wrote: > Curl distinguish between empty proxy address and NULL proxy address. In > the first case it completly disable proxy usage, but if proxy address > option is NULL then curl attempt to determine proxy address from > http_proxy

Re: [PATCH] t6500: don't run detached auto gc at the end of the test script

2017-04-10 Thread SZEDER Gábor
On Mon, Apr 10, 2017 at 3:58 PM, Jeff King wrote: > On Mon, Apr 10, 2017 at 02:59:11PM +0200, SZEDER Gábor wrote: > >> While this change doesn't completely eliminate the possibility of >> this race, it significantly and seemingly sufficiently reduces its >> probability. Running

[PATCH] http: honnor empty http.proxy option to bypass proxy

2017-04-10 Thread Sergey Ryazanov
Curl distinguish between empty proxy address and NULL proxy address. In the first case it completly disable proxy usage, but if proxy address option is NULL then curl attempt to determine proxy address from http_proxy environment variable. According to documentation, if http.proxy configured to

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Joachim Durchholz
Am 10.04.2017 um 15:38 schrieb Jeff King: Are those bugs? Maybe. Certainly they are limitations. But are they ones anybody _cares_ about? I think this may fall under "if it hurts, don't do it". It's not always possible to avoid that. URLs, for example, may contain "funny characters",

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-10 Thread Lars Schneider
> On 10 Apr 2017, at 16:28, Eric Wong wrote: > > Lars Schneider wrote: >>> diff --git a/convert.h b/convert.h >>> index 82871a11d5..da6c702090 100644 >>> --- a/convert.h >>> +++ b/convert.h >>> @@ -42,6 +42,11 @@ extern int convert_to_git(const char

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-10 Thread Eric Wong
Lars Schneider wrote: > > diff --git a/convert.h b/convert.h > > index 82871a11d5..da6c702090 100644 > > --- a/convert.h > > +++ b/convert.h > > @@ -42,6 +42,11 @@ extern int convert_to_git(const char *path, const char > > *src, size_t len, > >

Re: Modifying a bare repo directly

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 12:33:18PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Mon, Apr 10, 2017 at 12:09 PM, Julian Goacher > wrote: > > Hi - > > > > Is it possible to modify a bare repo directly? e.g. is it possible to > > insert a file into a bare repo without first

Re: [PATCH] t6500: don't run detached auto gc at the end of the test script

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 02:59:11PM +0200, SZEDER Gábor wrote: > While this change doesn't completely eliminate the possibility of > this race, it significantly and seemingly sufficiently reduces its > probability. Running t6500 in a loop while my box was under heavy CPU > and I/O load usually

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread SZEDER Gábor
On Mon, Apr 10, 2017 at 1:40 PM, Ævar Arnfjörð Bjarmason wrote: > On Mon, Apr 10, 2017 at 1:19 PM, SZEDER Gábor wrote: >> A few other failures are triggered by the ':' in the trash directory's >> name, breaking the following commonly used pattern: >> >>

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Jeff King
On Mon, Apr 10, 2017 at 01:40:13PM +0200, Ævar Arnfjörð Bjarmason wrote: > > A few other failures are triggered by the ':' in the trash directory's > > name, breaking the following commonly used pattern: > > > > export GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY" && > > cd subdir && > >

Re: [PATCH v7 2/3] p0004-read-tree: perf test to time read-tree

2017-04-10 Thread Jeff Hostetler
On 4/8/2017 6:36 AM, Jeff King wrote: On Fri, Apr 07, 2017 at 09:20:46PM +, g...@jeffhostetler.com wrote: diff --git a/t/perf/p0004-read-tree.sh b/t/perf/p0004-read-tree.sh new file mode 100755 index 000..a70e969 I think p0004 is taken by your lazy-init-name-hash script already

[PATCH] t6500: don't run detached auto gc at the end of the test script

2017-04-10 Thread SZEDER Gábor
The last test in 't6500-gc', 'background auto gc does not run if gc.log is present and recent but does if it is old', added in a831c06a2 (gc: ignore old gc.log files, 2017-02-10), may sporadically trigger an error message from the test harness: rm: cannot remove 'trash

Re: [PATCH v5 8/8] convert: Update subprocess_read_status to not die on EOF

2017-04-10 Thread Lars Schneider
> On 07 Apr 2017, at 14:03, Ben Peart wrote: > > Enable sub-processes to gracefully handle when the process dies by > updating subprocess_read_status to return an error on EOF instead of > dying. > > Update apply_multi_file_filter to take advantage of the revised >

Re: [PATCH v5 7/8] sub-process: move sub-process functions into separate files

2017-04-10 Thread Lars Schneider
> On 07 Apr 2017, at 14:03, Ben Peart wrote: > > Move the sub-proces functions into sub-process.h/c. Add documentation > for the new module in Documentation/technical/api-sub-process.txt > > Signed-off-by: Ben Peart > --- >

Re: [PATCH v5 6/8] convert: rename reusable sub-process functions

2017-04-10 Thread Lars Schneider
> On 07 Apr 2017, at 14:03, Ben Peart wrote: > > Do a mechanical rename of the functions that will become the reusable > sub-process module. > > Signed-off-by: Ben Peart > --- > convert.c | 53 +++-- >

Re: [PATCH v5 5/8] convert: Update generic functions to only use generic data structures

2017-04-10 Thread Lars Schneider
> On 07 Apr 2017, at 14:03, Ben Peart wrote: > > Update all functions that are going to be moved into a reusable module > so that they only work with the reusable data structures. Move code > that is specific to the filter out into the filter specific functions. > >

Re: [PATCH] pathspec: fix segfault in clear_pathspec

2017-04-10 Thread Duy Nguyen
On Sat, Apr 8, 2017 at 2:29 AM, Brandon Williams wrote: > In 'clear_pathspec()' the incorrect index parameter is used to bound an > inner-loop which is used to free a 'struct attr_match' value field. > Using the incorrect index parameter (in addition to being incorrect) >

Re: [PATCH] Make git log work for git CWD outside of work tree

2017-04-10 Thread Duy Nguyen
On Mon, Apr 10, 2017 at 7:21 AM, Junio C Hamano wrote: > If your arrangement is even more exotic, e.g. you have these two > variables set, and then are running from OUTSIDE the working tree, > my knee-jerk reaction is that you should get your head examined, as > it is totally

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 10, 2017 at 1:19 PM, SZEDER Gábor wrote: > On Mon, Apr 10, 2017 at 10:02 AM, Ævar Arnfjörð Bjarmason > wrote: >> On Mon, Apr 10, 2017 at 3:47 AM, SZEDER Gábor wrote: Change the test library to insert non-alphanumeric

Re: [PATCH 3/3] WIP - Allow custom printf function for column printing

2017-04-10 Thread Duy Nguyen
On Wed, Mar 29, 2017 at 06:42:38PM -0700, Stefan Beller wrote: > Ever wondered why column.ui applies the untracked files in git-status, > but not for the help text comment in git-commit? Nobody wrote the code! How do you decide text width for this help text? If the output is terminal, we know how

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread SZEDER Gábor
On Mon, Apr 10, 2017 at 10:02 AM, Ævar Arnfjörð Bjarmason wrote: > On Mon, Apr 10, 2017 at 3:47 AM, SZEDER Gábor wrote: >>> Change the test library to insert non-alphanumeric ASCII characters >>> into the TRASH_DIRECTORY name, that's the directory the test

Re: Unexpected working directory in post-receive hook in non-bare repository

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Sun, Apr 9, 2017 at 3:01 PM, Simon Ruderich wrote: > The following snippet reproduces the issue for me (note the > remote: line in its output): > > git --version > > rm -rf a b > > git init a > cd a > echo first >data > git add data > git commit

Re: [PATCH 2/3] column: allow for custom printf

2017-04-10 Thread Duy Nguyen
On Wed, Mar 29, 2017 at 06:42:37PM -0700, Stefan Beller wrote: > diff --git a/column.h b/column.h > index 0a61917fa7..c44a1525a9 100644 > --- a/column.h > +++ b/column.h > @@ -24,6 +24,9 @@ struct column_options { > int padding; > const char *indent; > const char *nl; > + > +

Re: Git documentation on branching.

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 10, 2017 at 12:45 PM, Samuel Åslund wrote: > On 17/4/10 12:21, Ævar Arnfjörð Bjarmason wrote: >> >> On Mon, Apr 10, 2017 at 8:56 AM, Samuel Åslund >> wrote: >>> >>> Hi all. >>> >>> I just started playing around with branching in git. >>> I

[PATCH v1] Docs: Add some missing options to git-diff.txt

2017-04-10 Thread Andreas Heiduk
Well, this wording picks up your points but I won't call it "stress it" :-) However this should do the job. --8<-->8-- git-diff understands "--ours", "--theirs" and "--base" for files with conflicts. But so far they were not documented for the central diff command but only for diff-files.

Re: Git documentation on branching.

2017-04-10 Thread Samuel Åslund
On 17/4/10 12:21, Ævar Arnfjörð Bjarmason wrote: On Mon, Apr 10, 2017 at 8:56 AM, Samuel Åslund wrote: Hi all. I just started playing around with branching in git. I have been using it more or less as Subversion until now. One feature with "git branch xyz" and "git

Re: [PATCH 1/3] merge-recursive.c: conflict using sparse should update file

2017-04-10 Thread Duy Nguyen
On Fri, Apr 07, 2017 at 12:23:55PM -0700, Kevin Willford wrote: > Update the file when there is a conflict with a modify/delete scenario > when using the sparse-checkout feature since the file might not be on disk > because the skip-worktree bit is on and the user will need the file and > content

Re: Modifying a bare repo directly

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 10, 2017 at 12:09 PM, Julian Goacher wrote: > Hi - > > Is it possible to modify a bare repo directly? e.g. is it possible to > insert a file into a bare repo without first cloning a non-bare copy? > I'm thinking along the lines of a command or sequence of

Re: [PATCH 3/3] reset.c: update files when using sparse to avoid data loss.

2017-04-10 Thread Duy Nguyen
On Fri, Apr 07, 2017 at 12:23:57PM -0700, Kevin Willford wrote: > When using the sparse checkout feature the git reset command will add "git reset" has three different modes. It would be good if you mention what mode is affected here. The tests are for --mixed only. I wonder if we need to do

Re: Git documentation on branching.

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 10, 2017 at 8:56 AM, Samuel Åslund wrote: > Hi all. > > I just started playing around with branching in git. > I have been using it more or less as Subversion until now. > > One feature with "git branch xyz" and "git checkout xyz" that is rather > obvious if you

Re: [PATCH v5 4/8] convert: Separate generic structures and variables from the filter specific ones

2017-04-10 Thread Lars Schneider
> On 07 Apr 2017, at 14:03, Ben Peart wrote: > > To enable future reuse of the filter..process infrastructure, > split the cmd2process structure into two separate parts. > > subprocess_entry will now contain the generic data required to manage > the creation and tracking of

Re: [PATCH 2/3] apply.c: do not checkout file when skip-worktree bit set

2017-04-10 Thread Duy Nguyen
On Fri, Apr 07, 2017 at 12:23:56PM -0700, Kevin Willford wrote: > When using the sparse-checkout feature git should not write to > the working directory for files with the skip-worktree bit on. > With the skip-worktree bit on the file may or may not be in > the working directory and if it is not

Modifying a bare repo directly

2017-04-10 Thread Julian Goacher
Hi - Is it possible to modify a bare repo directly? e.g. is it possible to insert a file into a bare repo without first cloning a non-bare copy? I'm thinking along the lines of a command or sequence of commands that modifies the file index and then copies the file blob into /objects, but in a

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-10 Thread Lars Schneider
> On 09 Apr 2017, at 21:11, Lars Schneider wrote: > > Some `clean` / `smudge` filters might require a significant amount of > time to process a single blob. During this process the Git checkout > operation is blocked and Git needs to wait until the filter is done to >

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 10, 2017 at 10:08 AM, Jacob Keller wrote: > On Sun, Apr 9, 2017 at 4:00 AM, Stefan Haller wrote: >> Jacob Keller wrote: >> >>> Agreed. You "take" a lease whenever you push to the remote or when you >>> pull from the

[no subject]

2017-04-10 Thread Basle ali
Xin chào, Tên tôi là húng quế, tôi đã gửi cho bạn một bức thư một tháng trước, nhưng tôi không biết bạn nhận được nó, bởi vì tôi không nhận được bất kỳ câu trả lời từ bạn, xin vui lòng cho tôi biết nếu bạn làm, Trân trọng. Basil ali

Re: Tools that do an automatic fetch defeat "git push --force-with-lease"

2017-04-10 Thread Jacob Keller
On Sun, Apr 9, 2017 at 4:00 AM, Stefan Haller wrote: > Jacob Keller wrote: > >> Agreed. You "take" a lease whenever you push to the remote or when you >> pull from the remote and when you pull into the branch. It should >> store something that tracks

Re: [PATCH 2/2] test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY name

2017-04-10 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 10, 2017 at 3:47 AM, SZEDER Gábor wrote: >> Change the test library to insert non-alphanumeric ASCII characters >> into the TRASH_DIRECTORY name, that's the directory the test library >> creates, chdirs to and runs each individual test from. >> >> Unless

Re: Git documentation on branching.

2017-04-10 Thread Konstantin Khomoutov
On Mon, 10 Apr 2017 08:56:30 +0200 Samuel Åslund wrote: > I just started playing around with branching in git. > I have been using it more or less as Subversion until now. > > One feature with "git branch xyz" and "git checkout xyz" that is > rather obvious if you know them

Git documentation on branching.

2017-04-10 Thread Samuel Åslund
Hi all. I just started playing around with branching in git. I have been using it more or less as Subversion until now. One feature with "git branch xyz" and "git checkout xyz" that is rather obvious if you know them but bit me a little since I did not, is that uncommitted work in progress is