[PATCH v3 6/8] diff: improve positioning of add/delete blocks in diffs

2016-09-05 Thread Michael Haggerty
Some groups of added/deleted lines in diffs can be slid up or down, because lines at the edges of the group are not unique. Picking good shifts for such groups is not a matter of correctness but definitely has a big effect on aesthetics. For example, consider the following two diffs. The first is

[PATCH v3 5/8] xdl_change_compact(): introduce the concept of a change group

2016-09-05 Thread Michael Haggerty
The idea of xdl_change_compact() is fairly simple: * Proceed through groups of changed lines in the file to be compacted, keeping track of the corresponding location in the "other" file. * If possible, slide the group up and down to try to give the most aesthetically pleasing diff. Whenever

[PATCH v3 4/8] recs_match(): take two xrecord_t pointers as arguments

2016-09-05 Thread Michael Haggerty
There is no reason for it to take an array and two indexes as argument, as it only accesses two elements of the array. Signed-off-by: Michael Haggerty --- xdiff/xdiffi.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xdiff/xdiffi.c

[PATCH v3 8/8] blame: honor the diff heuristic options and config

2016-09-05 Thread Michael Haggerty
Teach "git blame" and "git annotate" the --compaction-heuristic and --indent-heuristic options that are now supported by "git diff". Also teach them to honor the `diff.compactionHeuristic` and `diff.indentHeuristic` configuration options. It would be conceivable to introduce separate

[PATCH v3 2/8] xdl_change_compact(): only use heuristic if group can't be matched

2016-09-05 Thread Michael Haggerty
If the changed group of lines can be matched to a group in the other file, then that positioning should take precedence over the compaction heuristic. The old code tried the heuristic unconditionally, which cost redundant effort and also was broken if the matching code had already shifted the

[PATCH v3 7/8] parse-options: add parse_opt_unknown_cb()

2016-09-05 Thread Michael Haggerty
Add a new callback function, parse_opt_unknown_cb(), which returns -2 to indicate that the corresponding option is unknown. This can be used to add "-h" documentation for an option that will be handled externally to parse_options(). Signed-off-by: Michael Haggerty --- See

[PATCH v3 3/8] is_blank_line(): take a single xrecord_t as argument

2016-09-05 Thread Michael Haggerty
There is no reason for it to take an array and index as argument, as it only accesses a single element of the array. Signed-off-by: Michael Haggerty --- xdiff/xdiffi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xdiff/xdiffi.c

[PATCH v3 1/8] xdl_change_compact(): fix compaction heuristic to adjust ixo

2016-09-05 Thread Michael Haggerty
The code branch used for the compaction heuristic forgot to keep ixo in sync while the group was shifted. This is certainly wrong, as it causes the two counters to get out of sync. I *think* that this bug could also have caused the function to read past the end of the rchgo array, though I

[PATCH v3 0/8] Better heuristics make prettier diffs

2016-09-05 Thread Michael Haggerty
This is v3 of the diff-indent-heuristic patch series. Thanks to René, Junio, and Ramsay for their comments about v2 [1,2]. The heuristic itself hasn't changed since v2. Most of the changes are in the tests and in how `git blame` is wired up to support the new options. Changes since v1: * In

[PATCH 0/4] test suite: use the GIT_TRACE_CURL environment var

2016-09-05 Thread Elia Pinto
Use the new GIT_TRACE_CURL environment variable in the test suite instead of the deprecated GIT_CURL_VERBOSE. Elia Pinto (4): t5541-http-push-smart.sh: use the GIT_TRACE_CURL environment var test-lib.sh: preserve GIT_TRACE_CURL from the environment t5550-http-fetch-dumb.sh: use the

[PATCH 3/4] t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var

2016-09-05 Thread Elia Pinto
Use the new GIT_TRACE_CURL environment variable instead of the deprecated GIT_CURL_VERBOSE. Signed-off-by: Elia Pinto --- t/t5550-http-fetch-dumb.sh | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/t/t5550-http-fetch-dumb.sh

[PATCH 4/4] t5551-http-fetch-smart.sh: use the GIT_TRACE_CURL environment var

2016-09-05 Thread Elia Pinto
Use the new GIT_TRACE_CURL environment variable instead of the deprecated GIT_CURL_VERBOSE. Signed-off-by: Elia Pinto --- t/t5551-http-fetch-smart.sh | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/t/t5551-http-fetch-smart.sh

