Skip to content

Conversation

behnazh-w
Copy link
Member

For analyzing local repositories in offline mode, we should not fetch from origin/HEAD because user might want to run Macaron on the local changes. This PR changes the check_out_repo_target function to fix this issue: if branch_name and a commit are not provided, this function will not do anything and the latest local commit will be analyzed. If there are uncommitted local changes, the latest commit will appear in the report but the repo with local changes will be analyzed. We leave it up to the user to decide whether to commit the changes or not.

Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
@behnazh-w behnazh-w requested a review from tromai as a code owner May 11, 2024 07:52
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 11, 2024
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
@behnazh-w behnazh-w force-pushed the behnazh/fix-local-repo branch from 6be72eb to 4fc565f Compare May 13, 2024 05:44
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
Copy link
Member

@tromai tromai left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. LGTM

@behnazh-w behnazh-w merged commit 9c2e639 into staging May 14, 2024
@behnazh-w behnazh-w deleted the behnazh/fix-local-repo branch May 15, 2024 00:53
art1f1c3R pushed a commit that referenced this pull request Nov 29, 2024
For analyzing local repositories in offline mode, we should not fetch from origin/HEAD because user might want to run Macaron on the local changes. This PR changes the check_out_repo_target function to fix this issue: if branch_name and a commit are not provided, this function will not do anything and the HEAD commit will be analyzed. If there are uncommitted local changes, the HEAD commit will appear in the report but the repo with local changes will be analyzed. We leave it up to the user to decide whether to commit the changes or not.

Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants