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

Re: [PATCH] Make gc a builtin.

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:42:59

Possibly related (same subject, not in this thread)

James Bowes [off-list ref] wrote:
Signed-off-by: James Bowes <redacted>
ACK.  Very nicely done.

...
+	if (pack_refs && run_command_v_opt(argv_pack_refs, RUN_GIT_CMD))
+		return error(FAILED_RUN, argv_pack_refs[0]);
+
+	if (run_command_v_opt(argv_reflog, RUN_GIT_CMD))
+		return error(FAILED_RUN, argv_reflog[0]);
+
+	if (run_command_v_opt(argv_repack, RUN_GIT_CMD))
+		return error(FAILED_RUN, argv_repack[0]);
+
+	if (prune && run_command_v_opt(argv_prune, RUN_GIT_CMD))
+		return error(FAILED_RUN, argv_prune[0]);
+
+	if (run_command_v_opt(argv_rerere, RUN_GIT_CMD))
+		return error(FAILED_RUN, argv_rerere[0]);
And isn't the above so much more readable than this mess?
-test "true" != "$pack_refs" ||
-git-pack-refs --prune &&
-git-reflog expire --all &&
-git-repack -a -d -l &&
-$no_prune git-prune &&
-git-rerere gc || exit
Which is why I like builtins, and why I think Dscho does too.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help