{"record":{"id":"0e93c335f6ff52ac","repo":"ytti/oxidized","slug":"first-e-message-was-raised-while-opening-git","errorCode":null,"errorMessage":"first '#{e.message}' was raised while opening git repo, then '#{create_error.message}' was while trying to create git repo","messagePattern":"first '#(.+?)' was raised while opening git repo, then '#(.+?)' was while trying to create git repo","errorType":"exception","errorClass":"Oxidized::Output::Git::GitError","httpStatus":null,"severity":"error","filePath":"lib/oxidized/output/git.rb","lineNumber":301,"sourceCode":"          if @cfg.single_repo?\n            file = ::File.join @opt[:group], file\n          else\n            repo = if repo.is_a?(::String)\n                     ::File.join ::File.dirname(repo), @opt[:group] + '.git'\n                   else\n                     repo[@opt[:group]]\n                   end\n          end\n        end\n\n        begin\n          repo = Rugged::Repository.new repo\n          update_repo repo, file, data\n        rescue Rugged::OSError, Rugged::RepositoryError => e\n          begin\n            Rugged::Repository.init_at repo, :bare\n          rescue StandardError => create_error\n            raise GitError, \"first '#{e.message}' was raised while opening git repo, then '#{create_error.message}' \" \\\n                            \"was while trying to create git repo\"\n          end\n          retry\n        end\n      end\n\n      # Uploads data into file in the repository repo\n      #\n      # update_repo caches the index on disk. An index is usually used in a\n      # working directory and not in a bare repository, which confuses users.\n      # The alternative would be to rebuild the index each time, which a little\n      # time consuming. Caching the index in memory is difficult because a new\n      # Output object is created each time #store is called.\n      def update_repo(repo, file, data) # rubocop:disable Naming/PredicateMethod\n        oid_old = repo.blob_at(repo.head.target_id, file) rescue nil\n        return false if oid_old && (oid_old.content.b == data.b)\n\n        oid = repo.write data, :blob","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/ytti/oxidized/blob/687ed4262d9d21e54662e872e2383386d8498f7b/lib/oxidized/output/git.rb#L283-L319","documentation":"Error \"first '#{e.message}' was raised while opening git repo, then '#{create_error.message}' was while trying to create git repo\" thrown in ytti/oxidized.","triggerScenarios":"Thrown at lib/oxidized/output/git.rb:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"687ed4262d9d21e54662e872e2383386d8498f7b","analyzedAt":"2026-08-23T11:19:42.084Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}