Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCHv2] clone: fix refspec on "--single-branch" option

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:45

Possibly related (same subject, not in this thread)

Ralf Thielow [off-list ref] writes:
+			else if (remote_head_points_at)
+					strbuf_addf(&value, "+%s:%s%s", our_head_points_at->name,
+									branch_top.buf, prettify_refname(remote_head_points_at->name));
As refspec maps names that appear on the source side to names that
appear on the destination side, and for fetch, the "soruce side"
is the remote, using "our_head_points_at" on the source side makes
it look very fishy (even though it may be a name derived from
remote_head_points_at and has the correct and appropriate value).

"prettify" also is very questionable.  It is meant to strip commonly
known prefix to make it easier to read by humans, and we can change
its result based solely on aesthetics in the future.  It is not
suitable for coming up with a value for configuration in the longer
term.

Can we make the part you moved de-dented a bit, perhaps by making it
into a small helper function or something?  It is extremely hard to
read with overly looooooong lines.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help