Re: Again Git help needed (Was: Bug#682205: ITP: heasoft-fv -- General FITS file browser/editor/plotter with a gui)
Le Sat, Jul 21, 2012 at 09:38:40PM +0200, Andreas Tille a écrit :
>
> I learned again that a `git clone` is something else than `gbp-clone
> --all` (and I again wonder what might be the sense of *cloning* if I do
> not get every branch. It seems git is following some logic which I do
> not understand.
>
> Anyway after
>
> gbp-clone --all git+ssh://tille@git.debian.org/git/debian-science/packages/heasoft-fv.git
> git checkout debian
>
> I was able to inspect the debian/ dir. Unfortunately even after commiting
> and pushing a slight change the repository on git.debian.org obviosely has
> a problem. The machine readable gatherer does something like
>
> wagner:/git/debian-science/packages/heasoft-fv.git$ git show HEAD:debian/changelog
> fatal: Invalid object name 'HEAD'.
>
> Any idea what might be wrong with this Git repository because for other
> repositories this command just outputs the changelog file.
Hi Andreas and everybody,
the next version of the Debian policy is likely to contain a subsection such
as:
<sect1 id="f-VCS-fields">
<heading>Version Control System (VCS) fields</heading>
<p>
Debian source packages are increasingly developed using VCSs. The
purpose of the following fields is to indicate a publicly accessible
repository where the Debian source package is developed.
<taglist>
<tag><tt>Vcs-Browser</tt></tag>
<item>
<p>
URL of a web interface for browsing the repository.
</p>
</item>
<tag>
<tt>Vcs-Arch</tt>, <tt>Vcs-Bzr</tt> (Bazaar), <tt>Vcs-Cvs</tt>,
<tt>Vcs-Darcs</tt>, <tt>Vcs-Git</tt>, <tt>Vcs-Hg</tt>
(Mercurial), <tt>Vcs-Mtn</tt> (Monotone), <tt>Vcs-Svn</tt>
(Subversion)
</tag>
<item>
<p>
The field name identifies the VCS. The field's value uses the
version control system's conventional syntax for describing
repository locations and should be sufficient to locate a
publicly accessible repository used for packaging.
Ideally, it also locates the branch used for development of
new versions of the Debian package.
</p>
<p>
In the case of Git, the value consists of a URL, optionally
followed by the word <tt>-b</tt> and the name of a branch in
the indicated repository, following the syntax of the
<tt>git clone</tt> command. If no branch is specified, the
packaging should be on the default branch.
</p>
<p>
More than one different VCS may be specified for the same
package.
</p>
</item>
</taglist>
</p>
</sect1>
(http://bugs.debian.org/654958)
So in case of heasoft-fv.git, its VCS URL should contain '-b debian' since this
is the branch where development is done. Or perhaps it ca be modified to
follow the standard layout of git-buildpackage (master, upstream,
pristine-tar), as many contributors are more familiar with it. In this layout,
the usptream branch contains the filtered sources that are used to generate the
"~dfsg" tarball.
By the way, "git-clone" is really fetching all the data. It is just that by
default, it only shows the master branch. But the command "git branch -a"
shows all the other branches available for "git checkout".
$ git clone git://git.debian.org/debian-science/packages/heasoft-fv.git
Cloning into 'heasoft-fv'...
remote: Counting objects: 3760, done.
remote: Compressing objects: 100% (3033/3033), done.
remote: Total 3760 (delta 695), reused 3760 (delta 695)
Receiving objects: 100% (3760/3760), 16.95 MiB | 3.32 MiB/s, done.
Resolving deltas: 100% (695/695), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
$ cd heasoft-fv
$ git branch -a
remotes/origin/debian
remotes/origin/upstream
remotes/origin/upstream+dfsg
$ git checkout debian
Branch debian set up to track remote branch debian from origin.
Switched to a new branch 'debian'
$ ls
BUILD_DIR debian ftools tcltk
Have a nice day,
--
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan
Reply to: