Re: [PATCH 4/4] config: don't implicitly use gitdir

2017-06-12 Thread Brandon Williams
On 06/12, Jonathan Nieder wrote: > Hi again, > > Brandon Williams wrote: > > On 06/12, Jonathan Nieder wrote: > > >> Alternatively, could this patch rename git_config_with_options? That > >> way any other patch in flight that calls git_config_with_options would > >> conflict with this patch,

Re: [PATCH v2] doc: fix location of index in worktree scenatio

2017-06-12 Thread Torsten Bögershausen
On 06/12/2017 06:06 PM, Junio C Hamano wrote: Torsten Bögershausen writes: Thanks for working on this (and keeping me in cc) The commit head line does not fully match my expactions: "doc: fix location of index in worktree scenatio" "doc:" is OK, but is the "location of index"

Re: [PATCH] send-email: Add tocmd option to suppress-cc

2017-06-12 Thread Viresh Kumar
On 12-06-17, 11:04, Junio C Hamano wrote: > Junio C Hamano writes: > > > Viresh Kumar writes: > > > >> On 18-05-17, 17:05, Viresh Kumar wrote: > >>> This adds tocmd option to suppress-cc command which already supports > >>> cccmd and others. > >>> >

Re: Feature Request: Show status of the stash in git status command

2017-06-12 Thread liam Beguin
Hi, Thanks for the feedback. I'll be sending a patch with the updates shortly! On 12/06/17 11:35 AM, Junio C Hamano wrote: > liam Beguin writes: > >> +static int stash_count_refs(struct object_id *ooid, struct object_id *noid, >> +const char

Re: [PATCH 4/4] config: don't implicitly use gitdir

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 06:38:17PM -0700, Jonathan Nieder wrote: > Brandon Williams wrote: > > On 06/12, Jonathan Nieder wrote: > > >> Alternatively, could this patch rename git_config_with_options? That > >> way any other patch in flight that calls git_config_with_options would > >> conflict

[RFC/PATCH] builtin/blame: darken redundant line information

2017-06-12 Thread Stefan Beller
When using git-blame lots of lines contain redundant information, for example in hunks that consist of multiple lines, the metadata (commit name, author, timezone) are repeated. A reader may not be interested in those, so darken them. The darkening is not just based on hunk, but actually takes the

Re: [PATCH 0/3] update sha1dc

2017-06-12 Thread Liam R. Howlett
* ?var Arnfj?r? Bjarmason [170606 11:12]: > This updates sha1dc fixing the issue on Cygwin introduced in 2.13.1, > and hopefully not regressing elsewhere. Liam, it would be much > appreciated if you could test this on SPARC. Tested and confirmed this works for SPARC with no

Re: [PATCH 4/4] config: don't implicitly use gitdir

2017-06-12 Thread Jonathan Nieder
Hi again, Brandon Williams wrote: > On 06/12, Jonathan Nieder wrote: >> Alternatively, could this patch rename git_config_with_options? That >> way any other patch in flight that calls git_config_with_options would >> conflict with this patch, giving us an opportunity to make sure it >> also

Re: [PATCH 4/4] config: don't implicitly use gitdir

2017-06-12 Thread Jonathan Nieder
Brandon Williams wrote: > On 06/12, Jonathan Nieder wrote: >> Brandon Williams wrote: >>> Commit 2185fde56 (config: handle conditional include when $GIT_DIR is >>> not set up) added a 'git_dir' field to the config_options struct. Let's >>> use this option field explicitly all the time instead of

Re: [PATCH 4/4] config: don't implicitly use gitdir

2017-06-12 Thread Brandon Williams
On 06/12, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > Commit 2185fde56 (config: handle conditional include when $GIT_DIR is > > not set up) added a 'git_dir' field to the config_options struct. Let's > > use this option field explicitly all the time instead of occasionally >

Re: [PATCH 0/4] config.h

