Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Martin Ågren
On Tue, 26 Feb 2019 at 21:02, Rohit Ashiwal wrote: > > Hey! > > On Wed, Feb 27, 2019 at 1:22 AM Johannes Schindelin > wrote: > > > > We already have `test_path_is_missing`. Why not use that instead of `! > > test -d` or `! test -f`? > > > > Yes, I think this is better. It will satisfy all the req

Re: git rebase: retain original head?

2019-02-26 Thread Nazri Ramliy
On Wed, Jan 9, 2019 at 10:08 PM Johannes Schindelin wrote: > Having said that, it is an unintended regression in the built-in rebase. > Markus, could you come up with a minimal test case, preferably in the form > of a patch to t/t3415-rebase-autosquash.sh? Something like this, perhaps? ("gmail co

Re: [PATCH v2] l10n: fr.po remove obsolete entries

2019-02-26 Thread Jiang Xin
Jean-Noël Avila 于2019年2月27日周三 上午4:56写道: > > On NetBSD, the version of msgfmt is still 0.14.4. There's no hope for > an upgrade due to some GPLv3 allergy of NetBSD's. This version chokes > on heavily decorated commented entries in po files. It's safer to get > rid of all these obsolete entries. > >

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-26 Thread Brandon Richardson
Hi Andrei, > > would attempt to translate the option as a tree oid.It was also > > Missing space after period. Oops, thanks for pointing that out. > > > + { OPTION_CALLBACK, 'p', NULL, &parents, "parent", > > + N_("id of a parent commit object"), PARSE_OPT_NONEG, > > Co

Re: [PATCH] describe: bail of --contains --all is used with --exclude or --match

2019-02-26 Thread Eric Sunshine
On Tue, Feb 26, 2019 at 4:54 PM Jacob Keller wrote: > describe: bail of --contains --all is used with --exclude or --match s/of/if/ > Signed-off-by: Jacob Keller > --- > diff --git a/builtin/describe.c b/builtin/describe.c > @@ -589,6 +589,9 @@ int cmd_describe(int argc, const char **argv, cons

[PATCH v3 0/1] [GSoC][PATCH] t3600: use test_path_is_* helper functions

2019-02-26 Thread Rohit Ashiwal via GitGitGadget
Replace test -(d|f|e) calls in t3600-rm.sh. Previously we were using test -(d|f|e) to verify the presence of a directory/file, but we already have helper functions, viz, test_path_is_dir, test_path_is_file and test_path_is_missing with better functionality. Rohit Ashiwal (1): t3600: use test_pat

[PATCH v3 1/1] t3600: use test_path_is_* functions

2019-02-26 Thread Rohit Ashiwal via GitGitGadget
From: Rohit Ashiwal Replace `test -(d|f|e)` calls in t3600-rm.sh Previously we were using `test -(d|f|e)` to verify the presence of a directory/file, but we already have helper functions, viz, `test_path_is_dir`, `test_path_is_file` and `test_path_is_missing` with better functionality. These he

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-26 Thread Andrei Rybak
A couple of code style issues: On 2/26/19 9:09 PM, Brandon wrote: > From: Brandon Richardson > > Rather than parse options manually, which is both difficult to > read and error prone, parse options supplied to commit-tree > using the parse-options api. > > It was discovered that the --no-gpg-si

Re: [PATCH v13 00/27] Convert "git stash" to C builtin

2019-02-26 Thread Johannes Schindelin
Hi Ævar, On Tue, 26 Feb 2019, Ævar Arnfjörð Bjarmason wrote: > > On Tue, Feb 26 2019, Thomas Gummerer wrote: > > > As I was advocating for this series to go into 'next' without a large > > refactor of this series, I'll put my money were my mouth is and try to > > make the cleanups and fixes req

[PATCH] describe: bail of --contains --all is used with --exclude or --match

2019-02-26 Thread Jacob Keller
From: Jacob Keller If you try to use git describe --contains with --all, the exclude and match patterns are silently ignored. This results in unexpected behavior, as you may try to provide patterns and expect it to change the result. Check for this, and have describe die when it encounters this

Re: [PATCH v13 00/27] Convert "git stash" to C builtin

2019-02-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 26 2019, Thomas Gummerer wrote: > As I was advocating for this series to go into 'next' without a large > refactor of this series, I'll put my money were my mouth is and try to > make the cleanups and fixes required, though without trying to avoid > further external process calls, or

Re: Bug: "orphaned" trees indistinguishable in git log --graph output

2019-02-26 Thread Rafael Ascensão
This issue was mentioned previously here in the mailing list. Here it is for reference: https://public-inbox.org/git/3305f7dc-0044-41fe-8aab-ee800535d...@kde.org/ Cheers, Rafael Ascensão

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Jeff King
On Tue, Feb 26, 2019 at 08:58:43PM +0100, Johannes Schindelin wrote: > On Tue, 26 Feb 2019, Jeff King wrote: > > > I had a vague notion that there was some reason (portability?) that we > > preferred to have the wrappers. But as your patch shows, they really are > > just calling "test" and nothin

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Jeff King
On Tue, Feb 26, 2019 at 08:39:12PM +0100, SZEDER Gábor wrote: > > > I didn't find this to be an issue, but because of functions like > > > 'test_seq' and 'test_must_fail' I've thought about suppressing '-x' > > > output for test helpers (haven't actually done anything about it, > > > though). > >

Re: [RFC PATCH v3 0/5] clone: dir iterator refactoring with tests

2019-02-26 Thread Matheus Tavares Bernardino
Hi, Ævar Thank you for helping me out on this series and, especially, for the tests part. Now that we've come to a consensus on what the overall series' "shape" should be, can I refine what's still needed and resubmit it, in the upcoming days, as a patch set with the test included? Best, Matheus

[PATCH v2] l10n: fr.po remove obsolete entries

2019-02-26 Thread Jean-Noël Avila
On NetBSD, the version of msgfmt is still 0.14.4. There's no hope for an upgrade due to some GPLv3 allergy of NetBSD's. This version chokes on heavily decorated commented entries in po files. It's safer to get rid of all these obsolete entries. Signed-off-by: Jean-Noël Avila --- po/fr.po | 1500

Re: [PATCH v13 00/27] Convert "git stash" to C builtin

2019-02-26 Thread Thomas Gummerer
On 02/26, Johannes Schindelin wrote: > Hi Thomas, > > On Mon, 25 Feb 2019, Thomas Gummerer wrote: > > 22: 51809c70ca ! 23: 56a5ce2aeb stash: convert `stash--helper.c` into > > `stash.c` > > @@ -13,7 +13,7 @@ > > called directly and not by a shell script. > > > > Sign

Re: [PATCH] l10n: fr.po unfuzzy commented entries

2019-02-26 Thread Jean-Noël AVILA
On Monday, 25 February 2019 23:42:11 CET Ævar Arnfjörð Bjarmason wrote: > > On Mon, Feb 25 2019, Jean-Noël Avila wrote: > > > The 0.14.4 gettext release was back in 2005, so presumably this is due > > to some GPLv3 allergy of NetBSD's. The OS version itself is 7.1, > > released a couple of years

Re: Students projects: looking for small and medium project ideas

2019-02-26 Thread Johannes Schindelin
Hi, On Tue, 26 Feb 2019, Matthieu Moy wrote: > Fabio Aiuto writes: > > > Hi Matthieu and to all developers, > > I'm Fabio, no more a student and I'm brand new in community > > development. I joined the git mailing-list about two weeks ago and I'm > > looking for some first fix or tasks. I apolo

[PATCH] commit-tree: utilize parse-options api

2019-02-26 Thread Brandon
From: Brandon Richardson Rather than parse options manually, which is both difficult to read and error prone, parse options supplied to commit-tree using the parse-options api. It was discovered that the --no-gpg-sign option was documented but not implemented in 55ca3f99, and the existing implem

Re: [PATCH v2 1/1] t3600: use test_path_is_dir and test_path_is_file

2019-02-26 Thread Rohit Ashiwal
Hi Johannes On Wed, Feb 27, 2019 at 1:33 AM Johannes Schindelin wrote: > > I think what Gábor meant was that both `test ! -f file` and `! test -f > file` should be converted to `test_path_is_missing file`. > I'll work over this and submit the patch. Thanks for clarifying Rohit

Re: [PATCH v2 1/1] t3600: use test_path_is_dir and test_path_is_file

2019-02-26 Thread Johannes Schindelin
Hi Rohit, On Wed, 27 Feb 2019, Rohit Ashiwal wrote: > On Tue, Feb 26, 2019 at 10:07 PM SZEDER Gábor wrote: > > > Furthermore, there are a couple of place where the '!' is not in front > > of the whole 'test' command but is given as an argument, e.g.: > > > > test ! -f file > > > > Please conve

Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Rohit Ashiwal
Hey! On Wed, Feb 27, 2019 at 1:22 AM Johannes Schindelin wrote: > > We already have `test_path_is_missing`. Why not use that instead of `! > test -d` or `! test -f`? > Yes, I think this is better. It will satisfy all the requirements I guess. Ciao Rohit

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Johannes Schindelin
Hi, On Tue, 26 Feb 2019, Jeff King wrote: > I had a vague notion that there was some reason (portability?) that we > preferred to have the wrappers. But as your patch shows, they really are > just calling "test" and nothing else. Let's also not forget about the fact that `test -f` is actually no

Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Johannes Schindelin
Hi, On Tue, 26 Feb 2019, Rohit Ashiwal wrote: > Hi Martin > > On Tue, Feb 26, 2019 at 10:01 PM Martin Ågren wrote: > > > > > - ! test -d submod && > > > + ! test_path_is_dir submod && > > > > Now, here I wonder. This (and other changes like this) means that every > > time the test p

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread SZEDER Gábor
On Tue, Feb 26, 2019 at 12:43:17PM -0500, Jeff King wrote: > On Tue, Feb 26, 2019 at 06:04:00PM +0100, SZEDER Gábor wrote: > > > > Whereas: > > > > > > + test -f doesnotexist > > > + echo File doesnotexist doesn't exist. > > > File doesnotexist doesn't exist. > > > + false > > >

Re: [PATCH v2 1/1] t3600: use test_path_is_dir and test_path_is_file

2019-02-26 Thread Rohit Ashiwal
Hi SZEDER On Tue, Feb 26, 2019 at 10:07 PM SZEDER Gábor wrote: > > We prefer to use imperative mode when talking about what a patch does, > as if the author were to give orders to the code base. So e.g. > instead of > > This patch will ... > > we would usually write something like this: > >

Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Rohit Ashiwal
Hi Martin On Tue, Feb 26, 2019 at 10:01 PM Martin Ågren wrote: > > > - ! test -d submod && > > + ! test_path_is_dir submod && > > Now, here I wonder. This (and other changes like this) means that every > time the test passes, we see "Directory submod doesn't exist.", which is > perhap

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Jeff King
On Tue, Feb 26, 2019 at 06:48:43PM +0100, Matthieu Moy wrote: > > '-x' tracing doesn't work in all test scripts, unless it is run with a > > Bash version already supporting BASH_XTRACEFD, i.e. v4.1 or later. > > Notably the default Bash shipped in macOS is somewhere around v3.2. > > According to

Re: [FIXUP] Fixup on tip of jt/http-auth-proto-v2-fix

2019-02-26 Thread Jonathan Tan
> Thanks for fixing it. > > Is there a particular patch this should be squashed into, or does it > stand alone? It the latter, mind writing a commit message for it? Not sure if I'm using "fixup" correctly in the subject, but this is meant to be squashed onto the tip of jt/http-auth-proto-v2-fix

Re: Students projects: looking for small and medium project ideas

2019-02-26 Thread Matthieu Moy
Fabio Aiuto writes: > Hi Matthieu and to all developers, > I'm Fabio, no more a student and I'm brand new in community > development. I joined the git mailing-list about two weeks ago and I'm > looking for some first fix or tasks. I apologize myself in advance for > my little know of the subject.

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Matthieu Moy
SZEDER Gábor writes: > On Tue, Feb 26, 2019 at 05:10:30PM +0100, Ævar Arnfjörð Bjarmason wrote: >> However. I wonder in general if we've re-visited the utility of these >> wrappers and maybe other similar wrappers after -x was added. > >> But 4 years after this was added in a136f6d8ff ("test-lib.

Re: [PATCH v3 2/2] setup: fix memory leaks with `struct repository_format`

2019-02-26 Thread Jeff King
On Mon, Feb 25, 2019 at 08:21:07PM +0100, Martin Ågren wrote: > It's time to resurrect this thread. I've reworked this patch to avoid > the compound literal when re-initing a struct, and I've been going back > and forth on this point about having to initialize to `..._INIT` or risk > crashing. And

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Jeff King
On Tue, Feb 26, 2019 at 06:04:00PM +0100, SZEDER Gábor wrote: > > Whereas: > > > > + test -f doesnotexist > > + echo File doesnotexist doesn't exist. > > File doesnotexist doesn't exist. > > + false > > error: last command exited with $?=1 > > > > Gives me the same thing, but

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Jeff King
On Tue, Feb 26, 2019 at 05:10:30PM +0100, Ævar Arnfjörð Bjarmason wrote: > But 4 years after this was added in a136f6d8ff ("test-lib.sh: support -x > option for shell-tracing", 2014-10-10) we got -x, and then with "-i -v -x": > > expecting success: > test_path_is_dir .git && >

Bug: "orphaned" trees indistinguishable in git log --graph output

2019-02-26 Thread Stefan Tauner
Hi, I noticed a problem how git log --graph represents orphaned trees, i.e. how it renders a forest (and not just a single tree). If a repository is comprised of multiple unconnected trees it can easily happen that their commits are intertwined in the output of git log --graph so that the root of

A note from the maintainer

2019-02-26 Thread Junio C Hamano
[jc: as I said earlier, I'll be offline for a week, but remembered that I haven't sent this out for a while---I tried to make a habit of sending this message out after every feature release, and we had one recently, so it is a good time to send one from the airport lounge before I fly out.] Welcom

[PATCH v4 4/4] blame: add a config option to mark ignored lines

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

[PATCH v4 2/4] blame: use a helper function in blame_chunk()

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

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

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

[PATCH v4 0/4] blame: add the ability to ignore commits

2019-02-26 Thread Barret Rhoden
This patch set adds the ability to ignore a set of commits and their changes when blaming. This can be used to ignore a commit deemed 'not interesting,' such as reformatting. v3 -> v4 v3: https://public-inbox.org/git/2019021722.240676-1-b...@google.com/ - Cleaned up the tests, especially remo

[PATCH v4 1/4] Move init_skiplist() outside of fsck

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

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread SZEDER Gábor
On Tue, Feb 26, 2019 at 05:10:30PM +0100, Ævar Arnfjörð Bjarmason wrote: > However. I wonder in general if we've re-visited the utility of these > wrappers and maybe other similar wrappers after -x was added. > But 4 years after this was added in a136f6d8ff ("test-lib.sh: support -x > option for s

Re: [PATCH v2 1/1] t3600: use test_path_is_dir and test_path_is_file

2019-02-26 Thread SZEDER Gábor
Hi and welcome! On Tue, Feb 26, 2019 at 06:26:09AM -0800, Rohit Ashiwal via GitGitGadget wrote: > Previously we were using `test -(d|f)` to verify > the presence of a directory/file, but we already > have helper functions, viz, `test_path_is_dir` > and `test_path_is_file` with better functionality

Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Martin Ågren
On Tue, 26 Feb 2019 at 14:43, Rohit Ashiwal via GitGitGadget wrote: > > t3600-rm.sh: Previously we were using `test -(d|f)` > to verify the presencee of a directory/file, but we > already have helper functions, viz, test_path_is_dir > and test_path_is_file with same functionality. This > patch wil

Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 26 2019, Duy Nguyen wrote: > On Tue, Feb 26, 2019 at 8:42 PM Rohit Ashiwal via GitGitGadget > wrote: >> >> From: Rohit Ashiwal >> >> t3600-rm.sh: Previously we were using `test -(d|f)` >> to verify the presencee of a directory/file, but we >> already have helper functions, viz, tes

Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Johannes Schindelin
Hi Rohit, the oneline suggests that this fixes all the tests, but it only fixes t3600. So maybe use "t3600:" instead of "tests:"? On Tue, 26 Feb 2019, Rohit Ashiwal via GitGitGadget wrote: > From: Rohit Ashiwal > > t3600-rm.sh: Previously we were using `test -(d|f)` > to verify the presencee o

Re: git commit --verbose shows incorrect diff when pre-commit hook is used to modify files

2019-02-26 Thread Fernando Chorney
Hmm looks like I forgot to send my reply to this back to the mailing list. "Hmm, so I currently have it set to run vim as my commit editor, and enter the message in there most of the time. I can definitely see output from the hook into the shell before my vim editor loads up that shows me the diff

[PATCH v2 1/1] t3600: use test_path_is_dir and test_path_is_file

2019-02-26 Thread Rohit Ashiwal via GitGitGadget
From: Rohit Ashiwal Previously we were using `test -(d|f)` to verify the presence of a directory/file, but we already have helper functions, viz, `test_path_is_dir` and `test_path_is_file` with better functionality. This patch will replace `test -(d|f)` calls in t3660.sh These helper functions m

[PATCH v2 0/1] [GSoC][PATCH] t3600: use test_path_is_dir and test_path_is_file

2019-02-26 Thread Rohit Ashiwal via GitGitGadget
Previously we were using test -(d|f) to verify the presencee of a directory/file, but we already have helper functions, viz, test_path_is_dir and test_path_is_file with same functionality. This patch will replace test -(d|f) calls in t3600-rm.sh. Rohit Ashiwal (1): t3600: use test_path_is_dir an

Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 8:42 PM Rohit Ashiwal via GitGitGadget wrote: > > From: Rohit Ashiwal > > t3600-rm.sh: Previously we were using `test -(d|f)` > to verify the presencee of a directory/file, but we > already have helper functions, viz, test_path_is_dir > and test_path_is_file with same func

[PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Rohit Ashiwal via GitGitGadget
From: Rohit Ashiwal t3600-rm.sh: Previously we were using `test -(d|f)` to verify the presencee of a directory/file, but we already have helper functions, viz, test_path_is_dir and test_path_is_file with same functionality. This patch will replace `test -(d|f)` calls in t3600-rm.sh. Signed-off-b

[PATCH 0/1] [GSoC][PATCH] tests: replace test -(d|f) with test_path_is_(dir|file)

2019-02-26 Thread Rohit Ashiwal via GitGitGadget
Previously we were using test -(d|f) to verify the presencee of a directory/file, but we already have helper functions, viz, test_path_is_dir and test_path_is_file with same functionality. This patch will replace test -(d|f) calls in t3600-rm.sh. Rohit Ashiwal (1): tests: replace `test -(d|f)` w

Re: [WIP RFC PATCH v2 5/5] clone: use dir-iterator to avoid explicit dir traversal

2019-02-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 26 2019, Duy Nguyen wrote: > On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares > wrote: >> >> Replace usage of opendir/readdir/closedir API to traverse directories >> recursively, at copy_or_link_directory function, by the dir-iterator >> API. This simplifies the code and avoid recur

Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages

2019-02-26 Thread Eric Sunshine
On Tue, Feb 26, 2019 at 12:59 AM Martin Ågren wrote: > On Mon, 25 Feb 2019 at 22:01, Eric Sunshine wrote: > > I guess I was further confused by the fact that manpage-base-url.xsl > > is still present even after "make distclean", which is not something I > > would have expected for a generated fil

Re: [PATCH v13 00/27] Convert "git stash" to C builtin

2019-02-26 Thread Johannes Schindelin
Hi Thomas, On Mon, 25 Feb 2019, Thomas Gummerer wrote: > As I was advocating for this series to go into 'next' without a large > refactor of this series, I'll put my money were my mouth is and try to > make the cleanups and fixes required, though without trying to avoid > further external process

Re: [WIP RFC PATCH v2 5/5] clone: use dir-iterator to avoid explicit dir traversal

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > > Replace usage of opendir/readdir/closedir API to traverse directories > recursively, at copy_or_link_directory function, by the dir-iterator > API. This simplifies the code and avoid recursive calls to > copy_or_link_directory. > > This p

[RFC PATCH v3 3/5] clone: copy hidden paths at local clone

2019-02-26 Thread Ævar Arnfjörð Bjarmason
From: Matheus Tavares Make the copy_or_link_directory function no longer skip hidden paths. This function, used to copy .git/objects, currently skips all hidden directories but not hidden files, which is an odd behaviour. The reason for that could be unintentional: probably the intention was to s

[RFC PATCH v3 5/5] clone: use dir-iterator to avoid explicit dir traversal

2019-02-26 Thread Ævar Arnfjörð Bjarmason
From: Matheus Tavares Replace usage of opendir/readdir/closedir API to traverse directories recursively, at copy_or_link_directory function, by the dir-iterator API. This simplifies the code and avoid recursive calls to copy_or_link_directory. This process also makes copy_or_link_directory call

[RFC PATCH v3 4/5] clone: extract function from copy_or_link_directory

2019-02-26 Thread Ævar Arnfjörð Bjarmason
From: Matheus Tavares Extract dir creation code snippet from copy_or_link_directory to its own function named mkdir_if_missing. This change will help removing copy_or_link_directory's explicit recursion, which will be done in a following patch. Also makes code more readable. Signed-off-by: Mathe

[RFC PATCH v3 2/5] dir-iterator: add flags parameter to dir_iterator_begin

2019-02-26 Thread Ævar Arnfjörð Bjarmason
From: Matheus Tavares Add the possibility of giving flags to dir_iterator_begin to initialize a dir-iterator with special options. Currently possible flags are DIR_ITERATOR_PEDANTIC, which makes dir_iterator_advance abort imediatelly in the case of an error while trying to fetch next entry; and

[RFC PATCH v3 0/5] clone: dir iterator refactoring with tests

2019-02-26 Thread Ævar Arnfjörð Bjarmason
There's still active review going on for the "v2"[1], in particular Duy's comments coming in as I write this. This doesn't address any of that. What it does do is have a better version of my patch to add tests for the current behavior. It now doesn't reply the on SHA1 prereq anymore, and we can te

[RFC PATCH v3 1/5] clone: test for our behavior on odd objects/* content

2019-02-26 Thread Ævar Arnfjörð Bjarmason
Add tests for what happens when we locally clone .git/objects directories where some of the loose objects or packs are symlinked, or when when there's unknown files there. I'm bending over backwards here to avoid a SHA1 dependency. See [1] for an earlier and simpler version that hardcoded a SHA-1s

Re: [WIP RFC PATCH v2 0/5] clone: dir iterator refactoring with tests

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 6:36 PM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Feb 26 2019, Matheus Tavares wrote: > > > Ævar sent v1: > > https://public-inbox.org/git/20190226002625.13022-1-ava...@gmail.com/ > > Tip. Use --in-reply-to with git format-patch, then the whole discussion > goes in the

Re: [WIP RFC PATCH v2 4/5] clone: extract function from copy_or_link_directory

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > > Extract dir creation code snippet from copy_or_link_directory to its own > function named mkdir_if_missing. This change will help removing > copy_or_link_directory's explicit recursion, which will be done in a > following patch. Also make

Re: [WIP RFC PATCH v2 3/5] clone: copy hidden paths at local clone

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > > Make the copy_or_link_directory function no longer skip hidden paths. It's actually only hidden directories because of the S_ISDIR check right above. Not that it matters much... > This function, used to copy .git/objects, currently skip

Re: [WIP RFC PATCH v2 1/5] dir-iterator: add flags parameter to dir_iterator_begin

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > int dir_iterator_advance(struct dir_iterator *dir_iterator) > { > struct dir_iterator_int *iter = > (struct dir_iterator_int *)dir_iterator; > + int ret; > > while (1) { > struct dir_i

Re: [WIP RFC PATCH v2 0/5] clone: dir iterator refactoring with tests

2019-02-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 26 2019, Matheus Tavares wrote: > Ævar sent v1: > https://public-inbox.org/git/20190226002625.13022-1-ava...@gmail.com/ Tip. Use --in-reply-to with git format-patch, then the whole discussion goes in the same thread on the ML.

Re: [WIP RFC PATCH v2 5/5] clone: use dir-iterator to avoid explicit dir traversal

2019-02-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 26 2019, Matheus Tavares wrote: > + int iter_status; > + struct stat st; > + unsigned flags; If you compile with DEVELOPER=1 you'll get compile-time errors when variables aren't used. Like "st" here.

Re: [WIP RFC PATCH 5/7] clone: use dir-iterator to avoid explicit dir traversal

2019-02-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 26 2019, Matheus Tavares Bernardino wrote: > On Mon, Feb 25, 2019 at 9:26 PM Ævar Arnfjörð Bjarmason > wrote: >> >> From: Matheus Tavares >> >> Replace usage of opendir/readdir/closedir API to traverse directories >> recursively, at copy_or_link_directory function, by the dir-itera

[PATCH 2/2] gitk: disable autoselect by default

2019-02-26 Thread Andrej Shadura
Auto-selection of the commit hash overwrites whatever content was in the selection clipboard, and also pollutes the clipboard history if the user is using a clipboard manager. Most users probably want this off by default. Signed-off-by: Andrej Shadura --- gitk-git/gitk | 2 +- 1 file changed, 1

[PATCH 1/2] gitk: refresh the colour scheme

2019-02-26 Thread Andrej Shadura
The colours gitk is currently using are from the basic 16 colour palette, and are a bit too intensive to be comfortable or pleasant to work with. Adjust the main colours (commit nodes, remotes, tags and one branch colour) to be slightly softer. Signed-off-by: Andrej Shadura --- gitk-git/gitk |

[PATCH v3 0/1] worktree add: sanitize worktree names

2019-02-26 Thread Nguyễn Thái Ngọc Duy
v3 is rewritten to use refname_disposition[] to cover all invalid chars. Nguyễn Thái Ngọc Duy (1): worktree add: sanitize worktree names builtin/worktree.c | 37 - refs.c | 6 ++ refs.h | 1 + t/t2025-worktree-add

[PATCH v3 1/1] worktree add: sanitize worktree names

2019-02-26 Thread Nguyễn Thái Ngọc Duy
Worktree names are based on $(basename $GIT_WORK_TREE). They aren't significant until 3a3b9d8cde (refs: new ref types to make per-worktree refs visible to all worktrees - 2018-10-21), where worktree name could be part of a refname and must follow refname rules. Update 'worktree add' code to remove

Re: [GSoC][PATCH 3/3] clone: use dir-iterator to avoid explicit dir traversal

2019-02-26 Thread Christian Couder
Hi Matheus, On Mon, Feb 25, 2019 at 3:31 AM Matheus Tavares Bernardino wrote: > > I am a little confused about what I should do next. How should I > proceed with this series? When there are different opinions about what you should do, I would suggest doing only things everyone is ok with, and th

Zhejiang Wuchuan Industrial Co., Ltd, Exhibit at LIFESTYLE EXPO TOKYO to expand your business in Japan/Asia!

2019-02-26 Thread LIFESTYLE EXPO TOKYO Show Management
Dear International Sales & Marketing Director, Zhejiang Wuchuan Industrial Co., Ltd Hello, this is Eiichi Hasegawa from LIFESTYLE EXPO TOKYO Show Management. Are you interested in expanding your business in Japan and Asia-Pacific region? https://www.lifestyle-expo.jp/en-gb.html LIFESTYLE EXPO

Re: [WIP 0/7] CDN offloading of fetch response

2019-02-26 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 26 2019, Christian Couder wrote: > Hi, > > On Tue, Feb 26, 2019 at 12:45 AM Jonathan Nieder wrote: >> >> Christian Couder wrote: >> > On Sun, Feb 24, 2019 at 12:39 AM Jonathan Tan >> > wrote: >> >> > Especially I'd like to know what should the client do if they find out >> > that

Re: [WIP 0/7] CDN offloading of fetch response

2019-02-26 Thread Christian Couder
Hi, On Tue, Feb 26, 2019 at 12:45 AM Jonathan Nieder wrote: > > Christian Couder wrote: > > On Sun, Feb 24, 2019 at 12:39 AM Jonathan Tan > > wrote: > > > Especially I'd like to know what should the client do if they find out > > that for example a repo that contains a lot of large files is > >