Re: [PATCH 3/3] abbrev: auto size the default abbreviation

2016-11-01 Thread Jeff King
On Tue, Nov 01, 2016 at 06:33:38PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, Sep 30, 2016 at 05:19:37PM -0700, Junio C Hamano wrote: > > > >> Introduce a mechanism, where we estimate the number of objects in > >> the repository upon the first request to

Re: [PATCH v1 05/19] update-index: warn in case of split-index incoherency

2016-11-01 Thread Junio C Hamano
Christian Couder writes: >>> Wrap this string and the one below with _() so they can be translated. >> >> True. >> >> I further wonder if a natural reaction from users after seeing this >> message is "I do want to--what else would I use that option to run >> you for?

Re: [PATCH 3/3] abbrev: auto size the default abbreviation

2016-11-01 Thread Junio C Hamano
Jeff King writes: > On Fri, Sep 30, 2016 at 05:19:37PM -0700, Junio C Hamano wrote: > >> Introduce a mechanism, where we estimate the number of objects in >> the repository upon the first request to abbreviate an object name >> with the default setting and come up with a sane

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Jacob Keller
On Tue, Nov 1, 2016 at 2:10 PM, Stefan Beller wrote: > On Tue, Nov 1, 2016 at 1:59 PM, Jeff King wrote: >> On Tue, Nov 01, 2016 at 01:56:34PM -0700, Junio C Hamano wrote: >> >>> > As of -rc0, we have both --indent-heuristic and --compaction-heuristic >>> >

should git-subtree ignore submodules?

2016-11-01 Thread Kirill Katsnelson
"git-subtree add" fails to add the subtree into a repository with submodules, reporting that the worktree is not clean, while `git status` says that everything is clean (including submodules). I tracked the problem down to the command "git index HEAD" returning all submodules as having the M

Re: [PATCH v1 05/19] update-index: warn in case of split-index incoherency

2016-11-01 Thread Christian Couder
On Tue, Nov 1, 2016 at 8:05 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >>> diff --git a/builtin/update-index.c b/builtin/update-index.c >>> index b75ea03..a14dbf2 100644 >>> --- a/builtin/update-index.c >>> +++ b/builtin/update-index.c >>> @@ -1098,12

Re: Submodules: two confusing situations

2016-11-01 Thread Stefan Beller
On Tue, Nov 1, 2016 at 3:13 PM, David Turner wrote: > Consider the following two cases: > > We have commit X and commit Y. X is an ancestor of Y. > > We're at X and doing get checkout Y -- or we're at Y and we're doing > git checkout X. > > Case 1: Between X and Y, we

Submodules: two confusing situations

2016-11-01 Thread David Turner
Consider the following two cases: We have commit X and commit Y. X is an ancestor of Y. We're at X and doing get checkout Y -- or we're at Y and we're doing git checkout X. Case 1: Between X and Y, we have deleted a submodule. In order to move from X to Y, git removes the submodule from the

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Junio C Hamano
Stefan Beller writes: >> -diff.indentHeuristic:: >> diff.compactionHeuristic:: >> Set one of these options to `true` to enable one of two >> experimental heuristics that shift diff hunk boundaries to > > We would need to reword this as well, as there will be

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Jeff King
On Tue, Nov 01, 2016 at 02:45:19PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > And here is _with_ renaming. I think "compaction heuristics" is a > > much better phrase to call "heuristics used during the diff hunk > > compaction process" without specifying

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Junio C Hamano
Junio C Hamano writes: > And here is _with_ renaming. I think "compaction heuristics" is a > much better phrase to call "heuristics used during the diff hunk > compaction process" without specifying how that heuristics work > (like taking hints in the indentation levels). If

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Stefan Beller
On Tue, Nov 1, 2016 at 2:38 PM, Junio C Hamano wrote: > > -diff.indentHeuristic:: > diff.compactionHeuristic:: > Set one of these options to `true` to enable one of two > experimental heuristics that shift diff hunk boundaries to We would need to reword this

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Junio C Hamano
Junio C Hamano writes: > If it involves renaming and swapping, however, we may be talking > about a change that we cannot deliver with confidence in less than a > week before -rc1, which sounds, eh, suboptimal. > > FWIW, here is how the removal of compaction without renaming

