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

no changes detected when files are only added #153

Open
BalzGuenat opened this issue May 7, 2019 · 3 comments
Open

no changes detected when files are only added #153

BalzGuenat opened this issue May 7, 2019 · 3 comments

Comments

@BalzGuenat
Copy link

git diff is used to determine whether there are any changes. git diff is empty if only new, untracked files are added. This halts the migration process and asks the user for input.

I suggest one of the following solutions:

  1. Use git status instead of git diff.
  2. Use git add -A, then git diff --cached, i.e. stage earlier.
@WtfJoke
Copy link
Member

WtfJoke commented May 10, 2019

Hi Balz

Thanks for reaching out for this! :)
In fact we use git status in some context (handling ignores) already.
Im cant exactly remember why we have choosen git diff instead of git status, but I think I didnt want to have any accidently .jazz folders added.

I will keep this open and make some tests with it. Could probably take some time (since I dont have much free time nor a testing workspace).

@BalzGuenat
Copy link
Author

diff has the nice property of a changing exit code depending on whether there are changes or not. status doesn't have that I believe, so is harder to work with.

I tried out option 2 and found no problems migrating a ~400 change set repo. If you want I can make a pull request.

@WtfJoke
Copy link
Member

WtfJoke commented May 12, 2019

Sure, would be glad if you make a pull request.

As I said probably take some time until I can merge it.

BalzGuenat pushed a commit to BalzGuenat/rtc2git that referenced this issue May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants