提交 dff9d65d 编写于 作者: F Florian Achleitner 提交者: Junio C Hamano

Add explanatory comment for transport-helpers refs mapping.

The patch below adds a comment to fetch_with_import() explaining the
loop that saves the fetched commit names after 'git fast-import' has
done its work.  It avoids some confusion about which refs the
fast-import stream is supposed to use to write its result.
Signed-off-by: NFlorian Achleitner <florian.achleitner.2.6.31@gmail.com>
Helped-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 425b8a22
......@@ -444,6 +444,21 @@ static int fetch_with_import(struct transport *transport,
free(fastimport.argv);
fastimport.argv = NULL;
/*
* The fast-import stream of a remote helper that advertises
* the "refspec" capability writes to the refs named after the
* right hand side of the first refspec matching each ref we
* were fetching.
*
* (If no "refspec" capability was specified, for historical
* reasons we default to *:*.)
*
* Store the result in to_fetch[i].old_sha1. Callers such
* as "git fetch" can use the value to write feedback to the
* terminal, populate FETCH_HEAD, and determine what new value
* should be written to peer_ref if the update is a
* fast-forward or this is a forced update.
*/
for (i = 0; i < nr_heads; i++) {
char *private;
posn = to_fetch[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册