Re: [PATCH] small memory leak fix

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 01:50:57PM -0700, Stefan Beller wrote: > > diff --git a/remote.c b/remote.c > > index 9f83fe2c4..2f8cb35a3 100644 > > --- a/remote.c > > +++ b/remote.c > > @@ -742,6 +742,8 @@ int for_each_remote(each_remote_fn fn, void *priv) > > r->push =

Re: [PATCH v2 09/53] builtin/rev-parse: convert to struct object_id

2017-05-01 Thread Jonathan Tan
On 04/30/2017 07:29 PM, brian m. carlson wrote: @@ -340,7 +340,7 @@ static int try_parent_shorthands(const char *arg) } if (include_rev) - show_rev(NORMAL, sha1, arg); + show_rev(NORMAL, , arg); for (parents = commit->parents, parent_number =

Re: [PATCH v2 11/53] fast-import: convert to struct object_id

2017-05-01 Thread Jonathan Tan
On 04/30/2017 07:29 PM, brian m. carlson wrote: @@ -391,10 +391,8 @@ static void write_branch_report(FILE *rpt, struct branch *b) fputc('\n', rpt); fprintf(rpt, " tip commit : %s\n", oid_to_hex(>oid)); - fprintf(rpt, " old tree: %s\n", -

Re: [PATCH v2 53/53] object: convert parse_object* to take struct object_id

2017-05-01 Thread Jonathan Tan
On 04/30/2017 07:29 PM, brian m. carlson wrote: Make parse_object, parse_object_or_die, and parse_object_buffer take a pointer to struct object_id. Remove the temporary variables inserted earlier, since they are no longer necessary. Transform all of the callers using the following semantic

Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-01 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> * ab/grep-pcre-v2 (2017-04-25) 20 commits >> - SQUASH??? >> - Makefile & configure: make PCRE v2 the default PCRE implementation >> - grep: remove support for concurrent use of both PCRE v1 & v2 >> - grep: add support for PCRE v2 >> -

Re: [PATCHv3 3/4] diff: enable indent heuristic by default

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 06:13:44PM -0400, Marc Branchaud wrote: > From: Stefan Beller > > The feature was included in v2.11 (released 2016-11-29) and we got no > negative feedback. Quite the opposite, all feedback we got was positive. > > Turn it on by default. Users who

Re: [PATCH] credential doc: make multiple-helper behavior more prominent (Re: [PATCH] clone: handle empty config values in -c)

2017-05-01 Thread Jonathan Nieder
Starting out the reviews: Jonathan Nieder wrote: [...] > configuration item to empty before giving it a new value. This is > already documented by the documentation is hard to find --- ^^ s/by/but/ Sorry for the confusion. [...] > +++ b/Documentation/gitcredentials.txt

[PATCH v2 6/6] submodule: refactor logic to determine changed submodules

2017-05-01 Thread Brandon Williams
There are currently two instances (fetch and push) where we want to determine if submodules have changed given some revision specification. These two instances don't use the same logic to generate a list of changed submodules and as a result there is a fair amount of code duplication. This patch

[PATCH v2 4/6] submodule: change string_list changed_submodule_paths

2017-05-01 Thread Brandon Williams
Eliminate a call to 'xstrdup()' by changing the string_list 'changed_submodule_paths' to duplicated strings added to it. Change-Id: Id4b53837a6e209c0c0837c9f5ba06c70df2ffe06 Signed-off-by: Brandon Williams --- submodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: git loses a commit after reordering.

2017-05-01 Thread Junio C Hamano
Nikita Orlov writes: >>On Sun, 30 Apr 2017, 1:56 +03:00 from Kevin Daudt : >>Not sure if this is the case here, but it at least confirms that rebase >>--preserve-merges was not meant to reorder commits. >> >>See [this][1] thread for more background on this

Re: [PATCH] credential doc: make multiple-helper behavior more prominent (Re: [PATCH] clone: handle empty config values in -c)

2017-05-01 Thread Brandon Williams
On 05/01, Jonathan Nieder wrote: > Subject: credential doc: make multiple-helper behavior more prominent > > Git's configuration system works by reading multiple configuration > files in order, from general to specific: > > - first, the system configuration /etc/gitconfig > - then the user's

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-05-01 Thread Junio C Hamano
Samuel Lijin writes: > After some more digging (and familiarizing myself with the > behind-the-scenes logic) the issue is that dir.c has this implicit > assumption that a directory which contains only untracked and ignored > files should itself be considered untracked. While

Re: Proposal for missing blob support in Git repos

2017-05-01 Thread Jonathan Tan
On 05/01/2017 04:29 PM, Junio C Hamano wrote: Jonathan Tan writes: Thanks for your comments. If you're referring to the codepath involving write_sha1_file() (for example, builtin/hash-object -> index_fd or builtin/unpack-objects), that is fine because

Re: [RFC] [GSoC] Port git-add--interactive.perl:status_cmd to C

2017-05-01 Thread Junio C Hamano
"Daniel Ferreira (theiostream)" writes: > Reproducing either of these comparisons "natively" would simply > require running run_diff_index() or run_diff_files() with > DIFF_FORMAT_NUMSTAT and tweaking diff_flush() to format appropriately > for the "interactive--add case". A

Re: Proposal for missing blob support in Git repos

2017-05-01 Thread Brandon Williams
On 05/01, Jonathan Tan wrote: > On 05/01/2017 04:29 PM, Junio C Hamano wrote: > >Jonathan Tan writes: > > > >>Thanks for your comments. If you're referring to the codepath > >>involving write_sha1_file() (for example, builtin/hash-object -> > >>index_fd or

Re: [PATCH v2 1/6] submodule: rename add_sha1_to_array

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote: > Change-Id: Ia6d15f34cee4d0dc32f7a475c69f4cb3aa8ce5bf Uh? Maybe another side project for the long todo list: get git-trailers into shape, such that it can be configured to yell at you upon formatting the patch or

Re: [PATCH 0/5] Some submodule bugfixes and "reattaching detached HEADs"

2017-05-01 Thread Junio C Hamano
Brandon Williams writes: > I don't know why submodules were originally designed to be in a > detached HEAD state but I much prefer working on branches (as I'm sure > many other developers do) so the prospect of this becoming the norm is > exciting! :D The reason is because

Re: [PATCH v2 5/6] submodule: improve submodule_has_commits

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote: > Teach 'submodule_has_commits()' to ensure that if a commit exists in a > submodule, that it is also reachable from a ref. > > This is a preparatory step prior to merging the logic which checks for > changed submodules

Re: Proposal for missing blob support in Git repos

2017-05-01 Thread Junio C Hamano
Jonathan Tan writes: > On 05/01/2017 04:29 PM, Junio C Hamano wrote: >> Jonathan Tan writes: >> >>> Thanks for your comments. If you're referring to the codepath >>> involving write_sha1_file() (for example, builtin/hash-object -> >>> index_fd

Re: [PATCH v2] send-email: new options to walkaround email server limits

2017-05-01 Thread Junio C Hamano
xiaoqiang zhao writes: > Some email server(e.g. smtp.163.com) limits a fixed number emails to > be send per session(connection) and this will lead to a send faliure. > > With --batch-size= option, an auto reconnection will occur when > number of sent email reaches and the

Re: [PATCH] clone: handle empty config values in -c

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 05:05:15PM -0700, Jonathan Nieder wrote: > "git clone --config" uses the following incantation to add an item to > a config file, instead of replacing an existing value: > > git_config_set_multivar_gently(key, value, "^$", 0) > > As long as no existing value

Re: [PATCH] credential doc: make multiple-helper behavior more prominent (Re: [PATCH] clone: handle empty config values in -c)

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 05:21:14PM -0700, Jonathan Nieder wrote: > Subject: credential doc: make multiple-helper behavior more prominent > > Git's configuration system works by reading multiple configuration > files in order, from general to specific: > > - first, the system configuration

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-01 Thread Junio C Hamano
Stefan Beller writes: > This applies to origin/master. > > For better readability and understandability for newcomers it is a good idea > to not offer 2 APIs doing the same thing with on being the #define of the > other. > > In the long run we may want to drop the macros

Re: [PATCH 2/5] submodule_move_head: prepare env for child correctly

2017-05-01 Thread Junio C Hamano
Stefan Beller writes: > We forgot to prepare the submodule env, which is only a problem for > nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules > with nested submodules, 2017-04-13) for further explanation. > > Signed-off-by: Stefan Beller

