https://github.com/git/git
Revision 646ac22bdf7f7011bb4c77647053416e892ce64d authored by Junio C Hamano on 11 January 2007, 22:58:47 UTC, committed by Junio C Hamano on 11 January 2007, 22:58:47 UTC
Often the user would do "/bin/rm foo" before telling git, but
then want to tell git about it.  "git rm foo" however would fail
because it cannot unlink(2) foo.

Treat ENOENT error return from unlink(2) as if a successful
removal happened.

Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 3b97fee
Raw File
Tip revision: 646ac22bdf7f7011bb4c77647053416e892ce64d authored by Junio C Hamano on 11 January 2007, 22:58:47 UTC
git-rm: do not fail on already removed file.
Tip revision: 646ac22
xdiff-interface.h
#ifndef XDIFF_INTERFACE_H
#define XDIFF_INTERFACE_H

#include "xdiff/xdiff.h"

struct xdiff_emit_state;

typedef void (*xdiff_emit_consume_fn)(void *, char *, unsigned long);

struct xdiff_emit_state {
	xdiff_emit_consume_fn consume;
	char *remainder;
	unsigned long remainder_size;
};

int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf);
int parse_hunk_header(char *line, int len,
		      int *ob, int *on,
		      int *nb, int *nn);
int read_mmfile(mmfile_t *ptr, const char *filename);

#endif
back to top