[PATCH 2/4] test-lib.sh: preserve GIT_TRACE_CURL from the environment

2016-09-05 Thread Elia Pinto
Turning on this variable can be useful when debugging http tests. It can break a few tests in t5541 if not set to an absolute path but it is not a variable that the user is likely to have enabled accidentally. Signed-off-by: Elia Pinto --- t/test-lib.sh | 1 + 1 file

[PATCH 1/4] t5541-http-push-smart.sh: use the GIT_TRACE_CURL environment var

2016-09-05 Thread Elia Pinto
Use the new GIT_TRACE_CURL environment variable instead of the deprecated GIT_CURL_VERBOSE. Signed-off-by: Elia Pinto --- t/t5541-http-push-smart.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5541-http-push-smart.sh

Re: [WIP PATCH v2] diff.c: emit moved lines with a different color

2016-09-05 Thread Junio C Hamano
Stefan Beller writes: > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 0bcb679..f4f51c2 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -980,8 +980,9 @@ color.diff.:: > of `context` (context text - `plain` is a

Re: [PATCH 1/4] add: document the chmod option

2016-09-05 Thread Thomas Gummerer
Hi Johannes, On 09/05, Johannes Schindelin wrote: > Hi Thomas, > > On Sun, 4 Sep 2016, Thomas Gummerer wrote: > > > +--chmod=(+|-):: > > There is an "x" missing ;-) Ugh, thanks for catching. I'll wait a few days for more comments and address it in a re-roll. > Ciao, > Dscho

Re: [PATCH v6 12/13] convert: add filter..process option

2016-09-05 Thread Lars Schneider
> On 30 Aug 2016, at 22:46, Jakub Narębski wrote: > >>> The filter can exit right after the "error-all". If the filter does >>> not exit then Git will kill the filter. I'll add this to the docs. >> >> OK. > > Is it explicit kill, or implicit kill: close pipe and end process?

[PATCH] t6026-merge-attr: wait for process to release trash directory

2016-09-05 Thread Johannes Sixt
The process spawned in the hook uses the test's trash directory as CWD. As long as it is alive, the directory cannot be removed on Windows. Although the test succeeds, the 'test_done' that follows produces an error message and leaves the trash directory around. Insert a delay to give the hook time

[PATCHv1 3/4] t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var

2016-09-05 Thread Elia Pinto
Use the new GIT_TRACE_CURL environment variable instead of the deprecated GIT_CURL_VERBOSE. Signed-off-by: Elia Pinto --- Drop leftover debugging junk from previous patch t/t5550-http-fetch-dumb.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH] t9903: fix broken && chain

2016-09-05 Thread Johannes Sixt
We might wonder why our && chain check does not catch this case: The && chain check uses a strange exit code with the expectation that the second or later part of a broken && chain would not exit with this particular code. This expectation does not work in this case because __git_ps1, being the

Re: [PATCH 3/4] t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var

2016-09-05 Thread Elia Pinto
2016-09-05 15:43 GMT+02:00 Eric Sunshine : > On Mon, Sep 5, 2016 at 6:24 AM, Elia Pinto wrote: >> Use the new GIT_TRACE_CURL environment variable instead >> of the deprecated GIT_CURL_VERBOSE. >> >> Signed-off-by: Elia Pinto

Re: [PATCH 0/3] Fix a segfault caused by regexec() being called on mmap()ed data

2016-09-05 Thread Junio C Hamano
Johannes Schindelin writes: > This patch series addresses a problem where `git diff` is called using > `-G` or `-S --pickaxe-regex` on new-born files that are configured > without user diff drivers, and that hence get mmap()ed into memory. Good spotting. This has

Re: [PATCH] Avoid hard-coded perl path in sha-bang

2016-09-05 Thread brian m. carlson
On Mon, Sep 05, 2016 at 11:28:18PM +0800, iblis wrote: > Signed-off-by: Iblis Lin > > --- > contrib/diff-highlight/diff-highlight | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/contrib/diff-highlight/diff-highlight >

Re: [PATCH 1/6] git-gui: The term unified for remote in Japanese

2016-09-05 Thread Satoshi Yasushima
On Sun, 4 Sep 2016 14:10:45 +0200 Jakub Narębski wrote: 1>> msgid "Tracking branch %s is not a branch in the remote repository." 2>> -msgstr "トラッキング・ブランチ %s は遠隔リポジトリのブランチではありません。" 3>> +msgstr "" 4> 5>What for is the above part of change (empty string)? 6> 7>> +"トラッキング・ブランチ %s

