Re: [L10N] Kickoff of translation for Git 2.14.0 round 1

2017-07-18 Thread Jordi Mas
El 15/07/2017 a les 07:06, Jiang Xin ha escrit: Hi, Git v2.14.0-rc0 has been released, and it's time to start new round of git l10n. This time there are 30+ updated messages need to be translated since last update: l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed) Generate

Re: [PATCH] PRItime: wrap PRItime for better l10n compatibility

2017-07-18 Thread Jiang Xin
2017-07-19 1:35 GMT+08:00 Junio C Hamano : > Jiang Xin writes: > >>> Two potential issues are: >>> >>> - After this patch, there still are quite a many >>> >>> printf("time is %"PRItime" ...\n", timestamp) >>> >>>so the burden on the

Re: [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C

2017-07-18 Thread Junio C Hamano
On Tue, Jul 18, 2017 at 3:44 PM, Stefan Beller wrote: > On Tue, Jul 18, 2017 at 3:32 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> + if (!lstat(list_item->name, ) && !ce_match_stat(list_item, , 0)) { +

Re: [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C

2017-07-18 Thread Stefan Beller
On Tue, Jul 18, 2017 at 3:32 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> + if (!lstat(list_item->name, ) && !ce_match_stat(list_item, , >>> 0)) { >>> + print_status(info, ' ', list_item->name, sub_sha1, >>> displaypath); >>

Re: [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C

2017-07-18 Thread Junio C Hamano
Stefan Beller writes: >> + if (!lstat(list_item->name, ) && !ce_match_stat(list_item, , >> 0)) { >> + print_status(info, ' ', list_item->name, sub_sha1, >> displaypath); > > The question from the last round still stands >

[PATCH] fsck: remove redundant parse_tree() invocation

2017-07-18 Thread Jonathan Tan
If obj->type == OBJ_TREE, an invocation of fsck_walk() will invoke parse_tree() and return quickly if that returns nonzero, so it is of no use for traverse_one_object() to invoke parse_tree() in this situation before invoking fsck_walk(). Remove that code. The behavior of traverse_one_object() is

Re: [GSoC][PATCH 5/8] submodule: port submodule subcommand 'sync' from shell to C

2017-07-18 Thread Stefan Beller
On Tue, Jul 18, 2017 at 1:49 PM, Prathamesh Chavan wrote: > Port the submodule subcommand 'sync' from shell to C using the same > mechanism as that used for porting submodule subcommand 'status'. > Hence, here the function cmd_sync() is ported from shell to C. > This is done by

What's cooking in git.git (Jul 2017, #05; Tue, 18)

2017-07-18 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. A maintenance release for 2.13.x

Re: [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C

2017-07-18 Thread Stefan Beller
On Tue, Jul 18, 2017 at 1:49 PM, Prathamesh Chavan wrote: > This aims to make git-submodule 'status' a built-in. Hence, the function > cmd_status() is ported from shell to C. This is done by introducing > three functions: module_status(), submodule_status() and print_status().

Re: What's cooking in git.git (Jul 2017, #04; Thu, 13)

2017-07-18 Thread Junio C Hamano
Santiago Torres writes: > ... It seems Debian oldstable and other variants still ship gpg1, > which doesn't have it. Would it make sense to have a fallthrough branch > on the switch statement for gpg2.1 instead? something like the attached patch. If the problem of leftover

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-18 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Nieder writes: > >> >> All that said, I don't have a strong opinion on this. Both the 1-word >> approach (a pointer) and 24-word approach (embedding) are tolerable >> and there are reasons to prefer each. > > I do not

Re: What's cooking in git.git (Jul 2017, #04; Thu, 13)

2017-07-18 Thread Santiago Torres
> Oh, wait, I can run "gpg" just fine, but I do not seem to have > gpgconf. > > $ type gpgconf > bash: type: gpgconf: not found > > The patch may need a bit more cross-version work, it seems. Right, sorry about that. I was testing against Debian Stretch/Arch, who do ship gpg2 with

Re: [PATCH] gitweb bugfix - check for search permission on sub-directories while scanning project root to prevent program termination

2017-07-18 Thread Junio C Hamano
Hielke Christian Braun writes: > Hi, > > gitweb terminates and shows no project list, if it can not access a > sub-directory in the project root directory. It should show a list of > the projects it can access. Patch corrects this by skipping inaccessible > directories. > > >

Re: reftable [v2]: new ref storage format

2017-07-18 Thread Shawn Pearce
On Mon, Jul 17, 2017 at 12:51 PM, Junio C Hamano wrote: > Shawn Pearce writes: >> You can read a rendered version of this here: >> https://googlers.googlesource.com/sop/jgit/+/reftable/Documentation/technical/reftable.md > > Just a few comments. > >> A

[GSoC][PATCH 8/8] submodule: port submodule subcommand 'summary' from shell to C

2017-07-18 Thread Prathamesh Chavan
The submodule subcommand 'summary' is ported in the process of making git-submodule a builtin. The function cmd_summary() from git-submodule.sh is ported to functions module_summary(), compute_summary_module_list(), prepare_submodule_summary() and print_submodule_summary(). The first function

[GSoC][PATCH 5/8] submodule: port submodule subcommand 'sync' from shell to C

2017-07-18 Thread Prathamesh Chavan
Port the submodule subcommand 'sync' from shell to C using the same mechanism as that used for porting submodule subcommand 'status'. Hence, here the function cmd_sync() is ported from shell to C. This is done by introducing three functions: module_sync(), sync_submodule() and

[GSoC][PATCH 6/8] submodule: port submodule subcommand 'deinit' from shell to C

2017-07-18 Thread Prathamesh Chavan
The same mechanism is used even for porting this submodule subcommand, as used in the ported subcommands till now. The function cmd_deinit in split up after porting into three functions: module_deinit(), for_each_submodule_list() and deinit_submodule(). Mentored-by: Christian Couder

[GSoC][PATCH 7/8] diff: change scope of the function count_lines()

2017-07-18 Thread Prathamesh Chavan
Change the scope of function count_lines for allowing the function to be reused in other parts of the code as well. Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off-by: Prathamesh Chavan --- diff.c | 2 +-

[GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C

2017-07-18 Thread Prathamesh Chavan
This aims to make git-submodule 'status' a built-in. Hence, the function cmd_status() is ported from shell to C. This is done by introducing three functions: module_status(), submodule_status() and print_status(). The function module_status() acts as the front-end of the subcommand. It parses

[GSoC][PATCH 0/8] Update: Week 9

2017-07-18 Thread Prathamesh Chavan
SUMMARY OF MY PROJECT: Git submodule subcommands are currently implemented by using shell script 'git-submodule.sh'. There are several reasons why we'll prefer not to use the shell script. My project intends to convert the subcommands into C code, thus making them builtins. This will increase

[GSoC][PATCH 2/8] submodule--helper: introduce for_each_submodule_list()

2017-07-18 Thread Prathamesh Chavan
Introduce function for_each_submodule_list() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller

[GSoC][PATCH 3/8] submodule: port set_name_rev() from shell to C

2017-07-18 Thread Prathamesh Chavan
Function set_name_rev() is ported from git-submodule to the submodule--helper builtin. The function get_name_rev() generates the value of the revision name as required, and the function print_name_rev() handles the formating and printing of the obtained revision name. Mentored-by: Christian

[GSoC][PATCH 1/8] submodule--helper: introduce get_submodule_displaypath()

2017-07-18 Thread Prathamesh Chavan
Introduce function get_submodule_displaypath() to replace the code occurring in submodule_init() for generating displaypath of the submodule with a call to it. This new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder

Is anybody seeing t5551 get stuck, every once in a while?

2017-07-18 Thread Junio C Hamano

Re: [PATCH v3 00/10] Convert grep to recurse in-process

2017-07-18 Thread Brandon Williams
On 07/18, Junio C Hamano wrote: > Brandon Williams writes: > > > Changes in v3: > > * Fixes a bug with repo_read_gitmodules() where it was possible to > >segfault when a repository didn't have a worktree. > > * In order to fix the above bug repo_read_gitmodules() and

Re: [ANNOUNCE] Git v2.14.0-rc0

2017-07-18 Thread Junio C Hamano
Junio C Hamano writes: > As I shoot for shorter summary, going down to too much detail in > these entries is not welcome. > > However, an exception is the top part of the release notes where we > discuss backward incompatible changes etc. that helps people to > decide the

Re: [PATCH] t8008: rely on rev-parse'd HEAD instead of sha1 value

2017-07-18 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Jul 18, 2017 at 12:17 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> Remove hard coded sha1 values, obtain the values using 'git rev-parse HEAD' >>> which should be future proof regardless of

Re: [PATCH v3 00/10] Convert grep to recurse in-process

2017-07-18 Thread Junio C Hamano
Brandon Williams writes: > Changes in v3: > * Fixes a bug with repo_read_gitmodules() where it was possible to >segfault when a repository didn't have a worktree. > * In order to fix the above bug repo_read_gitmodules() and > gitmodules_config() >were merged so

Re: [PATCH] t8008: rely on rev-parse'd HEAD instead of sha1 value

2017-07-18 Thread Stefan Beller
On Tue, Jul 18, 2017 at 12:17 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Remove hard coded sha1 values, obtain the values using 'git rev-parse HEAD' >> which should be future proof regardless of the hash function used. > > Don't hardcoded

Re: [PATCH] t8008: rely on rev-parse'd HEAD instead of sha1 value

2017-07-18 Thread Junio C Hamano
Stefan Beller writes: > Remove hard coded sha1 values, obtain the values using 'git rev-parse HEAD' > which should be future proof regardless of the hash function used. Don't hardcoded lengths of the hashes defeat this future-proofing effort, though? It shouldn't be too

Re: [PATCH v2 00/10] tag: only respect `pager.tag` in list-mode

2017-07-18 Thread Junio C Hamano
Martin Ågren writes: > After that feedback, v2 drops `pager.tag.list` and instead teaches > `git tag` to only consider `pager.tag` in list-mode, as suggested by > Peff. That does sound like a more sensible and safer approach. I may have comments on individual patches,

[PATCH v3 07/10] submodule: check for unstaged .gitmodules outside of config parsing

2017-07-18 Thread Brandon Williams
Teach 'is_staging_gitmodules_ok()' to be able to determine in the '.gitmodules' file has unstaged changes based on the passed in index instead of relying on a global varible which is set during the submodule-config parsing. Signed-off-by: Brandon Williams --- builtin/mv.c |

[PATCH v3 09/10] submodule: merge repo_read_gitmodules and gitmodules_config

2017-07-18 Thread Brandon Williams
Since 69aba5329 (submodule: add repo_read_gitmodules) there have been two ways to load a repository's .gitmodules file: 'repo_read_gitmodules()' is used if you have a repository object you are working with or 'gitmodules_config()' if you are implicitly working with 'the_repository'. Merge the

[PATCH v3 10/10] grep: recurse in-process using 'struct repository'

2017-07-18 Thread Brandon Williams
Convert grep to use 'struct repository' which enables recursing into submodules to be handled in-process. Signed-off-by: Brandon Williams --- Documentation/git-grep.txt | 7 - builtin/grep.c | 396 ++--- cache.h

[PATCH v3 06/10] submodule: remove fetch.recursesubmodules from submodule-config parsing

2017-07-18 Thread Brandon Williams
Remove the 'fetch.recursesubmodules' configuration option from the general submodule-config parsing and instead rely on using 'config_from_gitmodules()' in order to maintain backwards compatibility with this config being placed in the '.gitmodules' file. Signed-off-by: Brandon Williams

[PATCH v3 05/10] submodule: remove submodule.fetchjobs from submodule-config parsing

2017-07-18 Thread Brandon Williams
The '.gitmodules' file should only contain information pertinent to configuring individual submodules (name to path mapping, URL where to obtain the submodule, etc.) while other configuration like the number of jobs to use when fetching submodules should be a part of the repository's config.

[PATCH v3 08/10] submodule: check for unmerged .gitmodules outside of config parsing

2017-07-18 Thread Brandon Williams
Add 'is_gitmodules_unmerged()' function which can be used to determine in the '.gitmodules' file is unmerged based on the passed in index instead of relying on a global variable which is set during the submodule-config parsing. Signed-off-by: Brandon Williams --- submodule.c

[PATCH v3 04/10] config: add config_from_gitmodules

2017-07-18 Thread Brandon Williams
Add 'config_from_gitmodules()' function which can be used by 'fetch' and 'update_clone' in order to maintain backwards compatibility with configuration being stored in .gitmodules' since a future patch will remove reading these values in the submodule-config. This function should not be used

[PATCH v3 03/10] cache.h: add GITMODULES_FILE macro

2017-07-18 Thread Brandon Williams
Add a macro to be used when specifying the '.gitmodules' file. Signed-off-by: Brandon Williams --- cache.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cache.h b/cache.h index 71fe09264..d59f767e2 100644 --- a/cache.h +++ b/cache.h @@ -433,6 +433,7 @@ static inline

[PATCH v3 01/10] repo_read_index: don't discard the index

2017-07-18 Thread Brandon Williams
Have 'repo_read_index()' behave more like the other read_index family of functions and don't discard the index if it has already been populated and instead rely on the quick return of read_index_from which has: /* istate->initialized covers both .git/index and .git/sharedindex.xxx */ if

[PATCH v3 02/10] repository: have the_repository use the_index

2017-07-18 Thread Brandon Williams
Have the index state which is stored in 'the_repository' be a pointer to the in-core index 'the_index'. This makes it easier to begin transitioning more parts of the code base to operate on a 'struct repository'. Signed-off-by: Brandon Williams --- repository.c | 4 +++- 1

[PATCH v3 00/10] Convert grep to recurse in-process

2017-07-18 Thread Brandon Williams
Changes in v3: * Fixes a bug with repo_read_gitmodules() where it was possible to segfault when a repository didn't have a worktree. * In order to fix the above bug repo_read_gitmodules() and gitmodules_config() were merged so that there won't be any duplicate logic. In order to merge

Re: [PATCH] RFC: A new type of symbolic refs

2017-07-18 Thread Junio C Hamano
Stefan Beller writes: >> Even if we limit ourselves to pointing at the index of the >> superproject, there probably are a handful of interesting issues >> that need to be clarified (not in the sense of "this and that issues >> exist, so this won't be a useful feature", but in

Re: reftable: new ref storage format

2017-07-18 Thread Junio C Hamano
Michael Haggerty writes: > On second thought, the idea of having HEAD (or maybe all pseudorefs) > in the same system would open a few interesting possibilities that > derive from having a global, atomic view of all references: > > 1. We could store backlinks from references

Re: What's cooking in git.git (Jul 2017, #04; Thu, 13)

2017-07-18 Thread Junio C Hamano
Santiago Torres writes: > On Mon, Jul 17, 2017 at 03:09:44PM -0700, Junio C Hamano wrote: >> I am not sure if it is merely "if it's even necessary"; if there are >> two tests running in parallel, with their own separate >> $TRASH_DIRECTORY, and one of them say "kill the agent"

Re: Fwd: New Defects reported by Coverity Scan for git

2017-07-18 Thread Stefan Beller
On Tue, Jul 18, 2017 at 11:00 AM, Brandon Williams wrote: > On 07/18, Junio C Hamano wrote: >> Stefan Beller writes: >> >> >> I'd be more worried about segfault we seem to be getting only on >> >> Windows from this: >> >> >> >> git -C parent grep -e

Re: Fwd: New Defects reported by Coverity Scan for git

2017-07-18 Thread Brandon Williams
On 07/18, Junio C Hamano wrote: > Stefan Beller writes: > > >> I'd be more worried about segfault we seem to be getting only on > >> Windows from this: > >> > >> git -C parent grep -e "(1|2)d(3|4)" --recurse-submodules HEAD^ > actual > >> > >> in

Re: Fwd: New Defects reported by Coverity Scan for git

2017-07-18 Thread Junio C Hamano
Stefan Beller writes: >> I'd be more worried about segfault we seem to be getting only on >> Windows from this: >> >> git -C parent grep -e "(1|2)d(3|4)" --recurse-submodules HEAD^ > actual >> >> in https://travis-ci.org/git/git/jobs/254654195 by the way. > > Thanks for

Re: What's cooking in git.git (Jul 2017, #04; Thu, 13)

2017-07-18 Thread Santiago Torres
On Mon, Jul 17, 2017 at 03:09:44PM -0700, Junio C Hamano wrote: > I am not sure if it is merely "if it's even necessary"; if there are > two tests running in parallel, with their own separate > $TRASH_DIRECTORY, and one of them say "kill the agent" at the > beginning, would it affect the other

Re: Fwd: New Defects reported by Coverity Scan for git

2017-07-18 Thread Stefan Beller
On Tue, Jul 18, 2017 at 10:23 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> I looked at this report for a while. My current understanding: >> * its detection was triggered by including rs/move-array, >> f331ab9d4c (use MOVE_ARRAY, 2017-07-15) >>

Re: [PATCH] PRItime: wrap PRItime for better l10n compatibility

2017-07-18 Thread Junio C Hamano
Jiang Xin writes: >> Two potential issues are: >> >> - After this patch, there still are quite a many >> >> printf("time is %"PRItime" ...\n", timestamp) >> >>so the burden on the programmers having to remember when it is >>required to use

git command unrecognized argument issue?

2017-07-18 Thread Gilbert Catipon
Hi, I noticed a surprise inconsistency when using the git command. Using git version 2.7.4 and trying most of the commands listed by git –help usually output error: and usage text when passing an invalid argument. The exception was the commands log and show. Looks like a cosmetic issue but I

Re: Fwd: New Defects reported by Coverity Scan for git

2017-07-18 Thread Junio C Hamano
Stefan Beller writes: > I looked at this report for a while. My current understanding: > * its detection was triggered by including rs/move-array, > f331ab9d4c (use MOVE_ARRAY, 2017-07-15) > * But it is harmless, because the scan logic does not understand > how ALLOC_GROW

Fwd: New Defects reported by Coverity Scan for git

2017-07-18 Thread Stefan Beller
I looked at this report for a while. My current understanding: * its detection was triggered by including rs/move-array, f331ab9d4c (use MOVE_ARRAY, 2017-07-15) * But it is harmless, because the scan logic does not understand how ALLOC_GROW works. It assumes that done_pbase_paths_alloc can

Re: [PATCH v5 8/8] sha1_file: refactor has_sha1_file_with_flags

2017-07-18 Thread Jonathan Tan
On Tue, 18 Jul 2017 12:30:46 +0200 Christian Couder wrote: > On Thu, Jun 22, 2017 at 2:40 AM, Jonathan Tan > wrote: > > > diff --git a/sha1_file.c b/sha1_file.c > > index bf6b64ec8..778f01d92 100644 > > --- a/sha1_file.c > > +++

[PATCH] doc: reformat the paragraph containing the 'cut-line'

2017-07-18 Thread Kaartic Sivaraam
The paragraph that describes the 'scissors' cleanup mode of 'commit' had the 'cut-line' in the middle of a sentence. This made it possible for the line to get wrapped on smaler windows. This shouldn't be the case as it makes it hard for the user to understand the structure of the cut-line.

Re: [PATCH] doc: reformat the paragraph containing the 'cut-line'

2017-07-18 Thread Kaartic Sivaraam
On Mon, 2017-07-17 at 15:16 -0700, Junio C Hamano wrote: > Kaartic Sivaraam writes: > > + Same as `whitespace` except that everything from (and including) > > +the line found below is truncated, if the message is to be edited. > > +"`#`" can be customized

Re: [PATCH v5 8/8] sha1_file: refactor has_sha1_file_with_flags

2017-07-18 Thread Christian Couder
On Thu, Jun 22, 2017 at 2:40 AM, Jonathan Tan wrote: > diff --git a/sha1_file.c b/sha1_file.c > index bf6b64ec8..778f01d92 100644 > --- a/sha1_file.c > +++ b/sha1_file.c > @@ -3494,18 +3494,10 @@ int has_sha1_pack(const unsigned char *sha1) > > int

[PATCH] gitweb bugfix - check for search permission on sub-directories while scanning project root to prevent program termination

2017-07-18 Thread Hielke Christian Braun
Hi, gitweb terminates and shows no project list, if it can not access a sub-directory in the project root directory. It should show a list of the projects it can access. Patch corrects this by skipping inaccessible directories. Signed-off-by: Hielke Christian Braun ---

Re: Warning suggestion for git stash drop

2017-07-18 Thread Laurent Humblet
Oh great, an answer 20 days later ... Sorry about this. I have been reading a bit on the topic and found that for Bash we should be using shell functions over aliases so I wrote this function to be simply added to the .bashrc: # 'git stash drop' confirm shell function git() { if [[ $@ ==