Staging
v0.5.2
https://github.com/git/git
Revision d09e79cb1c474b3bb323356e6d1072922ab7ccb2 authored by Linus Torvalds on 16 November 2006, 19:47:22 UTC, committed by Junio C Hamano on 17 November 2006, 07:45:48 UTC
We used to complain that we cannot merge anything we fetched
with a local branch that does not exist yet.  Just treat the
case as a natural extension of fast forwarding and make the
local branch'es tip point at the same commit we just fetched.
After all an empty repository without an initial commit is an
ancestor of any commit.

[jc: I added a trivial test.  We've become sloppy but we should
 stick to the discipline of covering new behaviour with new
 tests. ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 73fbd33
Raw File
Tip revision: d09e79cb1c474b3bb323356e6d1072922ab7ccb2 authored by Linus Torvalds on 16 November 2006, 19:47:22 UTC
git-pull: allow pulling into an empty repository
Tip revision: d09e79c
run-command.h
#ifndef RUN_COMMAND_H
#define RUN_COMMAND_H

#define MAX_RUN_COMMAND_ARGS 256
enum {
	ERR_RUN_COMMAND_FORK = 10000,
	ERR_RUN_COMMAND_EXEC,
	ERR_RUN_COMMAND_WAITPID,
	ERR_RUN_COMMAND_WAITPID_WRONG_PID,
	ERR_RUN_COMMAND_WAITPID_SIGNAL,
	ERR_RUN_COMMAND_WAITPID_NOEXIT,
};

#define RUN_COMMAND_NO_STDIO 1
#define RUN_GIT_CMD	     2	/*If this is to be git sub-command */
int run_command_v_opt(int argc, const char **argv, int opt);
int run_command_v(int argc, const char **argv);
int run_command(const char *cmd, ...);

#endif
back to top