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 a script to generate the diff between 2 branches #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bhaal22
Copy link
Contributor

@Bhaal22 Bhaal22 commented Mar 16, 2017

No description provided.

@Bhaal22 Bhaal22 requested review from mbrt and dhurum March 16, 2017 15:41
Copy link
Contributor

@mbrt mbrt left a comment

Choose a reason for hiding this comment

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

I think the name of the command can be improved. Maybe diff-common-files?

COMMON_ANCESTOR=$(git merge-base $LEFT_COMMIT $RIGHT_COMMIT)
FILES=$(git show --pretty="" --name-only $COMMON_ANCESTOR..HEAD)

git diff $STAT $LEFT_COMMIT $RIGHT_COMMIT $FILES
Copy link
Contributor

Choose a reason for hiding this comment

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

There is the risk to hit the max command line length when there are a lot of files

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.

2 participants