// Path: src/main/java/uk/ac/ic/wlgitbridge/git/servlet/WLGitServlet.java
// public class WLGitServlet extends GitServlet {
// 
//     /**
//      * Constructor that sets all of the resolvers and factories for the
//      * {@link GitServlet}.
//      *
//      * Also needs to call init with a config ({@link WLGitServletConfig}, as
//      * required by the {@link GitServlet}.
//      * @param ctxHandler
//      * @param bridge
//      * @throws ServletException
//      */
//     public WLGitServlet(
//             ServletContextHandler ctxHandler,
//             RepoStore repoStore,
//             Bridge bridge
//     ) throws ServletException {
//         setRepositoryResolver(new WLRepositoryResolver(bridge));
//         setReceivePackFactory(new WLReceivePackFactory(repoStore, bridge));
//         setUploadPackFactory(new WLUploadPackFactory());
//         init(new WLGitServletConfig(ctxHandler));
//     }
// 
// }
// 
// Path: src/main/java/uk/ac/ic/wlgitbridge/util/Log.java
// public class Log {
// 
//     private static Logger logger = LoggerFactory.getLogger(GitBridgeApp.class);
// 
//     public static void trace(String msg) {
//         logger.trace(msg);
//     }
// 
//     public static void trace(String msg, Throwable t) {
//         logger.trace(msg, t);
//     }
// 
//     public static void debug(String msg) {
//         logger.debug(msg);
//     }
// 
//     public static void debug(String msg, Throwable t) {
//         logger.debug(msg, t);
//     }
// 
//     public static void info(String msg) {
//         logger.info(msg);
//     }
// 
//     public static void info(String format, Object arg) {
//         logger.info(format, arg);
//     }
// 
//     public static void info(String format, Object arg1, Object arg2) {
//         logger.info(format, arg1, arg2);
//     }
// 
//     public static void info(String format, Object... args) {
//         logger.info(format, args);
//     }
// 
//     public static void info(String msg, Throwable t) {
//         logger.info(msg, t);
//     }
// 
//     public static void warn(String msg) {
//         logger.warn(msg);
//     }
// 
//     public static void warn(String msg, Object arg) {
//         logger.warn(msg, arg);
//     }
// 
//     public static void warn(String msg, Object arg1, Object arg2) {
//         logger.warn(msg, arg1, arg2);
//     }
// 
//     public static void warn(String msg, Object... args) {
//         logger.warn(msg, args);
//     }
// 
//     public static void warn(String msg, Throwable t) {
//         logger.warn(msg, t);
//     }
// 
//     public static void error(String msg) {
//         logger.error(msg);
//     }
// 
//     public static void error(String msg, Object... args) {
//         logger.error(msg, args);
//     }
// 
//     public static void error(String msg, Throwable t) {
//         logger.error(msg, t);
//     }
// 
// }


import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.UploadPack;
import org.eclipse.jgit.transport.resolver.UploadPackFactory;
import uk.ac.ic.wlgitbridge.git.servlet.WLGitServlet;
import uk.ac.ic.wlgitbridge.util.Log;
import javax.servlet.http.HttpServletRequest;
package uk.ac.ic.wlgitbridge.git.handler;



/**
 * Created by Winston on 02/11/14.
 */
/**
 * One of the "big three" interfaces created by {@link WLGitServlet} to handle
 * user Git requests.
 *
 * The actual class doesn't do much, and most of the work is done when the
 * project name is being resolved by the {@link WLRepositoryResolver}.
 */
