lkml.org 
[lkml]   [2006]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [stable] [PATCH 1/2] sd: fix memory corruption by sd_read_cache_type
Linus Torvalds wrote:
>
> On Sun, 26 Feb 2006, Al Viro wrote:
>
>>ObGit: is there any way to fetch _all_ branches from remote, creating local
>>branches with the same names if they didn't exist yet? Ot, at least, get
>>the full list of branches existing in the remote repository...
>
>
> The magic is "git-ls-remote". In particular, the "--heads" flag limits it
> to just showing branch heads.
>
> Then you can feed that into "git fetch", which takes the format
> "localname:remotename" to tell it how to fetch.
>
> In other words, something like
>
> git fetch remote $(git ls-remote --heads remote | awk '{print $2":"$2}')
>
> should do what you asked for.

Any chance we could get 'git fetch --heads' ?

FWIW, I regularly blow away and create new heads, so the above is rather
long for people who use my repos. A lot of them use rsync because when
you're tracking a repo with ever-changing branches, 'git pull' doesn't
really approximate "make local X look like remote X".

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-26 09:45    [W:0.228 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site