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 issue with repo push to empty repo #11653

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

Conversation

HellGhost
Copy link

@HellGhost HellGhost commented Nov 14, 2022

While trying to create private repository

After execution of:
pod repo push TEST <SPEC_NAME>.podspec --allow-warnings --use-json

I have a message then nothing changed
/usr/bin/git -C <PATH>/Specs status --porcelain
?? Specs/2/
- [No change] CAClient-debug (1.0.0)

so only after adding --untracked-files=all or -uall
git status --untracked-files=all --porcelain
git status retruns full path of untracked changes
?? Specs/2/0/a/<POD_NAME>/1.0.0/<POD_NAME>.podspec.json

this fix could solve the problem with untracked files which was added

@@ -166,7 +166,7 @@ def validate_podspec_files
# @return [void]
#
def check_repo_status
porcelain_status, = Executable.capture_command('git', %w(status --porcelain), :capture => :merge, :chdir => repo_dir)
porcelain_status, = Executable.capture_command('git', %w(status --untracked-files=all --porcelain), :capture => :merge, :chdir => repo_dir)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we want this change because this would start failing for any spec repo that has untracked files in it, which would not happen today

@@ -231,7 +231,7 @@ def add_specs_to_repo
end

# only commit if modified
if repo_git('status', '--porcelain').include?(spec.name)
if repo_git('status', '--untracked-files=all', '--porcelain').include?(spec.name)
Copy link
Member

Choose a reason for hiding this comment

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

perhaps we should pass in spec.name to the git status invocation so we only check that single file, rather than potentially looking at a large amount of untracked 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.

None yet

2 participants