git/progress.c

/*
 * Simple text-based progress display module for GIT
 *
 * Copyright (c) 2007 by Nicolas Pitre <[email protected]>
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#define GIT_TEST_PROGRESS_ONLY
#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "pager.h"
#include "progress.h"
#include "repository.h"
#include "strbuf.h"
#include "trace.h"
#include "trace2.h"
#include "utf8.h"
#include "parse.h"

#define TP_IDX_MAX

struct throughput {};

struct progress {};

static volatile sig_atomic_t progress_update;

/*
 * These are only intended for testing the progress output, i.e. exclusively
 * for 'test-tool progress'.
 */
int progress_testing;
uint64_t progress_test_ns =;
void progress_test_force_update(void)
{}


static void progress_interval(int signum UNUSED)
{}

static void set_progress_signal(void)
{}

static void clear_progress_signal(void)
{}

static int is_foreground_fd(int fd)
{}

static void display(struct progress *progress, uint64_t n, const char *done)
{}

static void throughput_string(struct strbuf *buf, uint64_t total,
			      unsigned int rate)
{}

static uint64_t progress_getnanotime(struct progress *progress)
{}

void display_throughput(struct progress *progress, uint64_t total)
{}

void display_progress(struct progress *progress, uint64_t n)
{}

static struct progress *start_progress_delay(const char *title, uint64_t total,
					     unsigned delay, unsigned sparse)
{}

static int get_default_delay(void)
{}

struct progress *start_delayed_progress(const char *title, uint64_t total)
{}

struct progress *start_progress(const char *title, uint64_t total)
{}

/*
 * Here "sparse" means that the caller might use some sampling criteria to
 * decide when to call display_progress() rather than calling it for every
 * integer value in[0 .. total).  In particular, the caller might not call
 * display_progress() for the last value in the range.
 *
 * When "sparse" is set, stop_progress() will automatically force the done
 * message to show 100%.
 */
struct progress *start_sparse_progress(const char *title, uint64_t total)
{}

struct progress *start_delayed_sparse_progress(const char *title,
					       uint64_t total)
{}

static void finish_if_sparse(struct progress *progress)
{}

static void force_last_update(struct progress *progress, const char *msg)
{}

static void log_trace2(struct progress *progress)
{}

void stop_progress_msg(struct progress **p_progress, const char *msg)
{}