Re: [PATCH 1/6] git-gui: The term unified for remote in Japanese

2016-09-05 Thread Satoshi Yasushima
On Tue, 6 Sep 2016 2:16 +0900 Satoshi Yasushima wrote: >But now, doesn't make empty string by apply msgmerge this commit. Oops. Now, I was a rebase work, msgmerge changed with empty string. Hence I think this commit keeps with empty string.

[PATCH 1/3] Demonstrate a problem: our pickaxe code assumes NUL-terminated buffers

2016-09-05 Thread Johannes Schindelin
When our pickaxe code feeds file contents to regexec(), it implicitly assumes that the file contents are read into implicitly NUL-terminated buffers (i.e. that we overallocate by 1, appending a single '\0'). This is not so. In particular when the file contents are simply mmap()ed, we can be

[PATCH 3/3] diff_grep: add assertions verifying that the buffers are NUL-terminated

2016-09-05 Thread Johannes Schindelin
Before calling regexec() on the file contents, we better be certain that the strings fulfill the contract of C strings assumed by said function. Signed-off-by: Johannes Schindelin --- diffcore-pickaxe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH] Avoid hard-coded perl path in sha-bang

2016-09-05 Thread iblis
Signed-off-by: Iblis Lin --- contrib/diff-highlight/diff-highlight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight index ffefc31..b57b0fd 100755 ---

[PATCH 0/3] Fix a segfault caused by regexec() being called on mmap()ed data

2016-09-05 Thread Johannes Schindelin
This patch series addresses a problem where `git diff` is called using `-G` or `-S --pickaxe-regex` on new-born files that are configured without user diff drivers, and that hence get mmap()ed into memory. The problem with that: mmap()ed memory is *not* NUL-terminated, yet the pickaxe code calls

[PATCH 2/3] diff_populate_filespec: NUL-terminate buffers

2016-09-05 Thread Johannes Schindelin
While the xdiff machinery is quite capable of working with strings given as pointer and size, Git's add-on functionality simply assumes that we are operating on NUL-terminated strings, e.g. y running regexec() on the provided pointer, with no way to pass the size, too. In general, this assumption

Re: [PATCH v2 05/38] refs: create a base class "ref_store" for files_ref_store

2016-09-05 Thread David Turner
On Mon, 2016-09-05 at 05:53 +0200, Michael Haggerty wrote: > On 09/04/2016 10:40 PM, David Turner wrote: > > On Sun, 2016-09-04 at 18:08 +0200, Michael Haggerty wrote: > > > >> +/* A linked list of ref_stores for submodules: */ > >> +static struct ref_store *submodule_ref_stores; > > > > I don't

Re: [PATCH 3/4] t5550-http-fetch-dumb.sh: use the GIT_TRACE_CURL environment var

2016-09-05 Thread Eric Sunshine
On Mon, Sep 5, 2016 at 6:24 AM, Elia Pinto wrote: > Use the new GIT_TRACE_CURL environment variable instead > of the deprecated GIT_CURL_VERBOSE. > > Signed-off-by: Elia Pinto > --- > diff --git a/t/t5550-http-fetch-dumb.sh

Re: [PATCH 1/6] git-gui: The term unified for remote in Japanese

2016-09-05 Thread Satoshi Yasushima
On Sat, 03 Sep 2016 23:54:36 -0700 Junio C Hamano wrote: I couldn't quite read/parse the title, but luckily I read Japanese ;-) You saw different Japanese words used to translate the same original word "remote" in different message strings, and you chose one of them and use it everywhere. And

[PATCH v2 06/20] builtin/cat-file: convert some static functions to struct object_id

2016-09-05 Thread brian m. carlson
Convert all of the static functions that are not callbacks to use struct object_id. Signed-off-by: brian m. carlson --- builtin/cat-file.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git

[PATCH v2 01/20] cache: convert struct cache_entry to use struct object_id

2016-09-05 Thread brian m. carlson
Convert struct cache_entry to use struct object_id by applying the following semantic patch and the object_id transforms from contrib, plus the actual change to the struct: @@ struct cache_entry E1; @@ - E1.sha1 + E1.oid.hash @@ struct cache_entry *E1; @@ - E1->sha1 + E1->oid.hash

