Re: issue: strange `git diff --numstat` behavior.

2018-10-13 Thread Junio C Hamano
to avoid that? I have checked several git versions and they > all do the same. Not an attempt to offer a solution (I don't do windows), but just trying to see what random things we can try, I wonder what you'd get if you did something like $ git diff --numstat //c/diff //c/base

issue: strange `git diff --numstat` behavior.

2018-10-12 Thread Sergey Andreenko
git diff –numstat FOLDER1 FOLDER2 works strange when run from a git controlled folder. The output shrinks some symbols in the diff file paths. For example: Create a folder and call git init, for example: `C:\test`. mkdir C:\test cd C:\test git init

Re: git diff-tree ignores --textconv

2018-09-23 Thread Stas Bekman
On 2018-09-23 06:23 PM, Jeff King wrote: > On Sun, Sep 23, 2018 at 05:56:03PM -0700, Stas Bekman wrote: > >>> You probably want "--ext-diff", not "--textconv". >> [...] >> Would it be safe to ask the maintainer of the application to include >>

Re: git diff-tree ignores --textconv

2018-09-23 Thread Jeff King
On Sun, Sep 23, 2018 at 05:56:03PM -0700, Stas Bekman wrote: > > You probably want "--ext-diff", not "--textconv". > [...] > Would it be safe to ask the maintainer of the application to include > both --textconv and --ext-diff in that 'git diff-tree' call? I

Re: git diff-tree ignores --textconv

2018-09-23 Thread Stas Bekman
On 2018-09-23 05:43 PM, Jeff King wrote: > On Sun, Sep 23, 2018 at 03:41:45PM -0700, Stas Bekman wrote: > >> $ git config --get diff.jupyternotebook.command >> git-nbdiffdriver diff > > That's an "external diff driver", not a textconv driver. > > So he

Re: git diff-tree ignores --textconv

2018-09-23 Thread Jeff King
On Sun, Sep 23, 2018 at 03:41:45PM -0700, Stas Bekman wrote: > $ git config --get diff.jupyternotebook.command > git-nbdiffdriver diff That's an "external diff driver", not a textconv driver. So here: > $ GIT_TRACE=1 git diff-tree -p HEAD --textconv test/test.ipynb > Yo

git diff-tree ignores --textconv

2018-09-23 Thread Stas Bekman
Hi, I'm using a 3rd party application that internally uses 'git diff-tree' instead of 'git diff'. I'm trying to add filter and it works with 'git diff' but it gets ignored with 'git diff-tree' despite having --textconv. I was able to reproduce the problem with the following much more simplified

Re: Possible bug: identical lines added/removed in git diff

2018-09-01 Thread Stefan Beller
On Fri, Aug 31, 2018 at 2:39 PM Johannes Schindelin wrote: > > Hi, > > On Thu, 30 Aug 2018, Stefan Beller wrote: > > > On Thu, Aug 30, 2018 at 12:20 PM Jeff King wrote: > > > > > > [...] Myers does not promise to find the absolute minimal diff. [...] > > > > The `Myers` (our default) diff

Re: Possible bug: identical lines added/removed in git diff

2018-08-31 Thread Johannes Schindelin
Hi, On Thu, 30 Aug 2018, Stefan Beller wrote: > On Thu, Aug 30, 2018 at 12:20 PM Jeff King wrote: > > > > [...] Myers does not promise to find the absolute minimal diff. [...] > > The `Myers` (our default) diff algorithm is really the Myers algorithm + > a heuristic that cuts off the long tail

Re: Possible bug: identical lines added/removed in git diff

2018-08-30 Thread Stefan Beller
On Thu, Aug 30, 2018 at 12:20 PM Jeff King wrote: > > On Thu, Aug 30, 2018 at 12:16:22PM -0700, Stefan Beller wrote: > > > On Wed, Aug 29, 2018 at 7:54 PM Jeff King wrote: > > > > > > On Wed, Aug 29, 2018 at 10:10:25PM -0400, Gabriel Holodak wrote: > > > > > > > > Could you cut down to a real

Re: Possible bug: identical lines added/removed in git diff

2018-08-30 Thread Jeff King
On Thu, Aug 30, 2018 at 12:16:22PM -0700, Stefan Beller wrote: > On Wed, Aug 29, 2018 at 7:54 PM Jeff King wrote: > > > > On Wed, Aug 29, 2018 at 10:10:25PM -0400, Gabriel Holodak wrote: > > > > > > Could you cut down to a real minimal reproduction, i.e. just these 20 > > > > lines or so? > > >

Re: Possible bug: identical lines added/removed in git diff

2018-08-30 Thread Stefan Beller
On Wed, Aug 29, 2018 at 7:54 PM Jeff King wrote: > > On Wed, Aug 29, 2018 at 10:10:25PM -0400, Gabriel Holodak wrote: > > > > Could you cut down to a real minimal reproduction, i.e. just these 20 > > > lines or so? > > > > I'm working on getting down to a minimal reproduction, a few lines at > >

Re: Possible bug: identical lines added/removed in git diff

2018-08-29 Thread Jeff King
> > I'll upload again when I've figured out all the unimportant lines to remove. Yeah, I reproduced based on your initial post, but noticed that when I cut it down the problem went away. An easy and pretty mechanical reproduction is: git diff --no-index unitera_bold_italic.bdf.{old,new} |

Re: Possible bug: identical lines added/removed in git diff

2018-08-29 Thread Gabriel Holodak
tested > git diff --no-index old new > git diff --patience --no-index old new > git diff --histogram --no-index old new > > all of which do not reproduce the issue. I don't believe I had any settings to change the algorithm. Using any of --minimal, --patience, or --h

Customize the sort of "git diff --stat" output

2018-08-28 Thread ROZAR Fabien
Hello there, I was looking for the possibility of sorting the output of the command "git diff --stat" by the number of modifications. Currently, the output of this command show the modified files by alphabetic order. I didn't find a "builtin" option which allows to sort

Re: Possible bug: identical lines added/removed in git diff

2018-08-27 Thread Stefan Beller
On Sun, Aug 26, 2018 at 6:54 PM Gabriel Holodak wrote: > > I think I'm running into a bug with git diff on v2.18.0. I cannot reproduce with the two files attached. I suspected you might have a different diff algorithm configured, so I tested git diff --no-index old new gi

Possible bug: identical lines added/removed in git diff

2018-08-26 Thread Gabriel Holodak
I think I'm running into a bug with git diff on v2.18.0. When I diff the attached files, part of the diff ends up looking like: ... STARTCHAR U+00F0 ENCODING 240 SWIDTH 500 0 -DWIDTH 8 0 -BBX 7 12 1 0 -BITMAP -12 -0C -14 -22 -02 -3E -42 -42 -82 -84 -84 -78 +DWIDTH 8 0 +BBX 8 12 0 0 +BITMAP +1B

Re: [feature] how to output absolute paths in git diff? => --show-abs-path

2018-08-23 Thread Timothee Cour
ow-abs-paths to implicitly > supply --src-prefix, but not --dst-prefix? If so, why? notice I didn't use `--show-abs-paths` in that example; I'm showing what `git diff` currently outputs (the `could show` meant depending on your use case; eg when `get_file1` returns an absolute path and `get_file2` ret

Re: [feature] how to output absolute paths in git diff? => --show-abs-path

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23, 2018 at 11:16 AM Timothee Cour wrote: > > This has all the context: > https://stackoverflow.com/questions/22698505/how-to-show-full-paths-in-git-diff It's helpful to copy it anyway, so we can discuss it here: QUOTE How do I show full paths in git diff? One can use '--d

[feature] how to output absolute paths in git diff? => --show-abs-path

2018-08-23 Thread Timothee Cour
This has all the context: https://stackoverflow.com/questions/22698505/how-to-show-full-paths-in-git-diff I'd like `--show-abs-path` to show absolute paths in: git diff --show-abs-path args... eg: git diff --no-index `get_file1` `get_file2` could show: --- a/Users/timothee/temp/ripgrep/help0.txt

how to output absolute paths in git diff?

2018-08-23 Thread Timothee Cour
This has all the context: https://stackoverflow.com/questions/22698505/how-to-show-full-paths-in-git-diff I'd like `--show-abs-path` to show absolute paths in: git diff --show-abs-path args... eg: git diff --no-index `get_file1` `get_file2` could show: --- a/Users/timothee/temp/ripgrep/help0.txt

exit code in git diff-index [was: Re: concurrent access to multiple local git repos is error prone]

2018-08-05 Thread Thomas Gummerer
On 08/05, Alexander Mills wrote: > Also, as an aside, this seems to be a bug, but probably a known bug: > > $ git diff-index HEAD; echo $? > > :100755 100755 60e5d683c1eb3e61381b1a8ec2db822b94b9faec > M cli/npp_check_merge.s

Re: Git diff --no-index --no-prefix output loses leading slash in paths

2018-06-18 Thread George King
This is a feature request; sorry for the confusion. My guess is that it's a corner case that was not considered due to the default prefixing. > On Jun 18, 2018, at 10:59 AM, Duy Nguyen wrote: > > On Mon, Jun 18, 2018 at 4:36 PM George King wrote: >> >> As of 2.17.1,

Re: Git diff --no-index --no-prefix output loses leading slash in paths

2018-06-18 Thread Duy Nguyen
On Mon, Jun 18, 2018 at 4:36 PM George King wrote: > > As of 2.17.1, `git diff --no-index --no-prefix relative/path /absolute/path` > produces the following: I checked as far back as v1.4.0 and git behaved the same way too. What version did it work for you? Or is this not a regressio

Git diff --no-index --no-prefix output loses leading slash in paths

2018-06-18 Thread George King
As of 2.17.1, `git diff --no-index --no-prefix relative/path /absolute/path` produces the following: diff --git relative/path absolute/path index XXX..YYY ZZ --- relative/path +++ absolute/path The leading slash on `absolute/path` is lost. This is unfortunate; my use case is a diff

[PATCH 10/20] abbrev tests: test for "git-diff" behavior

2018-06-08 Thread Ævar Arnfjörð Bjarmason
test_must_fail git -c core.abbrev=$i diff --no-index --raw X Y >diff && + cut_tr_d_n_field_n 3 diff.3 && + test_byte_count = $i diff.3 && + cut_tr_d_n_field_n 4 diff.4 && + test_byte_count = $i diff.4 &&am

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Junio C Hamano
Stefan Beller writes: > plumbing command, so the likelihood of git-log calls in scripts out > there is high. > > So maybe the community should strive to be more aggressive about > changing the porcelain interface for the better. To me, these two paragraphs are being incoherent. If plumbing

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Stefan Beller
On Thu, May 31, 2018 at 4:09 PM, Robert P. J. Day wrote: > On Fri, 1 Jun 2018, Johannes Sixt wrote: > >> Am 31.05.2018 um 19:27 schrieb Robert P. J. Day: >> > On Thu, 31 May 2018, Duy Nguyen wrote: >> >> git diff-index is "plumbing", designed for wri

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Robert P. J. Day
On Fri, 1 Jun 2018, Johannes Sixt wrote: > Am 31.05.2018 um 19:27 schrieb Robert P. J. Day: > > On Thu, 31 May 2018, Duy Nguyen wrote: > >> git diff-index is "plumbing", designed for writing scripts. "git > >> diff" on the other hand is for users and

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Johannes Sixt
Am 31.05.2018 um 19:27 schrieb Robert P. J. Day: On Thu, 31 May 2018, Duy Nguyen wrote: git diff-index is "plumbing", designed for writing scripts. "git diff" on the other hand is for users and its behavior may change even if it breaks backward compatibility. ah, this

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Duy Nguyen
t; > the commit-related, client-side hooks, and was wondering (perhaps >> > stupidly) why the pre-commit.sample hook uses, as its last line: >> > >> > exec git diff-index --check --cached $against -- >> > ^^ >> > >> > as in, could

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Robert P. J. Day
he pre-commit.sample hook uses, as its last line: > > > > exec git diff-index --check --cached $against -- > >^^ > > > > as in, could this not be done equivalently with just git diff, not > > git diff-index? i just did a quick test and it

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Duy Nguyen
On Thu, May 31, 2018 at 6:38 PM, Robert P. J. Day wrote: > > was going over some hooks and writing some tutorials for some of the > commit-related, client-side hooks, and was wondering (perhaps > stupidly) why the pre-commit.sample hook uses, as its last line: > > exec git

is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Robert P. J. Day
was going over some hooks and writing some tutorials for some of the commit-related, client-side hooks, and was wondering (perhaps stupidly) why the pre-commit.sample hook uses, as its last line: exec git diff-index --check --cached $against -- ^^ as in, could

[PATCH v2 0/4] Fix i-t-a entries in git-diff and git-apply

2018-05-26 Thread Nguyễn Thái Ngọc Duy
v2 first fixes a bug in --ita-invisible-in-index that accidentally affects diffing a worktree and a tree. This caused a regression when v1's 1/2 turned this option on by default. Other than that, 4/4 should address Junio's comments on v1's 2/2. Nguyễn Thái Ngọc Duy (4): diff: ignore

Re: Wrong -dirty suffix set by setlocalversion (was: BUG in git diff-index)

2018-05-24 Thread Marc Herbert
'-svn%s' "`git svn find-rev $head`" > fi > > - # Check for uncommitted changes > - if git diff-index --name-only HEAD | grep -qv > "^scripts/package"; then > + # Check for uncommitted changes. Only check mt

Re: Wrong -dirty suffix set by setlocalversion (was: BUG in git diff-index)

2018-05-24 Thread Mike Mason
;`git svn find-rev $head`" fi - # Check for uncommitted changes - if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then + # Check for uncommitted changes. Only check mtime and size. + # Ignore insequen

Re: git diff: meaning of ^M at line ends ?

2018-05-18 Thread Torsten Bögershausen
t; Windows typically uses CRLF at the end of the line. >> "git diff" uses the LF to detect the end of line, >> leaving the CR alone. >> >> Nothing to worry about. > Thanks, I already suspected something like that. > Has this behavior been changed/added recen

Re: git diff: meaning of ^M at line ends ?

2018-05-15 Thread Frank Schäfer
Am 14.05.2018 um 20:13 schrieb Torsten Bögershausen: > ^M is the representation of a "Carriage Return" or CR. > Under Linux/Unix/Mac OS X a line is terminated with a single > "line feed", LF. > > Windows typically uses CRLF at the end of the line. > "git

Re: git diff: meaning of ^M at line ends ?

2018-05-14 Thread Torsten Bögershausen
On 14.05.18 18:08, Frank Schäfer wrote: > What does ^M at the end of lines in the output of 'git diff' mean ? > > Thanks, > Frank > ^M is the representation of a "Carriage Return" or CR. Under Linux/Unix/Mac OS X a line is terminated with a single "line feed"

git diff: meaning of ^M at line ends ?

2018-05-14 Thread Frank Schäfer
What does ^M at the end of lines in the output of 'git diff' mean ? Thanks, Frank

[PATCH v3 7/7] doc: normalize [--options] to [options] in git-diff

2018-05-03 Thread Andreas Heiduk
hanges between two files on disk. -'git diff' [--options] [--] [...]:: +'git diff' [options] [--] [...]:: This form is to view the changes you made relative to the index (staging area for the next commit). In other @@ -29,7 +29,7 @@ two blob objects, or changes between two files o

[PATCH v2 7/6] doc: normalize [--options] to [options] in git-diff

2018-04-27 Thread Andreas Heiduk
hanges between two files on disk. -'git diff' [--options] [--] [...]:: +'git diff' [options] [--] [...]:: This form is to view the changes you made relative to the index (staging area for the next commit). In other @@ -29,7 +29,7 @@ two blob objects, or changes between two files o

Re: Feature Request: Add diff.word-diff and perhaps diff.word-diff-regex configuration options to enable always using word-diffs in git diff

2018-04-15 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason <ava...@gmail.com> writes: > On Sat, Apr 14 2018, Doron Behar wrote: > >> I've just came across the wonderful command line option for `git diff`: >> `--word-diff`. It could be great to have a configuration option that >> will enable this f

Re: Feature Request: Add diff.word-diff and perhaps diff.word-diff-regex configuration options to enable always using word-diffs in git diff

2018-04-14 Thread Ævar Arnfjörð Bjarmason
On Sat, Apr 14 2018, Doron Behar wrote: > I've just came across the wonderful command line option for `git diff`: > `--word-diff`. It could be great to have a configuration option that > will enable this feature by default when running `git diff`. Do you know you can do: g

Feature Request: Add diff.word-diff and perhaps diff.word-diff-regex configuration options to enable always using word-diffs in git diff

2018-04-14 Thread Doron Behar
I've just came across the wonderful command line option for `git diff`: `--word-diff`. It could be great to have a configuration option that will enable this feature by default when running `git diff`. signature.asc Description: PGP signature

Re: make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Michael Haggerty
On Tue, Feb 13, 2018 at 7:25 PM, Σπύρος Βαζαίος wrote: > While I din't have the experience to express an opinion on this > matter, I have to say that the --no-indent-heuristic that Jeff > suggested worked great. > There were more than a handful of cases that this issue

Re: make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Σπύρος Βαζαίος
t; >>> Hi, I've came across an issue when using the git diff command. In >>> particular the diff is different to what the svn diff produces. While >>> both being correct the output of the svn diff is easier to understand >>> than the git diff one. See the fol

Re: make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Stefan Beller
On Tue, Feb 13, 2018 at 8:08 AM, Jeff King <p...@peff.net> wrote: > On Tue, Feb 13, 2018 at 05:06:15PM +0200, Σπύρος Βαζαίος wrote: > >> Hi, I've came across an issue when using the git diff command. In >> particular the diff is different to what the svn diff produces. Whi

Re: make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Jeff King
On Tue, Feb 13, 2018 at 05:06:15PM +0200, Σπύρος Βαζαίος wrote: > Hi, I've came across an issue when using the git diff command. In > particular the diff is different to what the svn diff produces. While > both being correct the output of the svn diff is easier to understand > than

make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Σπύρος Βαζαίος
Hi, I've came across an issue when using the git diff command. In particular the diff is different to what the svn diff produces. While both being correct the output of the svn diff is easier to understand than the git diff one. See the following issue on github where I initially reported

Re: Unexpected git diff output during merge conflict

2018-02-08 Thread Nick O'Leary
f.net> wrote: > On Thu, Feb 08, 2018 at 10:51:57AM +, Nick O'Leary wrote: > >> $ git diff README.md >> diff --cc README.md >> index 61d78b2,620d806..000 >> --- a/README.md >> +++ b/README.md >> @@@ -1,7 -1,1 +1,11 @@@ >> -This

Re: Unexpected git diff output during merge conflict

2018-02-08 Thread Jeff King
On Thu, Feb 08, 2018 at 10:51:57AM +, Nick O'Leary wrote: > $ git diff README.md > diff --cc README.md > index 61d78b2,620d806..000 > --- a/README.md > +++ b/README.md > @@@ -1,7 -1,1 +1,11 @@@ > -This is my default readme > ++<<<

Unexpected git diff output during merge conflict

2018-02-08 Thread Nick O'Leary
Hi, I have a merge conflict on a file and the git diff output looks wrong to me. Here's how to recreate: On branch 'dev' add/commit a file (called README.md) with the contents ( '--' used to delimit the file, not included in the content): --- This is my default readme

Re: how to ignore whitespace changes with --color-moved (git diff move detection)?

2018-02-02 Thread Stefan Beller
On Thu, Feb 1, 2018 at 6:13 PM, Timothee Cour wrote: > this PR from october 2017 was discussing a patch that'd introduce > `--color-moved-[no-]ignore-space-change` > https://public-inbox.org/git/20171025224620.27657-3-sbel...@google.com/ > > however not sure what

Re: how to ignore whitespace changes with --color-moved (git diff move detection)?

2018-02-01 Thread Jeff King
On Thu, Feb 01, 2018 at 06:13:52PM -0800, Timothee Cour wrote: > this PR from october 2017 was discussing a patch that'd introduce > `--color-moved-[no-]ignore-space-change` > https://public-inbox.org/git/20171025224620.27657-3-sbel...@google.com/ > > however not sure what happened since then as

how to ignore whitespace changes with --color-moved (git diff move detection)?

2018-02-01 Thread Timothee Cour
this PR from october 2017 was discussing a patch that'd introduce `--color-moved-[no-]ignore-space-change` https://public-inbox.org/git/20171025224620.27657-3-sbel...@google.com/ however not sure what happened since then as I can't find in `git help diff` options even after `brew install --HEAD

Re: [PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff`

2018-01-08 Thread Ben Peart
On 1/5/2018 5:22 PM, Junio C Hamano wrote: Johannes Schindelin writes: diff --git a/diff-lib.c b/diff-lib.c index 8104603a3..13ff00d81 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -95,6 +95,9 @@ int run_diff_files(struct rev_info *revs, unsigned int option)

Re: [PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff`

2018-01-05 Thread Junio C Hamano
Johannes Schindelin writes: >> diff --git a/diff-lib.c b/diff-lib.c >> index 8104603a3..13ff00d81 100644 >> --- a/diff-lib.c >> +++ b/diff-lib.c >> @@ -95,6 +95,9 @@ int run_diff_files(struct rev_info *revs, unsigned int >> option) >> >>

Re: [PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff`

2018-01-04 Thread Johannes Schindelin
Hi Alex, On Tue, 2 Jan 2018, Alex Vandiver wrote: > diff --git a/diff-lib.c b/diff-lib.c > index 8104603a3..13ff00d81 100644 > --- a/diff-lib.c > +++ b/diff-lib.c > @@ -95,6 +95,9 @@ int run_diff_files(struct rev_info *revs, unsigned int > option) > > diff_set_mnemonic_prefix(>diffopt,

Re: Misleading documentation for git-diff-files (diff-filter)

2018-01-04 Thread John Cheng
Thanks for the clarification! I also didn't realize that diff-files -R will show added files. You learn something new everyday ;) On Thu, Jan 4, 2018 at 11:09 AM, Junio C Hamano wrote: > Jeff King writes: > >> diff --git a/Documentation/diff-options.txt

Re: Misleading documentation for git-diff-files (diff-filter)

2018-01-04 Thread Junio C Hamano
Jeff King writes: > diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt > index 9d1586b956..743af97b06 100644 > --- a/Documentation/diff-options.txt > +++ b/Documentation/diff-options.txt > @@ -469,6 +469,12 @@ ifndef::git-format-patch[] > + > Also,

Re: Misleading documentation for git-diff-files (diff-filter)

2018-01-04 Thread Jeff King
ent was to have a script to look for local git > repos that with unstaged changes. After some trial and error, I found > that git-ls-files gave me what I needed. However, I wanted to point > out why I initially believed git-diff-files with show "added files". I took you

Re: Misleading documentation for git-diff-files (diff-filter)

2018-01-04 Thread John Cheng
trial and error, I found that git-ls-files gave me what I needed. However, I wanted to point out why I initially believed git-diff-files with show "added files". Think of this more as user feedback. On Wed, Jan 3, 2018 at 3:53 PM, Junio C Hamano <gits...@pobox.com> wrote: > J

Re: Misleading documentation for git-diff-files (diff-filter)

2018-01-03 Thread Junio C Hamano
John Cheng <johnlich...@gmail.com> writes: > I wanted to know if git diff-files shows files that are not in the > index but are in the working tree. At least in the original design of Git, that would fundamentally be impossible, as Git _only_ cares about paths that are in the ind

Misleading documentation for git-diff-files (diff-filter)

2018-01-03 Thread John Cheng
I originally asked this question on stackoverflow (https://stackoverflow.com/q/48039277). I wanted to know if git diff-files shows files that are not in the index but are in the working tree. The documentation says you can supply --diff-filter=A, which will select file "that are added"

[PATCH/RFC 0/2] git diff --UTF-8

2017-12-29 Thread tboegi
From: Torsten Bögershausen <tbo...@web.de> RFC patch: convert files from e.g. UTF-16 into UTF-8 while running "git diff". The diff must be called with "git diff --UTF-8" and the "encoding" attribute must be set for the file(s). The commit messages may need

[PATCH/RFC 2/2] git diff: Allow to reencode into UTF-8

2017-12-29 Thread tboegi
From: Torsten Bögershausen <tbo...@web.de> When blobs are encoded in UTF-16, `git diff` will treat them as binary. Make it possible to show a user readable diff encoded in UTF-8. This allows to run git diff and feed the into a web sever. Improve Git to look at the "encodig

[PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff`

2017-12-18 Thread Alex Vandiver
With fsmonitor enabled, the first call to match_stat_with_submodule calls refresh_fsmonitor, incurring the overhead of reading the list of updated files -- but run_diff_files does not respect the CE_FSMONITOR_VALID flag. Make use of the fsmonitor extension to skip lstat() calls on files that

Re: Unfortunate interaction between git diff-index and fakeroot

2017-12-08 Thread Junio C Hamano
Elazar Leibovich writes: > ignore unused information, such as commit > 2cb45e95438c113871fbbea5b4f629f9463034e7 > which ignores st_dev, because it doesn't actually matter, or I do not think it ignores because "it doesn't matter". st_dev is known not to be stable

Re: Unfortunate interaction between git diff-index and fakeroot

2017-12-08 Thread Elazar Leibovich
eems like the linux kernel is using diff-index to do just that, in scripts/setlocalversion https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/setlocalversion#n77 Do I understand correctly that linux should update the index first, or better, use porcelain &

Re: Unfortunate interaction between git diff-index and fakeroot

2017-12-07 Thread Junio C Hamano
, things will become consistent. > The unexpected result is: > > "fakeroot git status" updates the index, and the index now says all files > are owned by uid:0. You should learn to expect it; that is how fakeroot works. > "git diff-index --name-only HEAD" is used to test

Unfortunate interaction between git diff-index and fakeroot

2017-12-07 Thread Elazar Leibovich
process of a package under fakeroot, and running "git describe --dirty", or "git status" to generate package name. The unexpected result is: "fakeroot git status" updates the index, and the index now says all files are owned by uid:0. "git diff-index --name-on

Re: Documentation for git-diff is very difficult to understand for a layman.

2017-11-03 Thread Jacob Keller
Hi, On November 3, 2017 2:43:03 AM PDT, Vladimir Nikishkin <lockyw...@gmail.com> wrote: >Hello, honourable GIT developers. > >I would like to kindly ask you to do something with the git-diff >manpage. (https://git-scm.com/docs/git-diff) > >In fact, I wasn't able to

Documentation for git-diff is very difficult to understand for a layman.

2017-11-03 Thread Vladimir Nikishkin
Hello, honourable GIT developers. I would like to kindly ask you to do something with the git-diff manpage. (https://git-scm.com/docs/git-diff) In fact, I wasn't able to understand it even after reading it a few times. In my case, I was trying to understand, what the command actually prints

Re: Meaning of two commit-ish hash in git diff

2017-10-31 Thread Junio C Hamano
Yubin Ruan writes: >>> IOW, if you have the contents of the blob whose object name is >>> f8886b4, by applying this patch, you will get a blob whose object >>> name is a1c96df. >>> >>> The information is used by "git am -3" when the patch does not apply >>> cleanly to

Re: Meaning of two commit-ish hash in git diff

2017-10-31 Thread Yubin Ruan
1c96df 100644 >>> --- a/path/somefile >>> +++ b/path/somefile >>> >>> >>> This is output by a `git diff` between two adjacent commits but they are >>> not any commit hash. I grep through the whole $(git log) but still cannot >>> find

Re: Meaning of two commit-ish hash in git diff

2017-10-31 Thread Philip Oakley
Yubin , From: "Junio C Hamano" <gits...@pobox.com> Yubin Ruan <ablacktsh...@gmail.com> writes: diff --git a/path/somefile b/path/somefile index f8886b4..a1c96df 100644 --- a/path/somefile +++ b/path/somefile This is output by a `git diff` between two adjacent commit

Re: Meaning of two commit-ish hash in git diff

2017-10-30 Thread Junio C Hamano
Yubin Ruan <ablacktsh...@gmail.com> writes: > diff --git a/path/somefile b/path/somefile > index f8886b4..a1c96df 100644 > --- a/path/somefile > +++ b/path/somefile > > > This is output by a `git diff` between two adjacent commits but they are > not any commit

Meaning of two commit-ish hash in git diff

2017-10-30 Thread Yubin Ruan
Hi, Can anyone tell me what does the "f8886b4..a1c96df" mean in a git diff output, as below? diff --git a/path/somefile b/path/somefile index f8886b4..a1c96df 100644 --- a/path/somefile +++ b/path/somefile This is output by a `git diff` between two adjacent commits but they are not

Re: Git diff --no-index and file descriptor inputs

2017-10-24 Thread Dennis Kaarsemaker
half a year ago, I > > don't know what happened to them. > > > > From: Dennis Kaarsemaker > > Sent: Friday, January 13, 2017 5:20 AM > > Subject: [PATCH v2 0/2] diff --no-index: support symlinks and pipes > > https://public-inbox.org/git/20170324213110.433

Wrong -dirty suffix set by setlocalversion (was: BUG in git diff-index)

2017-09-27 Thread Marc Herbert
+ linux-kbuild list which is not in the output of: ./scripts/get_maintainer.pl -f scripts/setlocalversion ... but seems relevant anyway. On 31/03/16 13:39, Junio C Hamano wrote: > Andy Lowry writes: > >> So I think now that the script should do "update-index --refresh"

Google indexing https://public-inbox.org/git (was: BUG in git diff-index)

2017-09-26 Thread Marc Herbert
[Reduced Cc: and change Subject:] On 26/09/17 13:11, Eric Wong wrote: > There's no blocks on public-inbox.org and I'm completely against > any sort of blocking/throttling. Maybe there's too many pages > to index? Or the Message-IDs in URLs are too ugly/scary? Not > sure what to do about

Re: BUG in git diff-index

2017-09-26 Thread Eric Wong
gt; http://git.661346.n2.nabble.com/BUG-in-git-diff-index-tt7652105.html#none > Is there a robots.txt to block indexing on > https://public-inbox.org/git/1459432667.2124.2.ca...@dwim.me ? There's no blocks on public-inbox.org and I'm completely against any sort of blocking/throttling. M

Re: BUG in git diff-index

2017-09-26 Thread Marc Herbert
copy (as Mike learned the hard way) PS: I used NNTP and http://dir.gmane.org/gmane.comp.version-control.git to quickly find this old thread (what could we do without NNTP?). Then I googled for a web archive of this thread and Google could only find this one: http://git.661346.n2.nabble.com/BUG-in-git-dif

Re: git diff --name-status for deleted files

2017-09-14 Thread Junio C Hamano
Gene Thomas writes: > Junio, >Thanks for your reply. So git is essentially doing a >"git commit" when I "git rm". No. You'd probably need to read a bit more on Git; unlike other systems like CVS and SVN, where you only have two states (i.e. committed

RE: git diff --name-status for deleted files

2017-09-14 Thread Gene Thomas
ger.kernel.org Subject: Re: git diff --name-status for deleted files Gene Thomas <g...@nlc.co.nz> writes: > Hello, > "git diff -name-status" is useful to list the files one > has changed but it does not list file that one has > deleted with &q

Re: git diff --name-status for deleted files

2017-09-14 Thread Junio C Hamano
Gene Thomas <g...@nlc.co.nz> writes: > Hello, > "git diff -name-status" is useful to list the files one > has changed but it does not list file that one has > deleted with "git rm". It would be really handy if it >

git diff --name-status for deleted files

2017-09-14 Thread Gene Thomas
Hello, "git diff -name-status" is useful to list the files one has changed but it does not list file that one has deleted with "git rm". It would be really handy if it did. I am using git 2.9.3 on Ubuntu Linux 16.10. Yours Sincerely, Gene Thomas.

Re: git diff doesn't quite work as documented?

2017-09-09 Thread Yubin Ruan
t$ git checkout bar-added -- bar.txt > oklischat@oklischat:/tmp/gittest$ git reset HEAD > oklischat@oklischat:/tmp/gittest$ git status > On branch master > Untracked files: > (use "git add ..." to include in what will be committed) > > bar.txt > > nothing

Re: git diff doesn't quite work as documented?

2017-09-08 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 08.09.2017 03:26: > Olaf Klischat <olaf.klisc...@gmail.com> writes: > >> `git diff --help' says: >> >> git diff [--options] [--] [...] >>This form is to view the changes you have in your >>

Re: git diff doesn't quite work as documented?

2017-09-07 Thread Junio C Hamano
Olaf Klischat <olaf.klisc...@gmail.com> writes: > `git diff --help' says: > > git diff [--options] [--] [...] >This form is to view the changes you have in your >working tree relative to the named . That help text is poorly phrased. When "g

RE: Git diff --no-index and file descriptor inputs

2017-09-07 Thread Jason Pyeron
| Subject: [PATCH v2 0/2] diff --no-index: support symlinks and pipes > https://public-inbox.org/git/20170324213110.4331-1-den...@kaarsemaker.net/ I see, it goes back to 2016... | From: Dennis Kaarsemaker | Subject: [RFC/PATCH 0/2] git diff <(command1) <(command2) | Date: Fri, 11 N

Re: Git diff --no-index and file descriptor inputs

2017-09-07 Thread Martin Ågren
On 7 September 2017 at 18:00, Jason Pyeron wrote: > > I was hoping to leverage --word-diff-regex, but the --no-index option does > not seem to work with <(...) notation. > > I am I doing something wrong or is this a bug? There were some patches floating around half a year ago,

git diff doesn't quite work as documented?

2017-09-07 Thread Olaf Klischat
include in what will be committed) bar.txt nothing added to commit but untracked files present (use "git add" to track) oklischat@oklischat:/tmp/gittest$ git diff bar-added # would expect this to show no differences diff --git a/bar.txt b/bar.txt deleted file mode 100

Git diff --no-index and file descriptor inputs

2017-09-07 Thread Jason Pyeron
I was hoping to leverage --word-diff-regex, but the --no-index option does not seem to work with <(...) notation. I am I doing something wrong or is this a bug? -Jason (reply to list please) root@blackfat /projects $ git diff --no-index -- <(xmllint --format HRUniversalServices/pairs/s

Re: core.autocrlf=true causes `git apply` to fail on patch generated with `git diff-index HEAD --patch`

2017-08-11 Thread Torsten Bögershausen
>I left it unsaid by mistake, but I think the right thing to use as >the "previous" to take hint from in the context of "git apply" is >what is in the working tree, i.e. the result of applying patch in >step (4) to create a file F in the sample scenario. >While applying patch in step (5),

Re: core.autocrlf=true causes `git apply` to fail on patch generated with `git diff-index HEAD --patch`

2017-08-11 Thread Torsten Bögershausen
Test from mutt

Re: core.autocrlf=true causes `git apply` to fail on patch generated with `git diff-index HEAD --patch`

2017-08-02 Thread Junio C Hamano
Torsten Bögershausen writes: > My very first investigation shows that a patch like this could fix > the problem: > > diff --git a/apply.c b/apply.c > index f2d599141d..66b8387360 100644 > --- a/apply.c > +++ b/apply.c > @@ -2278,6 +2278,8 @@ static int read_old_data(struct stat

Re: core.autocrlf=true causes `git apply` to fail on patch generated with `git diff-index HEAD --patch`

2017-08-02 Thread Torsten Bögershausen
On 08/01/2017 10:58 PM, Anthony Sottile wrote: Here's where I'm hitting the problem described: https://github.com/pre-commit/pre-commit/issues/570 Note that `git -c core.autocrlf=false` apply patch fixes this situation, but breaks others. [] I wasn't thinking of that - and thanks for the

  1   2   3   4   5   6   >