Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Patrick Palka
On Thu, 18 Jun 2015, Jeff King wrote: On Thu, Jun 18, 2015 at 04:14:19PM -0400, Patrick Palka wrote: in a test script becomes more clear. But some of the output is not so great. For instance, the very commit under discussion has a confusing and useless highlight. Or take a documentation patch

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Patrick Palka
On Thu, Jun 18, 2015 at 5:23 PM, Jeff King wrote: > On Thu, Jun 18, 2015 at 04:45:05PM -0400, Jeff King wrote: > >> Still, I think this is probably a minority case, and it may be >> outweighed by the improvements. The "real" solution is to consider the >> hunk as a whole and do an LCS diff on it,

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Patrick Palka
On Thu, Jun 18, 2015 at 3:08 PM, Jeff King wrote: > On Thu, Jun 18, 2015 at 12:28:58PM -0400, Patrick Palka wrote: > >> By the way, what would it take to get something like this script into >> git proper? It is IMHO immensely useful even in its current form, yet >> bec

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Patrick Palka
On Thu, Jun 18, 2015 at 2:08 PM, Junio C Hamano wrote: > Patrick Palka writes: > >>> I have this nagging feeling that it is just as likely that two >>> uneven hunks align at the top as they align at the bottom, so while >>> this might not hurt it may not b

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Patrick Palka
On Thu, 18 Jun 2015, Jeff King wrote: On Thu, Jun 18, 2015 at 11:08:16AM -0700, Junio C Hamano wrote: So as I said, I do not think it would hurt to have this as an incremental improvement (albeit going in a possibly wrong direction). Of course, it is a separate question if this change makes t

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Patrick Palka
On Thu, Jun 18, 2015 at 11:50 AM, Junio C Hamano wrote: > Patrick Palka writes: > >> Currently the diff-highlight script does not try to highlight hunks that >> have different numbers of removed/added lines. But we can be a little >> smarter than that, without in

[PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-15 Thread Patrick Palka
(lexicographical) add/remove pairs. It is not uncommon for hunks to have common "prefixes", and in such a case this change is very useful for spotting differences. Signed-off-by: Patrick Palka --- contrib/diff-highlight/diff-highlight | 26 +- 1 file changed, 17 insert

Re: [PATCH v2] reset: optionally setup worktree and refresh index on --mixed

2014-02-16 Thread Patrick Palka
s more sense to make > it optional. > > Reported-by: Patrick Palka > Signed-off-by: Nguyễn Thái Ngọc Duy Thanks! I can confirm that this change fixes my use case. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.ke

git-reset does not seem to respect GIT_WORK_TREE

2014-02-14 Thread Patrick Palka
Hi everyone, I noticed that git-reset does not seem to respect GIT_WORK_TREE. Here is a simplified test case: $ mkdir src_dir && cd src_dir $ git init $ touch A && git add A && git commit -m "Dummy commit." $ mkdir ../build_dir && cd ../build_dir $ export GIT_WORK_TREE=../src_dir $ export GIT_DI

[PATCH] Documentation: improve the example of overriding LESS via core.pager

2012-10-28 Thread Patrick Palka
You can override an option set in the LESS variable by simply prefixing the command line option with `-+`. This is more robust than the previous example if the default LESS options are to ever change. Signed-off-by: Patrick Palka --- Documentation/config.txt |8 1 file changed, 4