[PATCH v2 07/20] builtin: convert textconv_object to use struct object_id

2016-09-05 Thread brian m. carlson
Since all of its callers have been updated, make textconv_object take a struct object_id. Signed-off-by: brian m. carlson --- builtin.h | 2 +- builtin/blame.c| 12 ++-- builtin/cat-file.c | 2 +- builtin/log.c | 2 +- 4 files changed,

[PATCH v2 02/20] builtin/apply: convert static functions to struct object_id

2016-09-05 Thread brian m. carlson
There were several static functions using unsigned char arrays for SHA-1 values. Convert them to use struct object_id. Signed-off-by: brian m. carlson --- builtin/apply.c | 96 - 1 file changed, 48

Re: [PATCH] stash: allow ref of a stash by index

2016-09-05 Thread Øystein Walle
Pasting text into Gmail's web interface is not conducive to sending tabs through the intertubes. But you get the idea.. Øsse

Re: [PATCH 5/5] pack-objects: walk tag chains for --include-tag

2016-09-05 Thread Jeff King
On Mon, Sep 05, 2016 at 05:52:26PM -0400, Jeff King wrote: > When pack-objects is given --include-tag, it peels each tag > ref down to a non-tag object, and if that non-tag object is > going to be packed, we include the tag, too. But what > happens if we have a chain of tags (e.g., tag "A" points

2.10.0: multiple versionsort.prereleasesuffix buggy?

2016-09-05 Thread Leho Kraav (Conversion Ready)
Hi all Here's the testing tree https://github.com/woothemes/woocommerce .git/config has: [versionsort] prereleasesuffix = -beta prereleasesuffix = -RC $ git tag -l --sort=version:refname ... 2.5.0-RC1 2.5.0-RC2 2.5.0-RC3 2.5.0-beta-1 2.5.0-beta-2 2.5.0-beta-3 2.5.0 2.5.1 2.5.2

Re: [PATCH] stash: allow ref of a stash by index

2016-09-05 Thread Jeff King
On Mon, Sep 05, 2016 at 11:46:34PM +0200, Øystein Walle wrote: > The bash-specific code is a no-go, so here's a way to do it in a way > that I think is in line with Git's code style for shell scripts. I took > the liberty of removing the '|| exit 1' since the rev is verified later > on anyway, as

[PATCH v2 09/20] builtin/checkout: convert some static functions to struct object_id

2016-09-05 Thread brian m. carlson
Convert all the static functions that are not callbacks to struct object_id. Signed-off-by: brian m. carlson --- builtin/checkout.c | 66 +++--- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git

[PATCH v2 08/20] streaming: make stream_blob_to_fd take struct object_id

2016-09-05 Thread brian m. carlson
Since all of its callers have been updated, modify stream_blob_to_fd to take a struct object_id. Signed-off-by: brian m. carlson --- builtin/cat-file.c | 6 +++--- builtin/fsck.c | 2 +- builtin/log.c | 4 ++-- entry.c| 2 +- streaming.c

[PATCH v2 10/20] notes-merge: convert struct notes_merge_pair to struct object_id

2016-09-05 Thread brian m. carlson
Convert each of this structure's members from an unsigned char array to a struct object_id. Signed-off-by: brian m. carlson --- notes-merge.c | 127 ++ 1 file changed, 65 insertions(+), 62 deletions(-) diff

[PATCH v2 03/20] builtin/blame: convert struct origin to use struct object_id

2016-09-05 Thread brian m. carlson
Convert struct origin to use struct object_id by applying the following semantic patch and the object_id transforms from contrib, plus the actual change to the struct: @@ struct origin E1; @@ - E1.blob_sha1 + E1.blob_oid.hash @@ struct origin *E1; @@ - E1->blob_sha1 + E1->blob_oid.hash

[PATCH v2 04/20] builtin/log: convert some static functions to use struct object_id

2016-09-05 Thread brian m. carlson
Signed-off-by: brian m. carlson --- builtin/log.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 92dc34dc..226212c9 100644 --- a/builtin/log.c +++ b/builtin/log.c

[PATCH v2 20/20] builtin/reset: convert to use struct object_id

2016-09-05 Thread brian m. carlson
Signed-off-by: brian m. carlson --- builtin/reset.c | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index 9020ec66..5aa86079 100644 --- a/builtin/reset.c +++

[PATCH v2 19/20] builtin/commit-tree: convert to struct object_id

2016-09-05 Thread brian m. carlson
Signed-off-by: brian m. carlson --- builtin/commit-tree.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c index 8a674bc9..60501726 100644 --- a/builtin/commit-tree.c +++

[PATCH v2 05/20] builtin/cat-file: convert struct expand_data to use struct object_id

2016-09-05 Thread brian m. carlson
Convert struct cache_entry to use struct object_id by applying the following semantic patch and the object_id transforms from contrib, plus the actual change to the struct: @@ struct expand_data E1; @@ - E1.sha1 + E1.oid.hash @@ struct expand_data *E1; @@ - E1->sha1 + E1->oid.hash @@ struct

[PATCH v2 00/20] object_id part 5

2016-09-05 Thread brian m. carlson
This is the fifth in a series of series to convert from unsigned char [20] to struct object_id. This series converts many of the files in the builtin directory to use struct object_id. This gets us almost to the point where we can convert get_tree_entry to use struct object_id, but not quite.

Re: [PATCH v1 1/2] sha1_file: open window into packfiles with CLOEXEC

2016-09-05 Thread Eric Wong
larsxschnei...@gmail.com wrote: > All processes that the Git main process spawns inherit the open file > descriptors of the main process. These leaked file descriptors can > cause problems. > -int git_open_noatime(const char *name) > +int git_open_noatime_cloexec(const char *name) > { > -

git commit -p with file arguments

2016-09-05 Thread Christian Neukirchen
Hi, I noticed the following suprising behavior: % git --version git version 2.10.0 % git add bar % git status -s A bar M foo % git commit -p foo [stage a hunk] ... # Explicit paths specified without -i or -o; assuming --only paths... # On branch master # Changes to be committed: # new

[RFCv3] Proposed questions for "Git User's Survey 2016", take three

2016-09-05 Thread Jakub Narębski
Hello, As I wrote previously, I am thinking about returning to doing the Git User's Survey this year. Message-ID: <577e6f32.7020...@gmail.com> https://marc.info/?l=git=146790381602547=2 https://public-inbox.org/git/577E6F32.7020007%40gmail.com/ In this email I'd like to propose the

Re: [PATCH 0/5] handle tag recursion in pack-objects --include-tag

2016-09-05 Thread Jeff King
On Mon, Sep 05, 2016 at 05:51:41PM -0400, Jeff King wrote: > If you have a tag of a tag of a commit, and the middle tag isn't > otherwise reachable, then "pack-objects --include-tag" will not include > the middle tag, and certain invocations of "clone" will fail. See the > final patch below for

Re: 2.10.0: multiple versionsort.prereleasesuffix buggy?

2016-09-05 Thread Jeff King
On Tue, Sep 06, 2016 at 01:42:28AM +0300, Leho Kraav (Conversion Ready) wrote: > Here's the testing tree https://github.com/woothemes/woocommerce > > .git/config has: > > [versionsort] > > > prereleasesuffix = -beta > prereleasesuffix = -RC > > $ git tag -l --sort=version:refname >

[PATCH 2/5] t5305: drop "dry-run" of unpack-objects

2016-09-05 Thread Jeff King
For each test we do a dry-run of unpack-objects, followed by a real run, followed by confirming that it contained the objects we expected. The dry-run is telling us nothing, as any errors it encounters would be found in the real run. Signed-off-by: Jeff King ---

[PATCH 3/5] t5305: use "git -C"

2016-09-05 Thread Jeff King
This test unpacks objects into a separate repository, and accesses it by setting GIT_DIR in a subshell. We can do the same thing these days by using "git init " and "git -C". In most cases this is shorter, though when there are multiple commands, we may end up repeating the "-C". However, this

[PATCH 4/5] t5305: simplify packname handling

2016-09-05 Thread Jeff King
We generate a series of packfiles test-1-$pack, test-2-$pack, with different properties and then examine them. However we always store the packname generated by pack-objects in the variable packname_1. This probably was meant to be packname_2 in the second test, but it turns out that it doesn't

[PATCH 5/5] pack-objects: walk tag chains for --include-tag

2016-09-05 Thread Jeff King
When pack-objects is given --include-tag, it peels each tag ref down to a non-tag object, and if that non-tag object is going to be packed, we include the tag, too. But what happens if we have a chain of tags (e.g., tag "A" points to tag "B", which points to commit "C")? We'll peel down to "C"

[PATCH 1/5] t5305: move cleanup into test block

2016-09-05 Thread Jeff King
We usually try to avoid doing any significant actions outside of test blocks. Although "rm -rf" is unlikely to either fail or to generate output, moving these to the point of use makes it more clear that they are part of the overall setup of "clone.git". Signed-off-by: Jeff King

[PATCH 0/5] handle tag recursion in pack-objects --include-tag

2016-09-05 Thread Jeff King
If you have a tag of a tag of a commit, and the middle tag isn't otherwise reachable, then "pack-objects --include-tag" will not include the middle tag, and certain invocations of "clone" will fail. See the final patch below for the gory details. The first five patches are just test cleanup and

[PATCH v2 11/20] Convert read_mmblob to take struct object_id.

2016-09-05 Thread brian m. carlson
Since all of its callers have been updated, convert read_mmblob to take a pointer to struct object_id. Signed-off-by: brian m. carlson --- builtin/apply.c| 6 +++--- builtin/checkout.c | 6 +++--- merge-recursive.c | 6 +++--- notes-merge.c | 6 +++---

[PATCH v2 13/20] builtin/rm: convert to use struct object_id

2016-09-05 Thread brian m. carlson
Signed-off-by: brian m. carlson --- builtin/rm.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/builtin/rm.c b/builtin/rm.c index 109969d5..3f3e24eb 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -107,7 +107,7 @@ static int

[PATCH v2 16/20] sha1_name: convert get_sha1_mb to struct object_id

2016-09-05 Thread brian m. carlson
All of the callers of this function use struct object_id, so rename it to get_oid_mb and make it take struct object_id instead of unsigned char *. Signed-off-by: brian m. carlson --- builtin/checkout.c | 2 +- cache.h| 2 +- sha1_name.c| 18

[PATCH v2 18/20] builtin/am: convert to struct object_id

2016-09-05 Thread brian m. carlson
Convert uses of unsigned char [20] to struct object_id. Rename the generically-named "ptr" to "old_oid" and make it const. Signed-off-by: brian m. carlson --- builtin/am.c | 140 +-- 1 file changed, 70

[PATCH v2 17/20] refs: add an update_ref_oid function.

2016-09-05 Thread brian m. carlson
Several places around the codebase want to pass update_ref data from struct object_id, but update_ref may also be passed NULL pointers. Instead of checking and dereferencing in every caller, create an update_ref_oid which wraps update_ref and provides this functionality. Signed-off-by: brian m.

[PATCH v2 12/20] builtin/blame: convert file to use struct object_id

2016-09-05 Thread brian m. carlson
Convert this file to use struct object_id, and additionally convert some uses of the constant 40 to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson --- builtin/blame.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git

[PATCH v2 15/20] builtin/update-index: convert file to struct object_id

2016-09-05 Thread brian m. carlson
Convert all functions to use struct object_id, and replace instances of hardcoded 40, 41, and 42 with appropriate references to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson --- builtin/update-index.c | 61 +- 1

[PATCH v2 14/20] notes: convert init_notes to use struct object_id

2016-09-05 Thread brian m. carlson
Signed-off-by: brian m. carlson --- notes.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/notes.c b/notes.c index df4660fe..2bab961a 100644 --- a/notes.c +++ b/notes.c @@ -993,7 +993,7 @@ const char *default_notes_ref(void) void

[PATCH v1 1/2] sha1_file: open window into packfiles with CLOEXEC

2016-09-05 Thread larsxschneider
From: Lars Schneider All processes that the Git main process spawns inherit the open file descriptors of the main process. These leaked file descriptors can cause problems. Use the CLOEXEC flag similar to 05d1ed61 to fix the leaked file descriptors. Signed-off-by:

[PATCH v1 2/2] read-cache: make sure file handles are not inherited by child processes

2016-09-05 Thread larsxschneider
From: Lars Schneider This fix prepares a series with the goal to avoid launching a new clean/smudge filter process for each file that is filtered. A new long running filter process is introduced that is used to filter all files in a single Git invocation. Consider the

[PATCH v1 0/2] Use CLOEXEC to avoid fd leaks

2016-09-05 Thread larsxschneider
From: Lars Schneider Use the CLOEXEC flag similar to 05d1ed61 to fix leaked file descriptors. Patch 1/2 was contemplated by Junio here: http://public-inbox.org/git/xmqq37lnbbpk@gitster.mtv.corp.google.com/ I followed Torsten's advice and renamed `git_open_noatime`

Re: [PATCH] stash: allow ref of a stash by index

2016-09-05 Thread Øystein Walle
Hi, guys I like this idea. It makes stash easier and quicker to use, and it "hides" the fact that it uses the reflog for keeping track of the made stashes. *Not* to say I discourage interested people from peeking under the hood. I just think it's nice to sometimes think of the stash as a separate

Great Offer

2016-09-05 Thread Mrs Julie Leach
You are a recipient to Mrs Julie Leach Donation of $2 million USD. Contact (julieleach...@hotmail.com) for claims.

Re: [PATCHv3] diff.c: emit moved lines with a different color

2016-09-05 Thread Jacob Keller
On Sun, Sep 4, 2016 at 4:42 PM, Stefan Beller wrote: > When we color the diff, we'll mark moved lines with a different color. > Excellent idea. This is a very neat way to show extra information without cluttering the diff output. > This is achieved by doing a two passes

Re: [WIP PATCH v2] diff.c: emit moved lines with a different color

2016-09-05 Thread Stefan Beller
On Mon, Sep 5, 2016 at 6:09 PM, Jacob Keller wrote: > On Mon, Sep 5, 2016 at 11:57 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> diff --git a/Documentation/config.txt b/Documentation/config.txt >>> index

Re: 2.10.0: multiple versionsort.prereleasesuffix buggy?

2016-09-05 Thread SZEDER Gábor
> On Tue, Sep 06, 2016 at 01:42:28AM +0300, Leho Kraav (Conversion Ready) wrote: > > > Here's the testing tree https://github.com/woothemes/woocommerce > > > > .git/config has: > > > > [versionsort] > > > > > > prereleasesuffix = -beta > > prereleasesuffix = -RC > > > > $ git tag -l

Re: [WIP PATCH v2] diff.c: emit moved lines with a different color

2016-09-05 Thread Jacob Keller
On Mon, Sep 5, 2016 at 11:57 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> diff --git a/Documentation/config.txt b/Documentation/config.txt >> index 0bcb679..f4f51c2 100644 >> --- a/Documentation/config.txt >> +++ b/Documentation/config.txt >>

Re: [WIP PATCH v2] diff.c: emit moved lines with a different color

2016-09-05 Thread Stefan Beller
On Mon, Sep 5, 2016 at 11:57 AM, Junio C Hamano wrote: >> + `new` (added lines), `commit` (commit headers), `whitespace` >> + (highlighting whitespace errors), `moved-old` (removed lines that >> + reappear), `moved-new` (added lines that were removed elsewhere). > >

Re: [PATCHv3] diff.c: emit moved lines with a different color

2016-09-05 Thread Stefan Beller
On Mon, Sep 5, 2016 at 6:17 PM, Jacob Keller wrote: > On Sun, Sep 4, 2016 at 4:42 PM, Stefan Beller wrote: >> When we color the diff, we'll mark moved lines with a different color. >> > > Excellent idea. This is a very neat way to show extra

Re: 2.10.0: multiple versionsort.prereleasesuffix buggy?

2016-09-05 Thread Jeff King
On Tue, Sep 06, 2016 at 03:07:59AM +0200, SZEDER Gábor wrote: > > So that seems wrong. Even weirder, if I set _only_ "-beta", I get: > > > > $ git tag -l --sort=version:refname | grep -v ^2.6.0 > > 2.6.0-beta-2 > > 2.6.0-beta-3 > > 2.6.0-beta-4 > > 2.6.0 > > 2.6.0-RC1 > > 2.6.0-RC2

Re: [PATCH 1/4] add: document the chmod option

2016-09-05 Thread Johannes Schindelin
Hi Thomas, On Sun, 4 Sep 2016, Thomas Gummerer wrote: > +--chmod=(+|-):: There is an "x" missing ;-) Ciao, Dscho

Re: Fixup of a fixup not working right

2016-09-05 Thread Johannes Schindelin
Hi Philip, On Sun, 4 Sep 2016, Philip Oakley wrote: > From: "Johannes Schindelin" > > > The point is that fixup! messages are really special, and are always > > intended to be squashed into the referenced commit *before* the latter > > hits `master`. > > I think