2017-06-12 Thread Jonathan Nieder
Brandon Williams wrote: > Brandon Williams (4): > config: create config.h > config: remove git_config_iter > config: don't include config.h by default > config: don't implicitly use gitdir Patches 1-3 are Reviewed-by: Jonathan Nieder I'm very happy to see cache.h

Re: [PATCH 4/4] config: don't implicitly use gitdir

2017-06-12 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > Commit 2185fde56 (config: handle conditional include when $GIT_DIR is > not set up) added a 'git_dir' field to the config_options struct. Let's > use this option field explicitly all the time instead of occasionally > falling back to calling 'git_pathdup("config")'

Re: [PATCH 2/4] config: remove git_config_iter

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 05:49:11PM -0700, Jonathan Nieder wrote: > > Since there is no implementation of the function 'git_config_iter' lets > > stop exporting it and remove the prototype from config.h. > > > > Signed-off-by: Brandon Williams > > --- > > config.h | 1 - > > 1

Re: [PATCHv2 1/5] revision.h: turn rev_info.early_output back into an unsigned int

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 05:59:02PM -0400, Jeff King wrote: > The nice thing about deprecating it is that I think callers need to be > prepared to handle the case already that it does nothing. So if we just > ripped out the code and treated it as a silent noop, everything would > just work.

Re: [PATCH 2/4] config: remove git_config_iter

2017-06-12 Thread Jonathan Nieder
(+tanayabh) Hi, Brandon Williams wrote: > Since there is no implementation of the function 'git_config_iter' lets > stop exporting it and remove the prototype from config.h. > > Signed-off-by: Brandon Williams > --- > config.h | 1 - > 1 file changed, 1 deletion(-) Good