Re: [PATCH v2 1/5] trailer: be stricter in parsing separators

2016-11-01 Thread Junio C Hamano
Jonathan Tan writes: >>> Hmph. The optional whitespace is to allow for what kind of line? >>> >>> It is not for "Signed off by:" that is a misspelt "Signed-off-by:"; >>> it may not hurt but I do not think of a case that would be useful >>> offhand. > > This is to allow

Re: Git issue

2016-11-01 Thread Junio C Hamano
Jeff King writes: > On Tue, Nov 01, 2016 at 08:50:23PM -, Philip Oakley wrote: > >> > From "git help update-index": >> > >> > --[no-]assume-unchanged >> >When this flag is specified, the object names recorded for >> >the paths are not updated. Instead, this

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Stefan Beller
On Tue, Nov 1, 2016 at 1:59 PM, Jeff King wrote: > On Tue, Nov 01, 2016 at 01:56:34PM -0700, Junio C Hamano wrote: > >> > As of -rc0, we have both --indent-heuristic and --compaction-heuristic >> > (along with matching config), and they are mutually exclusive. >> > >> > In [1],

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Junio C Hamano
Jeff King writes: > We've already released a version with --compaction-heuristic, so we are > stuck keeping it forever either way. While I do not necessarily agree with this conclusion (we've already released it labelled as experimental; can't we freely take it away?), that may

[PATCH] doc: update-index --assume-unchanged

2016-11-01 Thread Philip Oakley
Be more assertive about the User promise, and Git's defensiveness of file changes. Signed-off-by: Philip Oakley --- Here is a full patch for https://public-inbox.org/git/7CE3166CFD244DAABF554451E8B0800F@PhilipOakley/ --- Documentation/git-update-index.txt | 22

Re: Git issue

2016-11-01 Thread Jeff King
On Tue, Nov 01, 2016 at 08:50:23PM -, Philip Oakley wrote: > > From "git help update-index": > > > > --[no-]assume-unchanged > >When this flag is specified, the object names recorded for > >the paths are not updated. Instead, this option sets/unsets > >the "assume unchanged"

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Jeff King
On Tue, Nov 01, 2016 at 01:56:34PM -0700, Junio C Hamano wrote: > > As of -rc0, we have both --indent-heuristic and --compaction-heuristic > > (along with matching config), and they are mutually exclusive. > > > > In [1], Stefan suggested just replacing the compaction heuristic > > entirely with

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Junio C Hamano
Jeff King writes: > On Mon, Oct 31, 2016 at 02:49:42PM -0700, Junio C Hamano wrote: > >> * Output from "git diff" can be made easier to read by selecting >>which lines are common and which lines are added/deleted >>intelligently when the lines before and after the changed

Re: [PATCH v2 1/5] trailer: be stricter in parsing separators

2016-11-01 Thread Jonathan Tan
On 11/01/2016 01:37 PM, Junio C Hamano wrote: Junio C Hamano writes: Jonathan Tan writes: Currently, a line is interpreted to be a trailer line if it contains a separator. Make parsing stricter by requiring the text on the left of the separator,

Re: Git issue

2016-11-01 Thread Philip Oakley
From: "Jeff King" On Tue, Nov 01, 2016 at 10:28:57AM +, Halde, Faiz wrote: I frequently use the following command to ignore changes done in a file git update-index --assume-unchanged somefile Now when I do a pull from my remote branch and say the file 'somefile' was

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Stefan Beller
> * "git clone --resurse-submodules --reference $path $URL" is a way to "recurse"

Re: [PATCH v2 1/5] trailer: be stricter in parsing separators

2016-11-01 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Tan writes: > >> Currently, a line is interpreted to be a trailer line if it contains a >> separator. Make parsing stricter by requiring the text on the left of >> the separator, if not the empty string, to be of the

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Jeff King
On Mon, Oct 31, 2016 at 02:49:42PM -0700, Junio C Hamano wrote: > * Output from "git diff" can be made easier to read by selecting >which lines are common and which lines are added/deleted >intelligently when the lines before and after the changed section >are the same. A command

Re: [PATCH v2 1/5] trailer: be stricter in parsing separators

