On Fri, Nov 19, 2010 at 11:10 PM, Jeff King <peff@xxxxxxxx> wrote: > On Fri, Nov 19, 2010 at 07:26:57PM -0500, Martin von Zweigbergk wrote: > >> Yes, I did try that and I noticed that it worked, but it helps to know >> that it is not just by accident. I realize I was not very clear, but >> what I really was wondering if there is any advantage to using >> "git for-each-ref --format='%(upstream)' ${branch_name}" (as used by >> git pull) as compared to "git rev-parse @{upstream}" as suggested by >> Yann. ($branch_name in this case would be the current branch.) > > No, I don't think there is a reason to prefer one over the other these > days. When the instance in git-parse-remote was written (e9460a6, > 2009-06-12) @{upstream} did not yet exist (it came in 28fb843, > 2009-09-10). So for-each-ref was the only way to get the informationa Ah, I see. Now it is all clear. I should not have assumed that '%(upstream)' and '@{upstream}' were introduced at the same time. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html