proposal for how to share other refs as part of refs/tracking/*

2017-06-12 Thread Jacob Keller
Hi, There's no actual code yet, (forgive me), but I've been thinking back to a while ago about attempting to find a way to share things like refs/notes, and similar refs which are usually not shared across a remote. By default, those refs are not propagated when you do a push or a pull, and this

Re: [BUG] add_again() off-by-one error in custom format

2017-06-12 Thread Junio C Hamano
Michael Giuffrida writes: > For the abbreviated commit hash placeholder ('h'), pretty.c uses > add_again() to cache the result of the expansion, and then uses that > result in future expansions. This causes problems when the expansion > includes whitespace: > > $ git

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread René Scharfe
Am 12.06.2017 um 21:02 schrieb Ævar Arnfjörð Bjarmason: I only ever use the time offset info to quickly make a mental note of "oh +0200, this guy's in Europe", or "oh -0400 America East". Having any info at all for %Z would allow me to easily replace that already buggy mapping that exists in my

[PATCH 06/17] tree: convert read_tree to take an index parameter

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 2 +- tree.c | 28 ++-- tree.h | 3 ++- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index

[PATCH 11/17] ls-files: convert show_ru_info to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 5dbff9496..375fe09d1 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -292,14 +292,14 @@

[PATCH 08/17] ls-files: convert write_eolinfo to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index a78b291ab..8c3f3d8ca 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -53,17 +53,16

[PATCH 05/17] convert: convert renormalize_buffer to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- convert.c | 6 -- convert.h | 3 ++- ll-merge.c| 2 +- merge-recursive.c | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/convert.c b/convert.c index 600d11e73..4097f521f 100644 ---

[PATCH 10/17] ls-files: convert show_other_files to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index b82b78036..5dbff9496 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -108,13 +108,14 @@

[PATCH 16/17] ls-files: factor out debug info into a function

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 55d6f54fd..c9307f9ef 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@

[PATCH 09/17] ls-files: convert show_killed_files to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 8c3f3d8ca..b82b78036 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@

[PATCH 15/17] ls-files: convert show_files to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 927aa6746..55d6f54fd 100644 --- a/builtin/ls-files.c +++

[PATCH 17/17] ls-files: factor out tag calculation

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 41 + 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index c9307f9ef..cdc1cfdd2 100644 --- a/builtin/ls-files.c +++

[PATCH 12/17] ls-files: convert ce_excluded to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 375fe09d1..762257f39 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -321,10 +321,11 @@

[PATCH 14/17] ls-files: convert show_ce_entry to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index b1626b13b..927aa6746 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -232,7 +232,8

[PATCH 13/17] ls-files: convert prune_cache to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 762257f39..b1626b13b 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -380,30

[PATCH 01/17] convert: convert get_cached_convert_stats_ascii to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/ls-files.c | 3 ++- convert.c | 5 +++-- convert.h | 5 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index b376afc31..0044abf66 100644 ---

[PATCH 04/17] convert: convert convert_to_git to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- apply.c| 2 +- blame.c| 2 +- combine-diff.c | 2 +- convert.c | 7 --- convert.h | 8 +--- diff.c | 6 +++--- dir.c | 2 +- sha1_file.c| 4 ++-- 8 files changed, 18 insertions(+), 15

[PATCH 07/17] ls-files: convert overlay_tree_on_cache to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/commit.c | 3 ++- builtin/ls-files.c | 15 --- cache.h| 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index da1ba4c86..78ef319a2 100644 ---

[PATCH 03/17] convert: convert convert_to_git_filter_fd to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- convert.c | 5 +++-- convert.h | 3 ++- sha1_file.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/convert.c b/convert.c index 0cafb06f5..c09242cec 100644 --- a/convert.c +++ b/convert.c @@ -1108,7 +1108,8 @@ int

[PATCH 02/17] convert: convert crlf_to_git to take an index

2017-06-12 Thread Brandon Williams
Signed-off-by: Brandon Williams --- convert.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/convert.c b/convert.c index 03160b376..0cafb06f5 100644 --- a/convert.c +++ b/convert.c @@ -218,13 +218,13 @@ static void check_safe_crlf(const char

[PATCH 00/17] convert ls-files internals to pass around an index

2017-06-12 Thread Brandon Williams
This is the second chunk of patches I want to carve off of my 'repository object' series. As you can see its 17 patches long so by eliminating this the repository series shrinks by a considerable amount. The point of this series is to stop having some of the internals of ls-files (and subsequent

[GSoC] Update: Week 4

2017-06-12 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

Re: [PATCH 0/4] config.h

2017-06-12 Thread Brandon Williams
On 06/12, Jeff King wrote: > On Mon, Jun 12, 2017 at 02:53:52PM -0700, Brandon Williams wrote: > > > > These all seem reasonable to me. Patch 3 made me shrug a little, because > > > it seems like the majority of C files end up including it anyway. I > > > suspect you could break config.h down

Re: [PATCH v5 7/7] fsmonitor: add a performance test

2017-06-12 Thread Junio C Hamano
Ben Peart writes: > diff --git a/t/helper/test-drop-caches.c b/t/helper/test-drop-caches.c > new file mode 100644 > index 00..80830d920b > --- /dev/null > +++ b/t/helper/test-drop-caches.c > @@ -0,0 +1,107 @@ > +#include "git-compat-util.h" > +#include I thought

Re: [PATCH 0/4] config.h

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 02:53:52PM -0700, Brandon Williams wrote: > > These all seem reasonable to me. Patch 3 made me shrug a little, because > > it seems like the majority of C files end up including it anyway. I > > suspect you could break config.h down into two files: the few things > > that

Re: [PATCHv2 1/5] revision.h: turn rev_info.early_output back into an unsigned int

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 01:36:08PM -0700, Junio C Hamano wrote: > > I'm not sure if I was just being thick or if that point (and the fact > > that --early-output has basically been a noop since 2011!) should be > > made more explicit. > > > > Given that nobody noticed, I kind of wonder if we

Re: [PATCH 0/4] config.h

2017-06-12 Thread Brandon Williams
On 06/12, Jeff King wrote: > On Mon, Jun 12, 2017 at 02:34:02PM -0700, Brandon Williams wrote: > > > After some discussion I realized that my 'repository object' series was > > getting > > to be rather long and increase in scope. So I've decided to break off these > > couple patches into their

Re: [PATCH 0/4] config.h

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 02:34:02PM -0700, Brandon Williams wrote: > After some discussion I realized that my 'repository object' series was > getting > to be rather long and increase in scope. So I've decided to break off these > couple patches into their own series so they can be reviewed more

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 02:31:25PM -0700, Junio C Hamano wrote: > >> - status_printf_ln(s, c, _("Changes not staged for commit:")); > >> + if (s->commit_template) > >> + status_printf_ln(s, c, _("Changes not staged for commit:")); > >> + else > >> + status_printf_ln(s, c,

[PATCH 4/4] config: don't implicitly use gitdir

2017-06-12 Thread Brandon Williams
Commit 2185fde56 (config: handle conditional include when $GIT_DIR is not set up) added a 'git_dir' field to the config_options struct. Let's use this option field explicitly all the time instead of occasionally falling back to calling 'git_pathdup("config")' to get the path to the local

[PATCH 3/4] config: don't include config.h by default

2017-06-12 Thread Brandon Williams
Stop including config.h by default in cache.h. Instead only include config.h in those files which require use of the config system. Signed-off-by: Brandon Williams --- advice.c | 1 + alias.c | 1 + apply.c

[PATCH 2/4] config: remove git_config_iter

2017-06-12 Thread Brandon Williams
Since there is no implementation of the function 'git_config_iter' lets stop exporting it and remove the prototype from config.h. Signed-off-by: Brandon Williams --- config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/config.h b/config.h index f7f8b66c5..c70599bd5

[PATCH 1/4] config: create config.h

2017-06-12 Thread Brandon Williams
Move all config related declarations from cache.h to a new config.h header file. This makes cache.h smaller and allows for the opportunity in a following patch to only include config.h when needed. Signed-off-by: Brandon Williams --- cache.h | 190

[PATCH 0/4] config.h

2017-06-12 Thread Brandon Williams
After some discussion I realized that my 'repository object' series was getting to be rather long and increase in scope. So I've decided to break off these couple patches into their own series so they can be reviewed more easily. This should also let them be merged in faster as I suspect it'll

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-12 Thread Junio C Hamano
Jeff King writes: > But I'm not sure it's actually helping for > some of these cases. E.g.: > >> -status_printf_ln(s, c, _("Changes not staged for commit:")); >> +if (s->commit_template) >> +status_printf_ln(s, c, _("Changes not staged for commit:")); >> +

Re: [PATCHv2.1] revision.h: turn rev_info.early_output back into an unsigned int

2017-06-12 Thread Jeff King
On Sat, Jun 10, 2017 at 01:41:01PM +0200, SZEDER Gábor wrote: > rev_info.early_output started out as an unsigned int in cdcefbc97 (Add > "--early-output" log flag for interactive GUI use, 2007-11-03), but > later it was turned into a single bit in a bit field in cc243c3ce > (show:

Re: [PATCH v2 00/32] repository object

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 01:04:09PM -0700, Jonathan Tan wrote: > > I'm not sure I know what you mean by config variables which are static, > > are you referring to the in-memory options which are populated by > > querying the config? Those I wouldn't want to see placed in a > > 'repository

Re: [PATCH v2 32/32] ls-files: use repository object

2017-06-12 Thread Brandon Williams
On 06/10, Junio C Hamano wrote: > Brandon Williams writes: > > >> - if (read_cache() < 0) > >> + if (repo_read_index(the_repository)) > > > > oops, looks like this should have been: > > Queued, with this fix-up already applied. > > It had a bit of conflicts with topics in

Re: [PATCH v2 00/32] repository object

2017-06-12 Thread Jeff King
On Sun, Jun 11, 2017 at 10:24:12PM -0700, Stefan Beller wrote: > On Fri, Jun 9, 2017 at 11:07 PM, Jeff King wrote: > > On Fri, Jun 09, 2017 at 05:40:34PM -0700, Jonathan Tan wrote: > > > >> Before I get into the details, I have some questions: > >> > >> 1. I am concerned that

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 11:28:56AM -0700, Junio C Hamano wrote: > Kaartic Sivaraam writes: > > >> Adding a bit to "struct wt_status" is a good first step to allow all > >> three (i.e. in addition to "Initial commit" and "Changes to be > >> committed", "Changes

Re: [RFC PATCH 2/4] sha1_file: extract type and size from object_info

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 12:52:54PM -0700, Jonathan Tan wrote: > > I like the idea of consolidating the logic. But I can't help but feel > > that pulling these fields out of object_info is a step backwards. The > > point of that struct is to let the caller specify which aspects of the > > object

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 09:02:32PM +0200, Ævar Arnfjörð Bjarmason wrote: > > I think the main problem is that the mapping isn't just "JST->+0900". > > It's a set of rules that depend on the specific time being converted. So > > it's true that at some time t, +0900 may mean JST or KST or whatever.

Re: [RFC PATCH 1/4] sha1_file: teach packed_object_info about typename

2017-06-12 Thread Junio C Hamano
Jonathan Tan writes: > In commit 46f0344 ("sha1_file: support reading from a loose object of > unknown type", 2015-05-06), "struct object_info" gained a "typename" > field that could represent a type name from a loose object file, whether > valid or invalid, as opposed

Re: [PATCH v2 8/8] Use the early config machinery to expand aliases

2017-06-12 Thread Junio C Hamano
Jeff King writes: > On Sat, Jun 10, 2017 at 06:07:30AM -0400, Jeff King wrote: > >> But couldn't we just unconditionally do: >> >> setup_git_directory_gently(); >> >> here to move into the top-level if there is one, without caring about >> cdup_dir at all? > > IOW, drop your

Re: [PATCH v2 00/32] repository object

2017-06-12 Thread Jonathan Tan
On Mon, 12 Jun 2017 12:11:21 -0700 Brandon Williams wrote: > On 06/12, Jonathan Tan wrote: > > On Sat, 10 Jun 2017 02:07:12 -0400 > > Jeff King wrote: > > > > > I do agree that "pass just what the sub-function needs" is a good rule > > > of thumb. But the

Re: [PATCH v2 04/32] config: don't implicitly use gitdir

2017-06-12 Thread Brandon Williams
On 06/08, Brandon Williams wrote: > Commit 2185fde56 (config: handle conditional include when $GIT_DIR is > not set up) added a 'git_dir' field to the config_options struct. Let's > use this option field explicitly all the time instead of occasionally > falling back to calling

Re: [RFC PATCH 2/4] sha1_file: extract type and size from object_info

2017-06-12 Thread Jonathan Tan
On Sat, 10 Jun 2017 03:01:33 -0400 Jeff King wrote: > On Fri, Jun 09, 2017 at 12:23:24PM -0700, Jonathan Tan wrote: > > > Looking at the 3 primary functions (sha1_object_info_extended, > > read_object, has_sha1_file_with_flags), they independently implement > > mechanisms such as

Re: [PATCH v2 00/32] repository object

2017-06-12 Thread Brandon Williams
On 06/12, Jonathan Tan wrote: > On Sat, 10 Jun 2017 02:07:12 -0400 > Jeff King wrote: > > > I do agree that "pass just what the sub-function needs" is a good rule > > of thumb. But the reason that these are globals in the first place is > > that there are a ton of them, and they

Re: [PATCH v2 00/32] repository object

2017-06-12 Thread Jonathan Tan
On Sat, 10 Jun 2017 17:43:29 -0700 Brandon Williams wrote: > I disagree with a few points of what jonathan said (mostly about > removing the config from the repo object, as I like the idea of nothing > knowing about a 'config_set' object) and I think this problem could be >

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 12, 2017 at 8:20 PM, Jeff King wrote: > On Mon, Jun 12, 2017 at 07:53:21PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> >> Of course we can never know if you were in Tokyo or Seul from the info >> >> in the commit object, but we don't need to, it's enough that we just >>

Re: [PATCH v2 00/32] repository object

2017-06-12 Thread Jonathan Tan
On Sat, 10 Jun 2017 02:07:12 -0400 Jeff King wrote: > I do agree that "pass just what the sub-function needs" is a good rule > of thumb. But the reason that these are globals in the first place is > that there are a ton of them, and they are used at the lowest levels of > call

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-12 Thread Junio C Hamano
Kaartic Sivaraam writes: >> Adding a bit to "struct wt_status" is a good first step to allow all >> three (i.e. in addition to "Initial commit" and "Changes to be >> committed", "Changes not staged for commit" is the other one that >> shares this potential

Re: [PATCH 1/1] lock_packed_refs(): fix cache validity check

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 10:06:13AM +0200, Michael Haggerty wrote: > So instead: > > * Extract a function `validate_packed_ref_cache()` that does the > validity check independent of whether the lock is held. > > * Change `get_packed_ref_cache()` to call the new function, but only > if the

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 07:53:21PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> Of course we can never know if you were in Tokyo or Seul from the info > >> in the commit object, but we don't need to, it's enough that we just > >> emit JST for +0900 and anyone reading the output has at least some >

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Mon, Jun 12, 2017 at 6:56 PM, Ulrich Mueller wrote: > >> Please don't. Outputting invented information for something that >> really isn't in the data is worse than outputting no information at >> all. > > It's not invented

Re: bug? fetching from empty unnamed remote repos

2017-06-12 Thread Junio C Hamano
David Turner writes: > $ git init empty-1 > $ git init empty-2 > $ cd empty-1 > $ git fetch ../empty-2 > fatal: Couldn't find remote ref HEAD > fatal: The remote end hung up unexpectedly The current repository does not know anything about empty-2 repository. It does

Re: [PATCH] send-email: Add tocmd option to suppress-cc

2017-06-12 Thread Junio C Hamano
Junio C Hamano writes: > Viresh Kumar writes: > >> On 18-05-17, 17:05, Viresh Kumar wrote: >>> This adds tocmd option to suppress-cc command which already supports >>> cccmd and others. >>> >>> Signed-off-by: Viresh Kumar

Re: 'pu' broken at t5304 tonight

2017-06-12 Thread Brandon Williams
On 06/11, Christian Couder wrote: > On Sat, Jun 10, 2017 at 9:05 PM, Kevin Daudt wrote: > > On Sat, Jun 10, 2017 at 02:48:36PM +0200, Kevin Daudt wrote: > > >> For me, this bisects to the latest merge: > >> > >> 2047eebd3 (Merge branch 'bw/repo-object' into pu, 2017-06-10), but >

Re: Small issue with "add untracked" option of 'git add -i'

2017-06-12 Thread Junio C Hamano
Junio C Hamano writes: > After prompting to get the list of desired files, if the user chose > nothing, the message is shown. "No untracked files chosen." is > probably what the code wants to say, I would think. Together with your other wishes, perhaps something like this

Re: Small issue with "add untracked" option of 'git add -i'

2017-06-12 Thread Kaartic Sivaraam
On Mon, 2017-06-12 at 10:38 -0700, Junio C Hamano wrote: > After prompting to get the list of desired files, if the user chose > nothing, the message is shown.  "No untracked files chosen." is > probably what the code wants to say, I would think. > That does seem to be a more apt message to be

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 12, 2017 at 6:56 PM, Ulrich Mueller wrote: >> On Mon, 12 Jun 2017, Ęvar Arnfjörš Bjarmason wrote: > >> On Mon, Jun 12, 2017 at 5:12 PM, Junio C Hamano wrote: >>> René Scharfe writes: Yes, or you could look up a time zone

bug? fetching from empty unnamed remote repos

2017-06-12 Thread David Turner
$ git init empty-1 $ git init empty-2 $ cd empty-1 $ git fetch ../empty-2 fatal: Couldn't find remote ref HEAD fatal: The remote end hung up unexpectedly But: $ git init empty-1 $ git init empty-2 $ cd empty-1 $ git remote add other ../empty-2 $ git fetch other # this works I haven't spent a

Re: Small issue with "add untracked" option of 'git add -i'

2017-06-12 Thread Junio C Hamano
Kaartic Sivaraam writes: > * He chooses to use 'git add -i' to stage changes > * He chooses option 4, accidentally, instead of option 5. He is shown > the following menu, > >> *** Commands *** >>   1: status   2: update   3: revert   4: add >> untracked

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Jeff King
On Mon, Jun 12, 2017 at 06:58:13PM +0200, René Scharfe wrote: > > We could also simply replace "%Z" with the empty string, as the the > > POSIX strftime() documentation allows for: > > http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html > > ("Replaced by the timezone name or

Re: git push recurse.submodules behavior changed in 2.13

2017-06-12 Thread Stefan Beller
On Sat, Jun 10, 2017 at 6:28 AM, John Shahid wrote: > bump. it's been a while and I'm still not clear what the next steps > are. I'm happy to send a patch but I would like to get a consensus > first. What do you want a consensus on? (Is the change in 2.13 a bug or feature? I

Re: [PATCH] Fix KeyError "fileSize" in verbose mode

2017-06-12 Thread Junio C Hamano
Sergey Yurzin writes: > Subject: Re: [PATCH] Fix KeyError "fileSize" in verbose mode The convention around here is to think how a single change appears in "git shortlog --no-merges" output. The above commit title does not tell readers of "shortlog" what the change is about

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread René Scharfe
Am 12.06.2017 um 18:16 schrieb Ævar Arnfjörð Bjarmason: On Mon, Jun 12, 2017 at 5:12 PM, Junio C Hamano wrote: René Scharfe writes: Am 07.06.2017 um 10:17 schrieb Jeff King: On Sat, Jun 03, 2017 at 12:40:34PM +0200, René Scharfe wrote: Duplicates

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Ulrich Mueller
> On Mon, 12 Jun 2017, Ævar Arnfjörð Bjarmason wrote: > On Mon, Jun 12, 2017 at 5:12 PM, Junio C Hamano wrote: >> René Scharfe writes: >>> Yes, or you could look up a time zone name somewhere else -- except we >>> don't have a way to do that, at least for

Re: Feature Request: Show status of the stash in git status command

2017-06-12 Thread Junio C Hamano
liam Beguin writes: > +static int stash_count_refs(struct object_id *ooid, struct object_id *noid, > + const char *email, timestamp_t timestamp, int tz, > + const char *message, void *cb_data) > +{ > + int *c = cb_data; >

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 12, 2017 at 5:12 PM, Junio C Hamano wrote: > René Scharfe writes: > >> Am 07.06.2017 um 10:17 schrieb Jeff King: >>> On Sat, Jun 03, 2017 at 12:40:34PM +0200, René Scharfe wrote: Duplicates strbuf_expand to a certain extent, but not too badly, I

Re: [PATCH] send-email: Add tocmd option to suppress-cc

2017-06-12 Thread Junio C Hamano
Viresh Kumar writes: > On 18-05-17, 17:05, Viresh Kumar wrote: >> This adds tocmd option to suppress-cc command which already supports >> cccmd and others. >> >> Signed-off-by: Viresh Kumar >> --- >> Documentation/git-send-email.txt | 1 + >>

Re: [PATCH v2] doc: fix location of index in worktree scenatio

2017-06-12 Thread Junio C Hamano
Torsten Bögershausen writes: > Thanks for working on this (and keeping me in cc) > > The commit head line does not fully match my expactions: > "doc: fix location of index in worktree scenatio" > "doc:" is OK, but is the "location of index" fixed ? > Actually something that

Re: [PATCH v1] Configure Git contribution guidelines for github.com

2017-06-12 Thread Junio C Hamano
"Philip Oakley" writes: > From: "Lars Schneider" >> Many open source projects use github.com for their contribution process. >> Although we mirror the Git core repository to github.com [1] we do not >> use any other github.com service. This is

Re: Missing git-2.13.1.* files in the SHA256 sums

2017-06-12 Thread Junio C Hamano
Andrés Sicard-Ramírez writes: > The git-2.13.1.* files are missing in > > https://www.kernel.org/pub/software/scm/git/sha256sums.asc > > All the best, These checksum files are auto-generated as part of the mirroring infrastructure among the kernel.org servers, and those who

Re: [PATCH v2] t3200: add test for single parameter passed to -m option

2017-06-12 Thread Junio C Hamano
Sahil Dua writes: > Add a test for the case when only one parameter is passed to '-m' > (move/rename) option. > > For example - if 'git branch -m bbb' is run, it should rename the > currently checked out branch to bbb. There was no test for this > particular case with

Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

2017-06-12 Thread Junio C Hamano
René Scharfe writes: > Am 07.06.2017 um 10:17 schrieb Jeff King: >> On Sat, Jun 03, 2017 at 12:40:34PM +0200, René Scharfe wrote: >>> Duplicates strbuf_expand to a certain extent, but not too badly, I >>> think. Leaves the door open for letting strftime handle the local >>> case.

Small issue with "add untracked" option of 'git add -i'

2017-06-12 Thread Kaartic Sivaraam
Hello all, There seems to be a small issue with the output of the "add untracked" option of 'git add -i'. Consider the following scenario, * A user makes a change to a tracked file * His repo has a few untracked files which he has left it in that way intentionally * He chooses to use 'git add

Re: [PATCH v2] doc: fix location of index in worktree scenatio

2017-06-12 Thread Andreas Heiduk
Am 12.06.2017 um 12:03 schrieb Torsten Bögershausen: > Thanks for working on this (and keeping me in cc) > > The commit head line does not fully match my expactions: > "doc: fix location of index in worktree scenatio" > "doc:" is OK, but is the "location of index" fixed ? > Actually something

Re: [PATCH v2] doc: fix location of index in worktree scenatio

2017-06-12 Thread Torsten Bögershausen
Thanks for working on this (and keeping me in cc) The commit head line does not fully match my expactions: "doc: fix location of index in worktree scenatio" "doc:" is OK, but is the "location of index" fixed ? Actually something that includes the important stuff: "doc" "fix" "normalize the line

Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

2017-06-12 Thread Kaartic Sivaraam
On Sat, 2017-06-10 at 20:02 +0900, Junio C Hamano wrote: > Again, you said what I wanted to say in my review comment a lot > better than I managed to say ;-) > > When the current message "Initial commit" is read in the context > together with "Changes to be committed", etc., by users of "git >

[PATCH 0/1] Fix for mh/packed-ref-store-prep

2017-06-12 Thread Michael Haggerty
When preparing a new patch series, I noticed a bug that crept into mh/packed-ref-store-prep while I was shuffling patches around. It introduces a race condition if another process rewrites the `packed-refs` file just before we lock it. See the commit message for more information. This patch

[PATCH 1/1] lock_packed_refs(): fix cache validity check

2017-06-12 Thread Michael Haggerty
Commit 28ed9830b1 (get_packed_ref_cache(): assume "packed-refs" won't change while locked, 2017-05-22) assumes that the "packed-refs" file cannot change while we hold the lock. That assumption is justified *if* the lock has been held the whole time since the "packed-refs" file was last read. But

[PATCH] Fix KeyError "fileSize" in verbose mode

2017-06-12 Thread Sergey Yurzin
From: Sergei Iurzin --- git-p4.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/git-p4.py b/git-p4.py index 8d151da91b969..b3666eddf12e3 100755 --- a/git-p4.py +++ b/git-p4.py @@ -2523,8 +2523,11 @@ def streamOneP4File(self, file, contents):

Draft of Git Rev News edition 28

2017-06-12 Thread Christian Couder
Hi, A draft of a new Git Rev News edition is available here: https://github.com/git/git.github.io/blob/master/rev_news/drafts/edition-28.md Everyone is welcome to contribute in any section either by editing the above page on GitHub and sending a pull request, or by commenting on this GitHub