All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch: Only call a new ref a "branch" if it's under refs/heads/.
@ 2012-04-11 14:29 marcnarc
  2012-04-12  5:52 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: marcnarc @ 2012-04-11 14:29 UTC (permalink / raw)
  To: git; +Cc: Marc Branchaud

From: Marc Branchaud <marcnarc@xiplink.com>

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
---

This has been a minor irritant in my life for a while now...  :)

 builtin/fetch.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/builtin/fetch.c b/builtin/fetch.c
index 65f5f9b..57be58a 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -298,8 +298,13 @@ static int update_local_ref(struct ref *ref,
 			what = _("[new tag]");
 		}
 		else {
-			msg = "storing head";
-			what = _("[new branch]");
+			if (!prefixcmp(ref->name, "refs/heads/")) {
+				msg = "storing head";
+				what = _("[new branch]");
+			} else {
+				msg = "storing ref";
+				what = _("[new ref]");
+			}
 			if ((recurse_submodules != RECURSE_SUBMODULES_OFF) &&
 			    (recurse_submodules != RECURSE_SUBMODULES_ON))
 				check_for_new_submodule_commits(ref->new_sha1);
-- 
1.7.10.1.g2bbc8

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-13 16:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 14:29 [PATCH] fetch: Only call a new ref a "branch" if it's under refs/heads/ marcnarc
2012-04-12  5:52 ` Jeff King
2012-04-12 20:15   ` Jens Lehmann
2012-04-12 20:36     ` Marc Branchaud
2012-04-12 20:42       ` Jens Lehmann
2012-04-12 21:05         ` Jeff King
2012-04-13  7:04           ` Jeff King
2012-04-13 16:25             ` [PATCH] submodules: recursive fetch also checks new tags for submodule commits Jens Lehmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.