public class WLUploadPackFactory
        implements UploadPackFactory<HttpServletRequest> {

    /**
     * This does nothing special. Synchronising the project with Overleaf will
     * have been performed by {@link WLRepositoryResolver}.
     * @param __ Not used, required by the {@link UploadPackFactory} interface
     * @param repository The JGit repository provided by the
     * {@link WLRepositoryResolver}
     * @return the {@link UploadPack}, used by JGit to serve the request
     */
    @Override
    public UploadPack create(
            HttpServletRequest __,
            Repository repository
    ) {
// Path: src/main/java/uk/ac/ic/wlgitbridge/git/servlet/WLGitServlet.java
// public class WLGitServlet extends GitServlet {
// 
//     /**
//      * Constructor that sets all of the resolvers and factories for the
//      * {@link GitServlet}.
//      *
//      * Also needs to call init with a config ({@link WLGitServletConfig}, as
//      * required by the {@link GitServlet}.
//      * @param ctxHandler
//      * @param bridge
//      * @throws ServletException
//      */
//     public WLGitServlet(
//             ServletContextHandler ctxHandler,
//             RepoStore repoStore,
//             Bridge bridge
//     ) throws ServletException {
//         setRepositoryResolver(new WLRepositoryResolver(bridge));
//         setReceivePackFactory(new WLReceivePackFactory(repoStore, bridge));
//         setUploadPackFactory(new WLUploadPackFactory());
//         init(new WLGitServletConfig(ctxHandler));
//     }
// 
// }
// 
// Path: src/main/java/uk/ac/ic/wlgitbridge/util/Log.java
// public class Log {
// 
//     private static Logger logger = LoggerFactory.getLogger(GitBridgeApp.class);
// 
//     public static void trace(String msg) {
//         logger.trace(msg);
//     }
// 
//     public static void trace(String msg, Throwable t) {
//         logger.trace(msg, t);
//     }
// 
//     public static void debug(String msg) {
//         logger.debug(msg);
//     }
// 
//     public static void debug(String msg, Throwable t) {
//         logger.debug(msg, t);
//     }
// 
//     public static void info(String msg) {
//         logger.info(msg);
//     }
// 
//     public static void info(String format, Object arg) {
//         logger.info(format, arg);
//     }
// 
//     public static void info(String format, Object arg1, Object arg2) {
//         logger.info(format, arg1, arg2);
//     }
// 
//     public static void info(String format, Object... args) {
//         logger.info(format, args);
//     }
// 
//     public static void info(String msg, Throwable t) {
//         logger.info(msg, t);
//     }
// 
//     public static void warn(String msg) {
//         logger.warn(msg);
//     }
// 
//     public static void warn(String msg, Object arg) {
//         logger.warn(msg, arg);
//     }
// 
//     public static void warn(String msg, Object arg1, Object arg2) {
//         logger.warn(msg, arg1, arg2);
//     }
// 
//     public static void warn(String msg, Object... args) {
//         logger.warn(msg, args);
//     }
// 
//     public static void warn(String msg, Throwable t) {
//         logger.warn(msg, t);
//     }
// 
//     public static void error(String msg) {
//         logger.error(msg);
//     }
// 
//     public static void error(String msg, Object... args) {
//         logger.error(msg, args);
//     }
// 
//     public static void error(String msg, Throwable t) {
//         logger.error(msg, t);
//     }
// 
// }


// Path: src/main/java/uk/ac/ic/wlgitbridge/git/handler/WLUploadPackFactory.java
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.UploadPack;
import org.eclipse.jgit.transport.resolver.UploadPackFactory;
import uk.ac.ic.wlgitbridge.git.servlet.WLGitServlet;
import uk.ac.ic.wlgitbridge.util.Log;
import javax.servlet.http.HttpServletRequest;

package uk.ac.ic.wlgitbridge.git.handler;



/**
 * Created by Winston on 02/11/14.
 */
/**
 * One of the "big three" interfaces created by {@link WLGitServlet} to handle
 * user Git requests.
 *
 * The actual class doesn't do much, and most of the work is done when the
 * project name is being resolved by the {@link WLRepositoryResolver}.
 */
public class WLUploadPackFactory
        implements UploadPackFactory<HttpServletRequest> {

    /**
     * This does nothing special. Synchronising the project with Overleaf will
     * have been performed by {@link WLRepositoryResolver}.
     * @param __ Not used, required by the {@link UploadPackFactory} interface
     * @param repository The JGit repository provided by the
     * {@link WLRepositoryResolver}
     * @return the {@link UploadPack}, used by JGit to serve the request
     */
    @Override
    public UploadPack create(
            HttpServletRequest __,
            Repository repository
    ) {
        Log.info(