Skip to content

Conversation

@liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Sep 13, 2023

Issue number: N/A


What is the current behavior?

We checked git diff to see if new screenshots were generated. If no new screenshots were generated then we print a user-friendly message informing the dev what happened. However, git diff does not account for untracked changes (i.e. new screenshots).

As a result, this prevented new screenshots from being committed.

What is the new behavior?

  • To fix this we use the -N flag which is short for --intent-to-add. This adds an entry with no content which causes the new screenshots to show up when running git diff. We later add the contents of the image.

Example test run of this working: https://github.com/ionic-team/ionic-framework/actions/runs/6174263712/job/16759260534

Does this introduce a breaking change?

  • Yes
  • No

Other information

@liamdebeasi liamdebeasi marked this pull request as ready for review September 13, 2023 15:41
@liamdebeasi liamdebeasi requested review from a team and mapsandapps and removed request for a team September 13, 2023 15:49
@liamdebeasi liamdebeasi added this pull request to the merge queue Sep 13, 2023
Merged via the queue into main with commit fd5a1ac Sep 13, 2023
@liamdebeasi liamdebeasi deleted the screenshot-intent branch September 13, 2023 16:14
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