Re: New to Git / Questions about single user / multiple projects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not toppost, and when responding cull the quoted part, 
so only those parts that are relevant to your reply are remaining.

On Wed, 19 Aug 2009, Rob wrote:

> Thanks all for all the answers :)
> 
> One last question based on the multiple projects issue:
> Is there a command that lists all your projects ?
> 
> My initial thought is that there probably isn't, as there is no
> relation between the project except the userID ?

No, there no git commands for listing all your projects.  BTW. you can
use different identities for different projects by setting it
in .git/config, i.e. in per-repository configuration file.


Simple solution, which finds only non-bare repositories, and which
can find false positives:

 $ find ~ -name ".git" -type d -print

More complicated solution, used by gitweb, requires Perl, not checked
that it works correctly, doesn't work with ancient repositories with
symlink HEAD.

 $ perl -e '
 use File::Find qw(find);
 my @list = ();
 find({follow_fast => 1, follow_skip => 2, dangling_symlinks => 0,
       wanted => sub {
         return if (m!^[/.]$!);
         return unless (-d $_);
         push @list, $_ if -e "$_/HEAD" 
       }});
 print join("\n", @list)."\n";
 '

-- 
Jakub Narebski
Poland
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]