Re: [PATCH 1/5] submodule_move_head: fix leak of struct child_process

2017-05-01 Thread Junio C Hamano
Brandon Williams writes: > On 05/01, Stefan Beller wrote: >> While fixing the leak of `cp`, reuse it instead of having to declare >> another struct child_process. >> >> Signed-off-by: Stefan Beller > > This shouldn't be needed as 'finish_command' does the

Re: [PATCH] credential doc: make multiple-helper behavior more prominent (Re: [PATCH] clone: handle empty config values in -c)

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 05:30:10PM -0700, Jonathan Nieder wrote: > > @@ -162,6 +152,16 @@ helper:: > > shell (so, for example, setting this to `foo --option=bar` will execute > > `git credential-foo --option=bar` via the shell. See the manual of > > specific helpers for examples of

Re: [PATCH v3 1/9] rebase -i: generate the script via rebase--helper

2017-05-01 Thread Phillip Wood
On 28/04/17 20:22, Johannes Schindelin wrote: > Hi Philip, > > On Fri, 28 Apr 2017, Phillip Wood wrote: > >> On 26/04/17 12:59, Johannes Schindelin wrote: >> >>> The first step of an interactive rebase is to generate the so-called >>> "todo script", to be stored in the state directory as >>>

Re: [PATCH v3 1/9] rebase -i: generate the script via rebase--helper

2017-05-01 Thread Johannes Schindelin
Hi Junio, On Sun, 30 Apr 2017, Junio C Hamano wrote: > Phillip Wood writes: > > > This changes the behaviour of > > git -c rebase.instructionFormat= rebase -i > > The shell version treats the rebase.instructionFormat being unset or set > > to the empty string as

Re: [PATCH] t7400: add BSLASHPSPEC prerequisite to 'add with \\ in path'

2017-05-01 Thread Johannes Schindelin
Hi Ramsay, On Sun, 30 Apr 2017, Ramsay Jones wrote: > On 29/04/17 11:44, Johannes Schindelin wrote: > > > On Sat, 29 Apr 2017, Johannes Sixt wrote: > >> Am 29.04.2017 um 02:15 schrieb Ramsay Jones: > >>> On 28/04/17 20:54, Johannes Sixt wrote: > Am 28.04.2017 um 05:09 schrieb Junio C

Re: [PATCH] cache-tree: reject entries with null sha1

2017-05-01 Thread René Scharfe
Am 24.04.2017 um 12:39 schrieb Duy Nguyen: BTW, I ran t7009 with valgrind and it reported this. Is it something we should be worried about? I vaguely recall you're doing something with prio-queue... ==4246== Source and destination overlap in memcpy(0x5952990, 0x5952990, 16) ==4246==at

Re: Automating Coverity, was Re: [PATCH 00/26] Address a couple of issues identified by Coverity

2017-05-01 Thread Lars Schneider
> On 28 Apr 2017, at 22:29, Johannes Schindelin > wrote: > > Hi Stefan, > > On Fri, 28 Apr 2017, Stefan Beller wrote: > >> On Thu, Apr 27, 2017 at 3:50 PM, Johannes Schindelin >> wrote: >> >>> I still have to find the time to figure

Re: [PATCH] send-email: new option to walkaround email server limits

2017-05-01 Thread 赵小强
Thanks for your reply , Junio ! > 在 2017年5月1日,09:54,Junio C Hamano 写道: > > here. We need to find a better name for the option. Perhaps > "--batch-size=", "--max-messages-per-connection=" or > something? > --batch-size is ok with me > - The code seems to do the

Re: [PATCH 0/2] Make diff plumbing commands respect the indentHeuristic.

2017-05-01 Thread Ævar Arnfjörð Bjarmason
On Sat, Apr 29, 2017 at 12:04 AM, Jeff King wrote: > On Fri, Apr 28, 2017 at 10:34:15AM -0700, Stefan Beller wrote: > >> > So instead I chose to make the indentHeuristic option part of diff's basic >> > configuration, and in each of the diff plumbing commands I moved the call >> >

Re: [PATCH v3 0/5] archive-zip: support files and archives bigger than 4GB

2017-05-01 Thread René Scharfe
Am 01.05.2017 um 01:49 schrieb Junio C Hamano: René Scharfe writes: Am 30.04.2017 um 18:32 schrieb Johannes Sixt: Am 30.04.2017 um 09:53 schrieb René Scharfe: @@ -178,7 +182,8 @@ test_expect_success EXPENSIVE,UNZIP 'zip archive bigger than 4GB' ' "$GIT_UNZIP" -t

Re: [PATCH] i18n: remove i18n from tag reflog message

2017-05-01 Thread Ævar Arnfjörð Bjarmason
On Sat, Apr 29, 2017 at 12:02 PM, Jean-Noel Avila wrote: > The building of the reflog message is using strbuf, which is not > friendly with internationalization frameworks. No other reflog > messages are translated right now and switching all the messages to > i18n would require

[RFC PATCH 5/5] submodule_move_head: reattach submodule HEAD to branch if possible.

2017-05-01 Thread Stefan Beller
Side note: We also want to call this from git submodule update Signed-off-by: Stefan Beller --- submodule.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/submodule.c b/submodule.c index 4e74e38829..66651ffa34 100644 --- a/submodule.c +++ b/submodule.c @@ -1483,6

[PATCH 3/5] submodule: avoid auto-discovery in new working tree manipulator code

2017-05-01 Thread Stefan Beller
All commands that are run in a submodule, are run in a correct setup, there is no need to prepare the environment without setting the GIT_DIR variable. By setting the GIT_DIR variable we fix issues as discussed in 10f5c52656 (submodule: avoid auto-discovery in prepare_submodule_repo_env(),

[PATCH 1/5] submodule_move_head: fix leak of struct child_process

2017-05-01 Thread Stefan Beller
While fixing the leak of `cp`, reuse it instead of having to declare another struct child_process. Signed-off-by: Stefan Beller --- submodule.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/submodule.c b/submodule.c index

[RFC PATCH 4/5] submodule--helper: reattach-HEAD

2017-05-01 Thread Stefan Beller
Add a new command, that reattaches a detached HEAD to its configured branch in a submodule. In a later patch we will teach git-submodule as well as other submodule worktree manipulators (git reset/checkout --recurse-submodules) to not end up in a detached HEAD state in the submodules.

[PATCH 2/5] submodule_move_head: prepare env for child correctly

2017-05-01 Thread Stefan Beller
We forgot to prepare the submodule env, which is only a problem for nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules with nested submodules, 2017-04-13) for further explanation. Signed-off-by: Stefan Beller --- submodule.c | 1 + 1 file changed, 1

Re: [PATCH 0/5] Some submodule bugfixes and "reattaching detached HEADs"

2017-05-01 Thread Brandon Williams
On 05/01, Stefan Beller wrote: > The first three patches fix bugs in existing submodule code, > sort of independent from the last 2 patches, which are RFCs. > > > > In submodules as of today you always end up with a detached HEAD, > which may be scary to people used to working on branches. (I

[PATCH 1/5] cache.h: drop read_cache()

2017-05-01 Thread Stefan Beller
This patch is produced via coccinelle using this semantic patch: @@ @@ -read_cache() +read_index(_index) Additional manual editing: * drop define in cache.h * a comment in builtin/check-ignore.c and read-cache.c were converted * builtin/diff.c: fix error message referencing the function.

[PATCH 2/5] cache.h: drop active_* macros

2017-05-01 Thread Stefan Beller
Based on the coccinelle patch: @@ @@ -active_cache +the_index.cache @@ @@ -active_nr +the_index.cache_nr @@ @@ -active_alloc +the_index.cache_alloc @@ @@ -active_cache_changed +the_index.cache_changed @@ @@ -active_cache_tree +the_index.cache_tree Additional manual editing: * drop the macros

[PATCH 4/5] cache.h: drop read_cache_preload(pathspec)

2017-05-01 Thread Stefan Beller
coccinelle patch: @@ expression E; @@ -read_cache_preload(E) +read_index_preload(_index, E) Additionally manual editing: * drop the define from cache.h. * builtin/{commit,describe}.c were not picked up as we have NULL and the address of an expression. Converted them manually. *

[PATCH 5/5] cache.h: drop read_cache_unmerged()

2017-05-01 Thread Stefan Beller
@@ @@ -read_cache_unmerged() +read_index_unmerged(_index) Additionally drop the define from cache.h manually. Signed-off-by: Stefan Beller --- builtin/am.c| 2 +- builtin/merge.c | 2 +- builtin/pull.c | 2 +- builtin/read-tree.c | 2 +- builtin/reset.c

Re: [RFC PATCH 4/5] submodule--helper: reattach-HEAD

2017-05-01 Thread Brandon Williams
On 05/01, Stefan Beller wrote: > Add a new command, that reattaches a detached HEAD to its configured > branch in a submodule. > > In a later patch we will teach git-submodule as well as other submodule > worktree manipulators (git reset/checkout --recurse-submodules) to not > end up in a

[PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-01 Thread Stefan Beller
This applies to origin/master. For better readability and understandability for newcomers it is a good idea to not offer 2 APIs doing the same thing with on being the #define of the other. In the long run we may want to drop the macros guarded by NO_THE_INDEX_COMPATIBILITY_MACROS. This converts

[PATCH 3/5] cache.h: drop read_cache_from

2017-05-01 Thread Stefan Beller
coccinelle patch: @@ expression E; @@ -read_cache_from(E) +read_index_from(_index, E) additionally drop the define from cache.h manually Signed-off-by: Stefan Beller --- apply.c | 2 +- builtin/am.c | 4 ++-- builtin/commit.c | 6 +++--- cache.h | 1 -

Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-01 Thread Ævar Arnfjörð Bjarmason
On Mon, May 1, 2017 at 6:21 PM, Brandon Williams wrote: > On 05/01, Ęvar Arnfjörš Bjarmason wrote: >> On Mon, May 1, 2017 at 7:35 AM, Junio C Hamano wrote: >> > * ab/clone-no-tags (2017-05-01) 3 commits >> > (merged to 'next' on 2017-04-30 at 601649896a)

[PATCH 0/5] Some submodule bugfixes and "reattaching detached HEADs"

2017-05-01 Thread Stefan Beller
The first three patches fix bugs in existing submodule code, sort of independent from the last 2 patches, which are RFCs. In submodules as of today you always end up with a detached HEAD, which may be scary to people used to working on branches. (I myself enjoy working with a detached HEAD).

Re: Terrible bad performance for it blame --date=iso -C -C master --

2017-05-01 Thread Samuel Lijin
On Fri, Mar 31, 2017 at 10:52 AM, Junio C Hamano wrote: > "Ulrich Windl" writes: > >> I was running "vc-annotate" in Emacs for a file from a large >> repository (>4 files, a big percentage being binary, about 10 >> commits). For the first

Re: [PATCH 1/5] submodule_move_head: fix leak of struct child_process

2017-05-01 Thread Brandon Williams
On 05/01, Stefan Beller wrote: > While fixing the leak of `cp`, reuse it instead of having to declare > another struct child_process. > > Signed-off-by: Stefan Beller This shouldn't be needed as 'finish_command' does the cleanup for you by calling 'child_prcoess_clear()'.

Re: [RFC PATCH 4/5] submodule--helper: reattach-HEAD

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 11:36 AM, Brandon Williams wrote: > if (flags & REATTACH_HEAD_DIE_ON_ERROR) > die(...); > > return -1; > > It just feels weird to me to have the inverted logic, that's my opinion > though. Yeah, me too. But my feelings were not as important as

Re: [PATCH 07/26] http-backend: avoid memory leaks

2017-05-01 Thread Johannes Schindelin
Hi Junio, On Sun, 30 Apr 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> Hmph. I find a "leak" of a resource acquired inside the main > >> function and not released when the main function leaves a lot less > >> interesting than the other ones this

Re: Proposal for missing blob support in Git repos

2017-05-01 Thread Jonathan Tan
On 04/30/2017 08:57 PM, Junio C Hamano wrote: One thing I wonder is what the performance impact of a change like this to the codepath that wants to see if an object does _not_ exist in the repository. When creating a new object by hashing raw data, we see if an object with the same name already

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-05-01 Thread Brandon Williams
On 05/01, Stefan Beller wrote: > On Sun, Apr 30, 2017 at 4:14 PM, Brandon Williams wrote: > > > This hunk of logic is essentially a copy and paste from elsewhere in the > > file. Essentially both code paths were essentially doing the same thing > > (checking if a submodule

Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-01 Thread Brandon Williams
On 05/01, Ævar Arnfjörð Bjarmason wrote: > On Mon, May 1, 2017 at 7:35 AM, Junio C Hamano wrote: > > * ab/clone-no-tags (2017-05-01) 3 commits > > (merged to 'next' on 2017-04-30 at 601649896a) > > + tests: rename a test having to do with shallow submodules > > + clone: add

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-05-01 Thread Stefan Beller
On Sun, Apr 30, 2017 at 4:14 PM, Brandon Williams wrote: > This hunk of logic is essentially a copy and paste from elsewhere in the > file. Essentially both code paths were essentially doing the same thing > (checking if a submodule has a commit) but one of the code paths

Re: [PATCH 4/6] submodule: change string_list changed_submodule_paths

2017-05-01 Thread Brandon Williams
On 04/30, Junio C Hamano wrote: > Brandon Williams writes: > > > Eliminate a call to 'xstrdup()' by changing the string_list > > 'changed_submodule_paths' to duplicated strings added to it. > > > > Signed-off-by: Brandon Williams > > --- > > submodule.c |

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-05-01 Thread Brandon Williams
On 04/30, Junio C Hamano wrote: > Brandon Williams writes: > > > oid_array_for_each_unique(commits, check_has_commit, _commit); > > + > > + if (has_commit) { > > + /* > > +* Even if the submodule is checked out and the commit is > > +*

Re[2]: git loses a commit after reordering.

2017-05-01 Thread Nikita Orlov
>On Sun, 30 Apr 2017, 1:56 +03:00 from Kevin Daudt : >Not sure if this is the case here, but it at least confirms that rebase >--preserve-merges was not meant to reorder commits. > >See [this][1] thread for more background on this limitation. > >[0]:

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-05-01 Thread Samuel Lijin
After some more digging (and familiarizing myself with the behind-the-scenes logic) the issue is that dir.c has this implicit assumption that a directory which contains only untracked and ignored files should itself be considered untracked. While that works fine for use cases where we're asking if

Re: [PATCH 6/6] submodule: refactor logic to determine changed submodules

2017-05-01 Thread Brandon Williams
On 04/28, Stefan Beller wrote: > + Heiko, who touched the pushing code end of last year. > > On Fri, Apr 28, 2017 at 4:54 PM, Brandon Williams wrote: > > There are currently two instances (fetch and push) where we want to > > determine if submodules have changed given some

Re: Bug: Git rename does not work if folder naming was changed from lower to upper case on OSX

2017-05-01 Thread Kevin Daudt
On Sun, Apr 30, 2017 at 06:47:29PM -0700, Junio C Hamano wrote: > Kevin Daudt writes: > > > Note that git does not store that files are renamed. So a remove + add > > is the same as a rename in git. Only git status shows it when you for > > example use git mv directly, but this

Re: [PATCH v3 1/9] rebase -i: generate the script via rebase--helper

2017-05-01 Thread Johannes Schindelin
Hi Phillip, On Mon, 1 May 2017, Phillip Wood wrote: > On 28/04/17 20:22, Johannes Schindelin wrote: > > > BTW in the future you could help me a *lot* by providing a patch that > > adds a test case to our test suite that not only demonstrates what > > exactly goes wrong, but also will help

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-05-01 Thread Samuel Lijin
On Sun, Apr 30, 2017 at 8:56 PM, Chris Johnson wrote: > Good assessment/understanding of the issue. git clean -n does not > report anything as being targeted for removal, and git clean -f > matches that behavior. I agree with it probably being related > specifically to

Re: [PATCH v1] travis-ci: retry if Git for Windows CI returns HTTP error 502 or 503

2017-05-01 Thread Lars Schneider
> On 29 Apr 2017, at 20:48, Lars Schneider wrote: > > The Git for Windows CI web app sometimes returns HTTP errors of > "502 bad gateway" or "503 service unavailable" [1]. Wait a little and > retry the request if this happens. > > [1] >

Re: [PATCH v2] l10n: de.po: update German translation

2017-05-01 Thread Simon Ruderich
On Sun, Apr 30, 2017 at 09:11:49PM +0200, Ralf Thielow wrote: > #: config.c:1952 > #, c-format > msgid "unknown core.untrackedCache value '%s'; using 'keep' default value" > -msgstr "" > +msgstr "Unbekannter Wert '%s' in core.untrackedCache; benutze Stardardwert > 'keep'"

Re: Bug: wrong documentation for git-fast-import's option command

2017-05-01 Thread Tomi Belan
On Sun, Apr 30, 2017 at 12:21 PM, Andreas Schwab wrote: > Unless starts with 'git', as you have seen. Other importers > may recognize other options, eg 'option hg ...'. Hmm? Are you disagreeing with how I described the issue, or saying there is no issue at all? I'm not

Re: [PATCH v2] send-email: new options to walkaround email server limits

2017-05-01 Thread Jan Viktorin
Hello, thank you for posting this improvement. I've been missing such feature in git. I hope to test it soon. Jan Viktorin RehiveTech Sent from a mobile device   Původní zpráva   Od: xiaoqiang zhao Odesláno: pondělí, 1. května 2017 15:00 Komu: git@vger.kernel.org Kopie: gits...@pobox.com;

Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-01 Thread Ævar Arnfjörð Bjarmason
On Mon, May 1, 2017 at 7:35 AM, Junio C Hamano wrote: > * ab/clone-no-tags (2017-05-01) 3 commits > (merged to 'next' on 2017-04-30 at 601649896a) > + tests: rename a test having to do with shallow submodules > + clone: add a --no-tags option to clone without tags > +

Re: [PATCH v3 1/9] rebase -i: generate the script via rebase--helper

2017-05-01 Thread Johannes Schindelin
Hi Junio, On Sun, 30 Apr 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > In that case, I would strongly advise to consider redesigning the API. > > The API we currently have and is used by "log", "rev-list" and friends > is to have setup_revisions()

Re: [PATCH] cache-tree: reject entries with null sha1

2017-05-01 Thread René Scharfe
Am 01.05.2017 um 13:23 schrieb René Scharfe: But I can't get Valgrind to report overlapping (nicely explained in http://valgrind.org/docs/manual/mc-manual.html#mc-manual.overlap, by the way), not for t7009 and not for the short test program at the bottom. Do you set flags in

[PATCH v2] send-email: new options to walkaround email server limits

2017-05-01 Thread xiaoqiang zhao
Some email server(e.g. smtp.163.com) limits a fixed number emails to be send per session(connection) and this will lead to a send faliure. With --batch-size= option, an auto reconnection will occur when number of sent email reaches and the problem is solved. --relogin-delay option will make

[PATCH] small memory leak fix

2017-05-01 Thread David CARLIER
Hi this is my first submission, a memory leak found in the maint branch (might be in master as well). Kind regards. 0001-memory-leaks-fixes-for-remote-lists.patch Description: Binary data

Re: [PATCH] small memory leak fix

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 1:40 PM, David CARLIER wrote: > Hi this is my first submission, a memory leak found in the maint branch > (might be in master as well). > > Kind regards. Hi and welcome to Git! > From d98f3944780730447f111a4178c9d99f5110c260 Mon Sep 17 00:00:00 2001 >

Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 04:25:14PM +0200, Ævar Arnfjörð Bjarmason wrote: > > * ab/grep-pcre-v2 (2017-04-25) 20 commits > [...] > > * ab/grep-threading-cleanup (2017-04-16) 8 commits > [...] > > > > Needs review. > > Between these two series there's 27 patches, and I understand it's a > bit of a

Re: [PATCH] cache-tree: reject entries with null sha1

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 01:23:28PM +0200, René Scharfe wrote: > Am 24.04.2017 um 12:39 schrieb Duy Nguyen: > > BTW, I ran t7009 with valgrind and it reported this. Is it something > > we should be worried about? I vaguely recall you're doing something > > with prio-queue... > > > > ==4246==

Re: [PATCH] cache-tree: reject entries with null sha1

2017-05-01 Thread Jeff King
On Mon, May 01, 2017 at 11:00:58PM +0200, René Scharfe wrote: > Am 01.05.2017 um 21:22 schrieb Jeff King: > > On Mon, May 01, 2017 at 01:23:28PM +0200, René Scharfe wrote: > > > I can only get gcc and clang to call memcpy instead of inlining it by > > > specifying -fno-builtin. Do you use that

Re: [PATCH 2/5] submodule_move_head: prepare env for child correctly

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 7:04 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> We forgot to prepare the submodule env, which is only a problem for >> nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules >> with nested submodules,

Re: [PATCH 0/5] Some submodule bugfixes and "reattaching detached HEADs"

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 6:35 PM, Junio C Hamano wrote: > Brandon Williams writes: > >> I don't know why submodules were originally designed to be in a >> detached HEAD state but I much prefer working on branches (as I'm sure >> many other developers do) so

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 6:36 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> This applies to origin/master. >> >> For better readability and understandability for newcomers it is a good idea >> to not offer 2 APIs doing the same thing with on being

Re: [PATCH v2 23/25] name-rev: avoid leaking memory in the `deref` case

2017-05-01 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> When the `name_rev()` function is asked to dereference the tip name, it >> allocates memory. But when it turns out that another tip already >> described the commit better than the current

[PATCH v3 1/6] rebase -i: add abbreviated command-names handling

2017-05-01 Thread Liam Beguin
make sure 'add_exec_commands' and 'transform_todo_ids' also understand the abbreviated versions of the command-names. Signed-off-by: Liam Beguin --- git-rebase--interactive.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 2/6] rebase -i: add abbreviate_commands function

2017-05-01 Thread Liam Beguin
Once the rest of the processing is done, the `abbreviate_commands` function is called. If the 'rebase.abbreviateCommands' option is set to true, the function will replace each command-name by its abbreviated form. Signed-off-by: Liam Beguin --- git-rebase--interactive.sh |

[PATCH v3 4/6] Documentation: move rebase.* config variables to a separate rebase-config.txt

2017-05-01 Thread Liam Beguin
Move configuration variables to a separate file in order to remove duplicates, and include it in config.txt and git-rebase.txt. The new descriptions are taken from config.txt as they are more verbose. Signed-off-by: Liam Beguin --- Documentation/config.txt| 31

[PATCH v3 3/6] rebase -i: add short command-name in --autosquash

2017-05-01 Thread Liam Beguin
teach `git rebase -i` to recognise short command-names when using the '--autosquash' option. This allows commit with titles beginning with "s! ..." and "f! ..." to be treated the same way as "squash! ..." and "fixup! ..." respectively. Signed-off-by: Liam Beguin ---

[PATCH v3 5/6] Documentation: use preferred name for the 'todo list' script

2017-05-01 Thread Liam Beguin
Use "todo list" instead of "instruction list" or "todo-list" to reduce further confusion regarding the name of this script. Signed-off-by: Liam Beguin --- Documentation/rebase-config.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 6/6] Documentation: document the rebase.abbreviateCommands option

2017-05-01 Thread Liam Beguin
Signed-off-by: Liam Beguin --- Documentation/rebase-config.txt | 23 +++ 1 file changed, 23 insertions(+) diff --git a/Documentation/rebase-config.txt b/Documentation/rebase-config.txt index a9b1d496e63a..0f29b7d0b89a 100644 ---

[PATCH v3 0/6] rebase -i: add config to abbreviate command-names

2017-05-01 Thread Liam Beguin
Add the 'rebase.abbreviateCommands' configuration option to allow `git rebase -i` to default to the single-letter command-names in the todo list. Using single-letter command-names can present two benefits. First, it makes it easier to change the action since you only need to replace a single

Re: [PATCH v2 09/25] mailinfo & mailsplit: check for EOF while parsing

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > While POSIX states that it is okay to pass EOF to isspace() (and it seems > to be implied that EOF should *not* be treated as whitespace), and also to > pass EOF to ungetc() (which seems to be intended to fail without buffering > the

Re: [PATCH v2 23/25] name-rev: avoid leaking memory in the `deref` case

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > When the `name_rev()` function is asked to dereference the tip name, it > allocates memory. But when it turns out that another tip already > described the commit better than the current one, we forgot to release > the memory. Very well

Re: [PATCH v2 25/25] submodule_uses_worktrees(): plug memory leak

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > There is really no reason why we would need to hold onto the allocated > string longer than necessary. Yup. The longer we make the duration between the allocation and the standard release, the more likely future code would add early

Re: [PATCH v2 14/25] setup_discovered_git_dir(): help static analysis

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > Coverity reported a memory leak in this function. However, it can only > be called once, as setup_git_directory() changes global state and hence > is not reentrant. > > Mark the variable as static to indicate that this is a singleton. > >

Re: [PATCH 1/5] add SWAP macro

2017-05-01 Thread René Scharfe
Am 30.04.2017 um 05:11 schrieb Jeff King: > On Sat, Apr 29, 2017 at 08:16:17PM +0200, René Scharfe wrote: > >>> I dunno. I could go either way. Or we could leave it as-is, and let >>> valgrind find the problem. That has zero run-time cost, but of course >>> nobody bothers to run valgrind outside

Re: [PATCH v2 24/25] show_worktree(): plug memory leak

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > The buffer allocated by shorten_unambiguous_ref() needs to be released. Yes. Looks good. > > Discovered by Coverity. > > Signed-off-by: Johannes Schindelin > --- > builtin/worktree.c | 8 +--- > 1 file

Re: [RFC] [GSoC] Port git-add--interactive.perl:status_cmd to C

2017-05-01 Thread Junio C Hamano
Junio C Hamano writes: > "Daniel Ferreira (theiostream)" writes: > >> Reproducing either of these comparisons "natively" would simply >> require running run_diff_index() or run_diff_files() with >> DIFF_FORMAT_NUMSTAT and tweaking diff_flush() to format

Re: [PATCH 1/5] submodule_move_head: fix leak of struct child_process

2017-05-01 Thread Stefan Beller
On Mon, May 1, 2017 at 8:07 PM, Junio C Hamano wrote: > Brandon Williams writes: > >> On 05/01, Stefan Beller wrote: >>> While fixing the leak of `cp`, reuse it instead of having to declare >>> another struct child_process. >>> >>> Signed-off-by: Stefan

Re: [PATCHv2 0/3] Make diff plumbing commands respect the indentHeuristic.

2017-05-01 Thread Junio C Hamano
Jeff King writes: > PS Outside of our test scripts, I'd probably just have written: > > perl -lpe 'print "extra line" if $. == 2' > >I think we have traditionally preferred sed/awk to perl, but given >the heavy use of vanilla perl elsewhere in the test suite, I think

Re: Proposal for missing blob support in Git repos

2017-05-01 Thread Junio C Hamano
Jonathan Tan writes: > Thanks for your comments. If you're referring to the codepath > involving write_sha1_file() (for example, builtin/hash-object -> > index_fd or builtin/unpack-objects), that is fine because > write_sha1_file() invokes freshen_packed_object() and >

  1   2   >