<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git-suggestion/github-suggestion/src, branch master</title>
<subtitle>Diffs and patches for GitHub pull request suggestions</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/'/>
<entry>
<title>Suggestion: Add doc comments for the recent blob changes</title>
<updated>2020-08-23T18:39:16+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-23T18:39:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=4cb257182bd2a0a3773886fd172d9ac5ca9e1fef'/>
<id>4cb257182bd2a0a3773886fd172d9ac5ca9e1fef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Suggestion: Rename `diff_command()` to `blob()`</title>
<updated>2020-08-23T17:45:28+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-23T17:45:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=7028b38ba6ada33975ea44521ec121367c9d15f9'/>
<id>7028b38ba6ada33975ea44521ec121367c9d15f9</id>
<content type='text'>
This function is no longer calling the `git diff` command, so this name
doesn't make sense.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function is no longer calling the `git diff` command, so this name
doesn't make sense.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Suggestion.diff_command: Diff an index instead of a file"</title>
<updated>2020-08-23T16:12:33+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-23T16:12:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=4c15bad2a95768ab6e299866c55aed31215fe6cc'/>
<id>4c15bad2a95768ab6e299866c55aed31215fe6cc</id>
<content type='text'>
This reverts commit 588cd526fd78b3a0e0ec1dfb9fc194ca385de902.

Since each suggestion has its own associated commit, we can't compare a
tree and a single commit. We'll probably have to invoke `git diff` once
for each suggestion.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 588cd526fd78b3a0e0ec1dfb9fc194ca385de902.

Since each suggestion has its own associated commit, we can't compare a
tree and a single commit. We'll probably have to invoke `git diff` once
for each suggestion.
</pre>
</div>
</content>
</entry>
<entry>
<title>Suggestion.diff_command: Diff an index instead of a file</title>
<updated>2020-08-23T15:41:37+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-23T15:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=588cd526fd78b3a0e0ec1dfb9fc194ca385de902'/>
<id>588cd526fd78b3a0e0ec1dfb9fc194ca385de902</id>
<content type='text'>
This will enable us to use the `git diff` command with more than one
suggestion at the same time.

We compare the commit of the suggestion with the new index's tree.

And as I write this, I'm realising that we can't diff multiple
suggestions using the same commit because each suggestion has its own
commit.

Need to work out a different way to do this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will enable us to use the `git diff` command with more than one
suggestion at the same time.

We compare the commit of the suggestion with the new index's tree.

And as I write this, I'm realising that we can't diff multiple
suggestions using the same commit because each suggestion has its own
commit.

Need to work out a different way to do this.
</pre>
</div>
</content>
</entry>
<entry>
<title>Suggestion.diff_command: Return the right side version blob</title>
<updated>2020-08-22T19:53:56+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-22T19:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=3c6f337e26964077d1ce629fa17d16e4484b877f'/>
<id>3c6f337e26964077d1ce629fa17d16e4484b877f</id>
<content type='text'>
Don't run the `git diff` command in this function, instead return the
new blob created for the right hand side of the comparison.

This will facilitate showing the diffs of multiple suggestions at once.
Maybe. I haven't tried the command yet.

Actually, looking at the man page, it doesn't say we can include more
than one blob pair, so I might need to put all of the suggestion changes
into a single blob and compare the original commit with that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't run the `git diff` command in this function, instead return the
new blob created for the right hand side of the comparison.

This will facilitate showing the diffs of multiple suggestions at once.
Maybe. I haven't tried the command yet.

Actually, looking at the man page, it doesn't say we can include more
than one blob pair, so I might need to put all of the suggestion changes
into a single blob and compare the original commit with that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Execute `git diff` to output diffs</title>
<updated>2020-08-22T19:18:34+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-22T18:42:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=5cbc3972644a321442b9640cfcc50f7ef014a6c9'/>
<id>5cbc3972644a321442b9640cfcc50f7ef014a6c9</id>
<content type='text'>
I want to enable colour diff output. At first, I thought about doing
this by getting the diff colours from the Git config, then outputting
the ANSI escape codes manually with the text.

However, I then thought it would be nice to enable other diff features
like `--word-diff`, and it would be too much trouble to re-implement
that manually, and then I'd have to take word diff colouring into
account.

Decided that the optimal way to get both colours and extra diff
features like word diffing would be to use `git diff` directly under the
hood.

We shell out to `git diff`, and give it the original file as a base, and
a new blob object that we create in the repository on the right side.
This allows us to compare the file using a command in the following
format:

    $ git diff &lt;BASE&gt;:src/server.rs &lt;TEMPORARY_HASH&gt;

Ostensibly, the temporary blob object I create for the right side
version should be freed automatically by `git2`.

Add a new `sugdiff` command to output diffs. This will replace
`sugpatch`. Since we're working with diffs, I think a name with "diff"
sounds more logical. The previous version, "patch" sounds too much like
what "apply" does, because of the Unix `patch` command.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I want to enable colour diff output. At first, I thought about doing
this by getting the diff colours from the Git config, then outputting
the ANSI escape codes manually with the text.

However, I then thought it would be nice to enable other diff features
like `--word-diff`, and it would be too much trouble to re-implement
that manually, and then I'd have to take word diff colouring into
account.

Decided that the optimal way to get both colours and extra diff
features like word diffing would be to use `git diff` directly under the
hood.

We shell out to `git diff`, and give it the original file as a base, and
a new blob object that we create in the repository on the right side.
This allows us to compare the file using a command in the following
format:

    $ git diff &lt;BASE&gt;:src/server.rs &lt;TEMPORARY_HASH&gt;

Ostensibly, the temporary blob object I create for the right side
version should be freed automatically by `git2`.

Add a new `sugdiff` command to output diffs. This will replace
`sugpatch`. Since we're working with diffs, I think a name with "diff"
sounds more logical. The previous version, "patch" sounds too much like
what "apply" does, because of the Unix `patch` command.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename the project `git-suggestion`</title>
<updated>2020-08-05T22:18:19+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-05T20:21:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=a9c9d1c3a20af5779145dbba8cdfbf0d1fbb960f'/>
<id>a9c9d1c3a20af5779145dbba8cdfbf0d1fbb960f</id>
<content type='text'>
Since this is a Git command, this makes more sense to me.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since this is a Git command, this makes more sense to me.
</pre>
</div>
</content>
</entry>
<entry>
<title>client::Error::Deserialize: Include source error message</title>
<updated>2020-08-04T22:45:39+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-04T22:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=451065229d47288d0f4b0b055dc459e7b7984d86'/>
<id>451065229d47288d0f4b0b055dc459e7b7984d86</id>
<content type='text'>
Forgot to include this so we didn't get extra information about the
cause of the error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Forgot to include this so we didn't get extra information about the
cause of the error.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add license (GNU GPLv3+)</title>
<updated>2020-08-04T18:09:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-04T18:09:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=fdf33cf50c2747976bc683ccd74b55d4c14053e0'/>
<id>fdf33cf50c2747976bc683ccd74b55d4c14053e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add documentation comments</title>
<updated>2020-08-02T16:49:51+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-08-02T16:49:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-suggestion/commit/?id=8e5ac6f2d4e52eea95e5a6fc2905ce511ac4956e'/>
<id>8e5ac6f2d4e52eea95e5a6fc2905ce511ac4956e</id>
<content type='text'>
Light documentation for our various functions and types.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Light documentation for our various functions and types.
</pre>
</div>
</content>
</entry>
</feed>
