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

Fix git diff command in CI script #2672

Merged
merged 1 commit into from Aug 1, 2014
Merged

Conversation

alfredxing
Copy link
Member

Addresses #2615 (comment).

Found this neat command that seems to work: git diff --name-only ..master. It shows all files changed in that pull request only (similar to the "Files Changed" tab on GitHub). I tested this on a few open PR's in this repo.

If it works well in script/proof we can consider using it in script/test as well.

@parkr
Copy link
Member

parkr commented Aug 1, 2014

Can you modify a site file in this PR then revert that change and squash? That interim commit should trigger the proof if all is well.

@ivantsepp
Copy link
Contributor

I'm not sure if that works? I tried it with #2007.

I've always used git diff --name-only $(git merge-base master HEAD) to mimic the "Files Changed" tab on Github.

Edit: Actually git diff --name-only master... seems to work as well

@alfredxing
Copy link
Member Author

Worked as expected: https://travis-ci.org/jekyll/jekyll/jobs/31436061#L126 (commit above disappeared due to squash).

@parkr parkr merged commit d8bb7f7 into jekyll:master Aug 1, 2014
parkr added a commit that referenced this pull request Aug 1, 2014
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants