<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff-no-index.c, branch v2.3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-04-03T19:38:42Z</updated>
<entry>
<title>Merge branch 'jc/fix-diff-no-index-diff-opt-parse'</title>
<updated>2014-04-03T19:38:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-03T19:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7b6bc4d8350029fed82824a33ea9039f22788eec'/>
<id>urn:sha1:7b6bc4d8350029fed82824a33ea9039f22788eec</id>
<content type='text'>
"diff --no-index -Mq a b" fell into an infinite loop.

* jc/fix-diff-no-index-diff-opt-parse:
  diff-no-index: correctly diagnose error return from diff_opt_parse()
</content>
</entry>
<entry>
<title>diff-no-index: correctly diagnose error return from diff_opt_parse()</title>
<updated>2014-03-31T18:48:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-31T18:47:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad1c3fbd26d0aae50abfb3c7d654f7229ba9370d'/>
<id>urn:sha1:ad1c3fbd26d0aae50abfb3c7d654f7229ba9370d</id>
<content type='text'>
diff_opt_parse() returns the number of options parsed, or often
returns error() which is defined to return -1.  Yes, return value of
0 is "I did not process that option at all", which should cause the
caller to say that, but negative return should not be forgotten.

This bug caused "diff --no-index" to infinitely show the same error
message because the returned value was used to decrement the loop
control variable, e.g.

        $ git diff --no-index --color=words a b
        error: option `color' expects "always", "auto", or "never"
        error: option `color' expects "always", "auto", or "never"
        ...

Instead, make it act like so:

        $ git diff --no-index --color=words a b
        error: option `color' expects "always", "auto", or "never"
        fatal: invalid diff option/value: --color=words

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bb/diff-no-index-dotdot'</title>
<updated>2014-03-25T18:08:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-25T18:08:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=37943cc6b9a24c1636472f670aba972d12757ba7'/>
<id>urn:sha1:37943cc6b9a24c1636472f670aba972d12757ba7</id>
<content type='text'>
* bb/diff-no-index-dotdot:
  diff-no-index: replace manual "."/".." check with is_dot_or_dotdot()
  diff-no-index: rename read_directory()
</content>
</entry>
<entry>
<title>diff-no-index: replace manual "."/".." check with is_dot_or_dotdot()</title>
<updated>2014-03-19T18:49:39Z</updated>
<author>
<name>Brian Bourn</name>
<email>ba.bourn@gmail.com</email>
</author>
<published>2014-03-19T15:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd3aeeab0d41474af86e41d207196abbb7bf78f6'/>
<id>urn:sha1:fd3aeeab0d41474af86e41d207196abbb7bf78f6</id>
<content type='text'>
Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Brian Bourn &lt;ba.bourn@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-no-index: rename read_directory()</title>
<updated>2014-03-19T18:49:35Z</updated>
<author>
<name>Brian Bourn</name>
<email>ba.bourn@gmail.com</email>
</author>
<published>2014-03-19T15:58:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9daf0ef065bfef4fb9dcc1710a39a8177695c84f'/>
<id>urn:sha1:9daf0ef065bfef4fb9dcc1710a39a8177695c84f</id>
<content type='text'>
In the next patch, we will replace a manual checking of "." or ".."
with a call to is_dot_or_dotdot() defined in dir.h.  The private
function read_directory() defined in this file will conflict with
the global function declared there when we do so.

As a preparatory step, rename the private read_directory() to avoid
the name collision.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Brian Bourn &lt;ba.bourn@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/hold-diff-remove-q-synonym-for-no-deletion'</title>
<updated>2014-03-07T23:17:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-07T23:17:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2687ffdeb76816a1645a5c3e3c7aaf654cc923bc'/>
<id>urn:sha1:2687ffdeb76816a1645a5c3e3c7aaf654cc923bc</id>
<content type='text'>
Remove a confusing and deprecated "-q" option from "git diff-files";
"git diff-files --diff-filter=d" can be used instead.
</content>
</entry>
<entry>
<title>diff: move no-index detection to builtin/diff.c</title>
<updated>2013-12-12T20:23:02Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2013-12-11T09:58:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=470faf96544c1844ad775c695dfa370fe0ef3756'/>
<id>urn:sha1:470faf96544c1844ad775c695dfa370fe0ef3756</id>
<content type='text'>
Currently the --no-index option is parsed in diff_no_index().  Move the
detection if a no-index diff should be executed to builtin/diff.c, where
we can use it for executing diff_no_index() conditionally.  This will
also allow us to execute other operations conditionally, which will be
done in the next patch.

There are no functional changes.

Helped-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dw/diff-no-index-doc'</title>
<updated>2013-09-17T18:42:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-17T18:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cd8c891b7403754cc7f4b5ace0f799adb83d3218'/>
<id>urn:sha1:cd8c891b7403754cc7f4b5ace0f799adb83d3218</id>
<content type='text'>
When the user types "git diff" outside a working tree, thinking he
is inside one, the current error message that is a single-liner
"usage: git diff --no-index &lt;path&gt; &lt;path&gt;" may not be sufficient to
make him realize the mistake. Add "Not a git repository" to the
error message when we fell into the "--no-index" mode without an
explicit command line option to instruct us to do so.

* dw/diff-no-index-doc:
  diff --no-index: describe in a separate paragraph
  diff --no-index: clarify operation when not inside a repository
</content>
</entry>
<entry>
<title>Merge branch 'jc/diff-filter-negation'</title>
<updated>2013-09-09T21:28:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-09T21:28:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01a2a03c56e8d4cd9724b185a48a2a1ea9852f0c'/>
<id>urn:sha1:01a2a03c56e8d4cd9724b185a48a2a1ea9852f0c</id>
<content type='text'>
Teach "git diff --diff-filter" to express "I do not want to see
these classes of changes" more directly by listing only the
unwanted ones in lowercase (e.g. "--diff-filter=d" will show
everything but deletion) and deprecate "diff-files -q" which did
the same thing as "--diff-filter=d".

* jc/diff-filter-negation:
  diff: deprecate -q option to diff-files
  diff: allow lowercase letter to specify what change class to exclude
  diff: reject unknown change class given to --diff-filter
  diff: preparse --diff-filter string argument
  diff: factor out match_filter()
  diff: pass the whole diff_options to diffcore_apply_filter()
</content>
</entry>
<entry>
<title>diff --no-index: clarify operation when not inside a repository</title>
<updated>2013-08-22T20:55:28Z</updated>
<author>
<name>Dale R. Worley</name>
<email>worley@alum.mit.edu</email>
</author>
<published>2013-08-22T20:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b214eddfb2d57e318a3f5b88da1cafcf19184b4d'/>
<id>urn:sha1:b214eddfb2d57e318a3f5b88da1cafcf19184b4d</id>
<content type='text'>
Clarify documentation for "diff --no-index".  State that when not
inside a repository, --no-index is implied and two arguments are
mandatory.

Clarify error message from diff-no-index to inform user that CWD is
not inside a repository and thus two arguments are mandatory.

Signed-off-by: Dale Worley &lt;worley@ariadne.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
