Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for comparing two commits #428

Merged
merged 11 commits into from
Mar 23, 2014
Merged

Conversation

shiftkey
Copy link
Member

@shiftkey shiftkey commented Mar 8, 2014

  • add interface, implementation and response
  • add reactive implementation
  • unit tests
  • convention tests
  • integration tests
  • update commit model to use what's in Add comparing commits tags branches #433
  • tighten up parameter validation based on feedback

@hnrkndrssn hnrkndrssn mentioned this pull request Mar 8, 2014
3 tasks
@shiftkey
Copy link
Member Author

shiftkey commented Mar 8, 2014

Addresses one of the features in #333

@shiftkey
Copy link
Member Author

Right, review away

@hknielsen
Copy link

Have you testet your compare on the live API? Since your datamodel is not correct. I startet to make mine the same way but the commit model is not good enough :)
Look at this: https://github.com/hknielsen/octokit.net/commit/9c17bd3db8ec77dd5d2383bc312182131a758be4

@shiftkey
Copy link
Member Author

@hknielsen I have integration tests in here which use the live real API.

I'm happy to refine that model in another PR, just wanted to flag the possible duplication here.

@shiftkey
Copy link
Member Author

Added task to update commit model returned from API

@hknielsen
Copy link

@shiftkey As I can see you just count the commits, but not whats in them. The Commit model has a extra level, so you wont get the message or tree.

You could just add it here, since it does not really show anything about the commit besides the sha that you can use?

@hknielsen
Copy link

@shiftkey If you wont do it, I can just add it based on you pull request? :) the problem is I need the messages in the commit, thats why im so focust about it

@shiftkey
Copy link
Member Author

@hknielsen all good, I've made that change here.

Let me know if there's anything else I've overlooked here...

@hknielsen
Copy link

👍 thanks

public Commit Commit { get; set; }
public Author Committer { get; set; }
public string HtmlUrl { get; set; }
public IReadOnlyList<GitReference> Parents { get; set; }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs the DebuggerDisplay

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the base class

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah sorry yes :P

@hknielsen
Copy link

When will this get merged?

@shiftkey
Copy link
Member Author

Let everyone sleep on it. I don't think there'll be any sudden issues...

On Wed, Mar 19, 2014 at 9:33 PM, Harald Kjær Nielsen <
[email protected]> wrote:

When will this get merged?

Reply to this email directly or view it on GitHubhttps://github.com//pull/428#issuecomment-38027472
.

return _client.Repository.Commits.Compare(owner, name, @base, head).ToObservable();
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^^ :trollface: (I actually don't care. Just wondering if you do.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Care about what?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That little red mark there means the file doesn't end with a line ending. Some folks really care about that sort of thing. Others don't. it's like removing and sorting namespaces. I always do it, but I don't block a review for it. ;)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the reasons for needing the line ending is so you can stage lines and hunks in git gui, if there is no line endings it will give an error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so the PR summary screen is trolling me again:

screen shot 2014-03-20 at 10 15 50 pm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL :trollface: Here's what I seey

-594

One of the reasons for needing the line ending is so you can stage lines and hunks in git gui, if there is no line endings it will give an error.

That's just horrible. Git Gui should handle that.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree, have been thinking about making one that works and is better then that awfull tool :)
In my team we have made stylecop apart of the solution build so it always checks for the lineending, dont know if code analyzer have the same option but its maybe its something to add

@haacked
Copy link
Contributor

haacked commented Mar 19, 2014

So good. Just some really nitpicky shit. Also, it's not automatically mergeable. 😄

@shiftkey
Copy link
Member Author

@haacked should be all sorted, let me know if I've missed anything...

haacked added a commit that referenced this pull request Mar 23, 2014
@haacked haacked merged commit 428e6a5 into master Mar 23, 2014
@haacked haacked deleted the shiftkey/compare-two-commits branch March 23, 2014 16:29
@haacked
Copy link
Contributor

haacked commented Mar 23, 2014

Great stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants