[RFC] On how to manage tags fetched from remote?

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

 



The application field:

I use one git working tree to track many remote git repository:

 $ git remote -v
 227-archives	ssh://192.168.3.227/vmos/linux-with-dm-patches.git
 block	git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
 btrfs	git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git
 cryptodev	git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
 djbw-md	git://git.kernel.org/pub/scm/linux/kernel/git/djbw/md.git
 dk-block	git://git.kernel.dk/linux-2.6-block
 fastboot	git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
 gfs2-2.6-nmw	git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw.git
 linux-2.6-stable	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git
 linux-2.6-target	git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-target.git
 linux-iscsi	git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git
 linux-mm-trees	git://git.kernel.org/pub/scm/linux/kernel/git/smurf/linux-trees.git
 linux-nfs-server	git://git.linux-nfs.org/projects/bfields/linux.git
 lio-core-2.6	git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git
 ocfs2	git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git
 origin	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 rostedt-rt	git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-rt.git
 staging	git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
 tj-misc	git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git
 tytso-ext4	git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
 utrace	git://git.kernel.org/pub/scm/linux/kernel/git/frob/utrace.git
 v16.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git
 v21.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.21.y.git
 v22.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.22.y.git
 v23.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.23.y.git
 v24.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.24.y.git
 v25.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y.git
 v26.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.26.y.git
 v27.y	git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y.git
 xfs	git://oss.sgi.com:8090/xfs/xfs-2.6.git

Among them only 227-archives is where I will push to, others are all fetch only,

When I want to update, I just issue a "git remote -v update" command,

I'd like tags from origin, and from the stable kernel team, those tags
are all named well,
like v2.6.27, v2.6.27.1, v2.6.28-rc1, ...

But some tags from some other developeres are named bad, some tags named origin,
or named block, which will be ambigous when I want to refer a local remote name.

Asking every developer to delete their ambigous tag name is very troublesome!

The problem is because tags have no namespace, not similar to remote
branches have
namespaces which I named for the remote. Like this command: "git branch -a":

  master
  my-test
  block/bfq
  block/blktrace
  block/cmdfilter
  block/dynpipe
  block/fcache
  block/for-linus
  djbw-md/for-neil
  ...

The local branch have no namespace, while remote branches all have
their remote name first.

One solution to avoid the ambigous names is that give tags namespaces,
too; But then a tag
will not be a simple tag anymore;

Another approach is not fetching tags from remotes which have ambigous
tag names; the current
git implementation will need I run "git fetch -n <remote>" many times,
I cannot use just one
"git remote -v update";

To achieve one "git remote -v update", there are two approaches, too:
1. Bypassing any switches or other arguments after "git remote udpate"
directly to git fetch,
  then "git remote update -n" will call "git fetch -n";
  But this will disable all tags in all remotes;
2. Store a no-tags config item to the remote config, which like:
  [remote "linux-iscsi"]
	url = git://git.kernel.org/pub/scm/linux/kernel/git/mnc/linux-2.6-iscsi.git
	fetch = +refs/heads/*:refs/remotes/linux-iscsi/*
	fetch-tags = false
  when git fetch read the no-tags config, it will disable tags from this remote;

I think the last approach is the best, and most feasible;

However, please comment. Thanks.

-- 
Cheng Renquan, Shenzhen, China
Steven Wright  - "Cross country skiing is great if you live in a small country."
--
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]

  Powered by Linux