Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdeodato Simó <dato@net.com.org.es>2008-03-07 23:22:17 +0300
committerJunio C Hamano <gitster@pobox.com>2008-03-08 21:46:10 +0300
commit655e8515f279c01f525745d443f509f97cd805ab (patch)
tree7c315be248e1ed542366644ed9589754cb6dbf8b /fast-import.c
parent972b9a85301e1576c0fb84555396015663a65452 (diff)
Really make the LF after reset in fast-import optional
cmd_from() ends with a call to read_next_command(), which is needed when using cmd_from() from commands where from is not the last element. With reset, however, "from" is the last command, after which the flow returns to the main loop, which calls read_next_command() again. Because of this, always set unread_command_buf in cmd_reset_branch(), even if cmd_from() was successful. Add a test case for this in t9300-fast-import.sh. Signed-off-by: Adeodato Simó <dato@net.com.org.es> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 9b71ccc479..32ec159915 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2261,7 +2261,8 @@ static void cmd_reset_branch(void)
else
b = new_branch(sp);
read_next_command();
- if (!cmd_from(b) && command_buf.len > 0)
+ cmd_from(b);
+ if (command_buf.len > 0)
unread_command_buf = 1;
}