Skip to content

Commit 21bb7a9

Browse files
committed
Tidying
1 parent 6f3bd50 commit 21bb7a9

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/libfetchers/git-utils.cc

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -709,30 +709,11 @@ struct GitSourceAccessor : SourceAccessor
709709
}
710710
}
711711

712-
// Apply git filters including CRLF conversion for the final return
712+
// Apply git filters including CRLF conversion
713713
git_buf filtered = GIT_BUF_INIT;
714714
git_blob_filter_options opts = GIT_BLOB_FILTER_OPTIONS_INIT;
715-
/*
716-
if (git_object_type(state->root.get()) == GIT_OBJECT_COMMIT) {
717-
auto commit = peelObject<Commit>(state->root.get(), GIT_OBJECT_COMMIT);
718-
opts.attr_commit_id = *git_commit_id(commit.get());
719-
}
720-
*/
721-
/*
722-
git_oid oid;
723-
724-
int error = git_oid_fromstr(&oid, state->repo->getWorkdirRef()->c_str());
725-
if (error != 0) {
726-
const git_error *e = git_error_last();
727-
std::string errorMsg = e ? e->message : "Unknown error";
728-
git_buf_dispose(&filtered);
729-
throw std::runtime_error("Failed to filter blob: " + errorMsg + " " + state->repo->getWorkdirRef()->c_str());
730-
731-
}
732-
*/
733715

734716
git_oid oid;
735-
736717
if (git_oid_fromstr(&oid, state->gitRev.c_str()))
737718
throw Error("cannot convert '%s' to a Git OID", state->gitRev.c_str());
738719

@@ -749,10 +730,6 @@ struct GitSourceAccessor : SourceAccessor
749730
std::string result(filtered.ptr, filtered.size);
750731
git_buf_dispose(&filtered);
751732

752-
if (strcmp(path.c_str(), "/buildconf.bat")) {
753-
printInfo("readBlob(%s) ==> %s => %s", path, result.find("\r") != std::string::npos ? "yes" : "no", opts.attr_commit_id);
754-
}
755-
756733
return result;
757734
}
758735

0 commit comments

Comments
 (0)