On Tue, Aug 16, 2011 at 19:49, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote: > On Tue, Aug 16, 2011 at 12:16 AM, Shawn Pearce > Yes, I think a user > who is making a shallow clone should only get the >> HEAD branch to the depth specified, nothing else. If they want >> additional branches, they should either pass them on the command line >> to a new flag for clone, or modify their fetch configuration >> after-the-fact and fetch those separately. > > I'd like maintain all refs of the repo, even though we though we only > have objects for one branch. If I do a shallow clone and want to > change branch, I could just list available branch locally instead of > going to gitweb.somewhere for the branch name. > > Do we have someway to represent a ref placeholder? Not currently, no. I haven't checked refs.c, but you may be able to create an empty (0 byte) ref file for each remote reference we didn't obtain. These should be ignored since they aren't a valid reference.. Though they might cause warnings to be sent to stderr on every command, since they exist in the refs directory but aren't a valid reference. Of course a placeholder ref cannot be used as a starting point to checkout something, can it? It has no commit object available. So if you did decide to checkout a placeholder, you would need to first fetch that placeholder. So why not use git ls-remote to list the remotely available branches? -- Shawn. -- 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