2016-11-01 Thread Junio C Hamano
Jonathan Tan writes: > Currently, a line is interpreted to be a trailer line if it contains a > separator. Make parsing stricter by requiring the text on the left of > the separator, if not the empty string, to be of the " whitespace>" form. Hmph. The optional

Re: [PATCH v2 4/6] grep: optionally recurse into submodules

2016-11-01 Thread Brandon Williams
On 11/01, Stefan Beller wrote: > On Mon, Oct 31, 2016 at 3:38 PM, Brandon Williams wrote: > > > > > +--recurse-submodules:: > > + Recursively search in each submodule that has been initialized and > > + checked out in the repository. > > + > > and warn otherwise.

[PATCH v2 0/5] Make other git commands use trailer layout

2016-11-01 Thread Jonathan Tan
Thanks for all your comments. This patch set is now built off master (since jt/trailer-with-cruft is merged). I couldn't think of an easy way to clearly decide if a token with spaces should be considered a token, so I've tightened the restrictions. One benefit is that we no longer need to create

[PATCH v2 1/5] trailer: be stricter in parsing separators

2016-11-01 Thread Jonathan Tan
Currently, a line is interpreted to be a trailer line if it contains a separator. Make parsing stricter by requiring the text on the left of the separator, if not the empty string, to be of the "" form. (The find_separator function distinguishes the no-separator case from the

[PATCH v2 3/5] trailer: avoid unnecessary splitting on lines

2016-11-01 Thread Jonathan Tan
trailer.c currently splits lines while processing a buffer (and also rejoins lines when needing to invoke ignore_non_trailer). Avoid such line splitting, except when generating the strings corresponding to trailers (for ease of use by clients - a subsequent patch will allow other components to

[PATCH v2 4/5] trailer: have function to describe trailer layout

2016-11-01 Thread Jonathan Tan
Create a function that, taking a string, describes the position of its trailer block (if available) and the contents thereof, and make trailer use it. This makes it easier for other Git components, in the future, to interpret trailer blocks in the same way as trailer. In a subsequent patch,

[PATCH v2 2/5] commit: make ignore_non_trailer take buf/len

2016-11-01 Thread Jonathan Tan
Make ignore_non_trailer take a buf/len pair instead of struct strbuf. Signed-off-by: Jonathan Tan --- builtin/commit.c | 2 +- commit.c | 22 +++--- commit.h | 2 +- trailer.c| 2 +- 4 files changed, 14 insertions(+), 14

[PATCH v2 5/5] sequencer: use trailer's trailer layout

2016-11-01 Thread Jonathan Tan
Make sequencer use trailer.c's trailer layout definition, as opposed to parsing the footer by itself. This makes "commit -s", "cherry-pick -x", and "format-patch --signoff" consistent with trailer, allowing non-trailer lines and multiple-line trailers in trailer blocks under certain conditions,

Re: [PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-11-01 Thread Junio C Hamano
Christian Couder writes: > This function will be used in a following commit to get the expiration > time of the shared index files from the config, and it is generic > enough to be put in "config.c". Is it generic enough that a helper that sounds as if it can get any

Re: [PATCH v1 14/19] read-cache: touch shared index files when used

2016-11-01 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > wrote: >> @@ -2268,6 +2268,12 @@ int write_locked_index(struct index_state *istate, >> struct lock_file *lock, > > Doing this in read_index_from() would keep the shared file

Re: [PATCH v1 12/19] Documentation/config: add splitIndex.maxPercentChange

2016-11-01 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > Documentation/config.txt | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 96521a4..380eeb8

Re: [PATCH v1 11/19] t1700: add tests for splitIndex.maxPercentChange

2016-11-01 Thread Junio C Hamano
Christian Couder writes: > Signed-off-by: Christian Couder > --- > t/t1700-split-index.sh | 72 > ++ > 1 file changed, 72 insertions(+) > > diff --git a/t/t1700-split-index.sh

Re: [PATCH v1 09/19] config: add git_config_get_max_percent_split_change()

2016-11-01 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Oct 23, 2016 at 4:26 PM, Christian Couder > wrote: >> This new function will be used in a following commit to get the >> +int git_config_get_max_percent_split_change(void) >> +{ >> + int val = -1; >> + >> +

Re: [PATCH v1 05/19] update-index: warn in case of split-index incoherency

2016-11-01 Thread Junio C Hamano
Duy Nguyen writes: >> diff --git a/builtin/update-index.c b/builtin/update-index.c >> index b75ea03..a14dbf2 100644 >> --- a/builtin/update-index.c >> +++ b/builtin/update-index.c >> @@ -1098,12 +1098,21 @@ int cmd_update_index(int argc, const char **argv, >> const char

Re: Git issue

2016-11-01 Thread Junio C Hamano
Jeff King writes: > On Tue, Nov 01, 2016 at 10:28:57AM +, Halde, Faiz wrote: > >> I frequently use the following command to ignore changes done in a file >> >> git update-index --assume-unchanged somefile >> >> Now when I do a pull from my remote branch and say the file

Re: [PATCH 4/4] sequencer: use trailer's trailer layout

2016-11-01 Thread Junio C Hamano
Jonathan Tan writes: >>> 9:I want to mention about Signed-off-by: here. >> ... >> This seems a bit weird. > > This is because the "I want to mention" block has 100% trailer lines > (since its only line contains a colon). We could forbid spaces in > trailer field names,

Re: [ANNOUNCE] Git v2.10.2

2016-11-01 Thread Johannes Schindelin
Hi all, On Sat, 29 Oct 2016, Johannes Schindelin wrote: > On Fri, 28 Oct 2016, Junio C Hamano wrote: > > > The latest maintenance release Git v2.10.2 is now available at > > the usual places. > > The corresponding Git for Windows version will be hopefully out on > Tuesday:

Re: Git issue

2016-11-01 Thread Jeff King
On Tue, Nov 01, 2016 at 10:28:57AM +, Halde, Faiz wrote: > I frequently use the following command to ignore changes done in a file > > git update-index --assume-unchanged somefile > > Now when I do a pull from my remote branch and say the file 'somefile' > was changed locally and in remote,

Re: [PATCH 4/4] sequencer: use trailer's trailer layout

2016-11-01 Thread Jonathan Tan
On 10/31/2016 06:11 PM, Junio C Hamano wrote: Jonathan Tan writes: diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index ba4902d..635b394 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1277,8 +1277,7 @@ EOF 4:Subject: [PATCH]

Re: [PATCH v2 1/6] submodules: add helper functions to determine presence of submodules

2016-11-01 Thread Stefan Beller
On Tue, Nov 1, 2016 at 10:20 AM, Junio C Hamano wrote: > > Maybe I am old fashioned, but I'd feel better to see these with > explicit "extern" in front (check the older header files like > cache.h when you are in doubt what the project convention has been). I did check the

Re: [PATCH v2 3/6] grep: add submodules as a grep source type

2016-11-01 Thread Junio C Hamano
Brandon Williams writes: > Add `GREP_SOURCE_SUBMODULE` as a grep_source type and cases for this new > type in the various switch statements in grep.c. > > When initializing a grep_source with type `GREP_SOURCE_SUBMODULE` the > identifier can either be NULL (to indicate that

Re: [PATCH v2 4/6] grep: optionally recurse into submodules

2016-11-01 Thread Stefan Beller
On Mon, Oct 31, 2016 at 3:38 PM, Brandon Williams wrote: > > +--recurse-submodules:: > + Recursively search in each submodule that has been initialized and > + checked out in the repository. > + and warn otherwise. > + > + /* > +* Limit number of

Re: [PATCH v2 1/6] submodules: add helper functions to determine presence of submodules

2016-11-01 Thread Brandon Williams
On 11/01, Junio C Hamano wrote: > Stefan Beller writes: > > Overall the suggestions from you in this review is good and please > consider anything I did not mention I agree with you. Thanks. > > >> +extern int is_submodule_initialized(const char *path); > >> +extern int

Re: [PATCH v2 1/6] submodules: add helper functions to determine presence of submodules

2016-11-01 Thread Brandon Williams
On 10/31, Stefan Beller wrote: > On Mon, Oct 31, 2016 at 3:38 PM, Brandon Williams wrote: > > +int is_submodule_checked_out(const char *path) > > +{ > > + int ret = 0; > > + struct strbuf buf = STRBUF_INIT; > > + > > + strbuf_addf(, "%s/.git", path); > > +

Re: [PATCH v2 1/6] submodules: add helper functions to determine presence of submodules

2016-11-01 Thread Junio C Hamano
Stefan Beller writes: Overall the suggestions from you in this review is good and please consider anything I did not mention I agree with you. Thanks. >> +extern int is_submodule_initialized(const char *path); >> +extern int is_submodule_checked_out(const char *path); > >

Re: [PATCH v2 3/6] grep: add submodules as a grep source type

2016-11-01 Thread Stefan Beller
On Mon, Oct 31, 2016 at 3:38 PM, Brandon Williams wrote: > Add `GREP_SOURCE_SUBMODULE` as a grep_source type and cases for this new > type in the various switch statements in grep.c. > > When initializing a grep_source with type `GREP_SOURCE_SUBMODULE` the > identifier can

Re: [PATCH v2 2/6] submodules: load gitmodules file from commit sha1

2016-11-01 Thread Stefan Beller
On Mon, Oct 31, 2016 at 3:38 PM, Brandon Williams wrote: > Teach submodules to load a '.gitmodules' file from a commit sha1. This > enables the population of the submodule_cache to be based on the state > of the '.gitmodules' file from a particular commit. > > Signed-off-by:

Re: [PATCH] sha1_name: make wraparound of the index into ring-buffer explicit

2016-11-01 Thread Jeff King
On Tue, Nov 01, 2016 at 09:49:07AM +0100, René Scharfe wrote: > Overflow is defined for unsigned integers, but not for signed ones. > Wrap around explicitly for the new ring-buffer in find_unique_abbrev() > as we did in bb84735c for the ones in sha1_to_hex() and get_pathname(), > thus avoiding

[L10N] Kickoff of translation for Git 2.11.0 round 1

2016-11-01 Thread Jiang Xin
Hi, Git v2.11.0-rc0 has been released, and it's time to start new round of git l10n. This time there are 209 updated messages need to be translated since last update: l10n: git.pot: v2.11.0 round 1 (209 new, 53 removed) Generate po/git.pot from v2.11.0-rc0 for git v2.11.0 l10n round 1.

Git issue

2016-11-01 Thread Halde, Faiz
Hello Git Not sure if this is a feature or a bug, but here it is. I frequently use the following command to ignore changes done in a file git update-index --assume-unchanged somefile Now when I do a pull from my remote branch and say the file 'somefile' was changed locally and in remote, git

Re: [PATCH v2 2/2] convert.c: stream and fast search for binary

2016-11-01 Thread Torsten Bögershausen
[] > This probably should be done as four more patches to become > reviewable. > > - One to use the CONVERT_STAT_BITS a lot more for the conversion >decision than before, > > - another to allow the caller to tell gather_stats() to give up >early with the "search_only" bits, > > -

Re: [ANNOUNCE] Git v2.11.0-rc0

2016-11-01 Thread Patrick Steinhardt
Hi Junio, On Mon, Oct 31, 2016 at 02:49:42PM -0700, Junio C Hamano wrote: [snip] > * In some projects, it is common to use "[RFC PATCH]" as the subject >prefix for a patch meant for discussion rather than application. A >new option "--rfc" was a short-hand for "--subject-prefix=RFC

[PATCH] sha1_name: make wraparound of the index into ring-buffer explicit

2016-11-01 Thread René Scharfe
Overflow is defined for unsigned integers, but not for signed ones. Wrap around explicitly for the new ring-buffer in find_unique_abbrev() as we did in bb84735c for the ones in sha1_to_hex() and get_pathname(), thus avoiding signed overflows and getting rid of the magic number 3. Signed-off-by:

[PATCH RESEND] cocci: avoid self-references in object_id transformations

2016-11-01 Thread René Scharfe
The object_id functions oid_to_hex, oid_to_hex_r, oidclr, oidcmp, and oidcpy are defined as wrappers of their legacy counterparts sha1_to_hex, sha1_to_hex_r, hashclr, hashcmp, and hashcpy, respectively. Make sure that the Coccinelle transformations for converting legacy function calls are not