[Nix-dev] nix-prefetch-git & TopGit

Marc Weber marco-oweber at gmx.de
Wed Mar 16 19:59:08 CET 2011


Excerpts from ludo's message of Wed Mar 16 15:04:16 +0000 2011:
> I swear that \xe2\x80\x98tg remote --populate\xe2\x80\x99 /must/ be performed, otherwise you
> can run any 'tg' command.

s/can/can't/ ?

We agree on this.
Explain why you have to run any tg command, please. Which one do you
want to run? Pointing to repo is not enough to make me understand your
problem.

What makes your use case different from

  git checkout -tb {,origin/}NAME

NAME can be t/foo

> What wording would you suggest?
Simply dropping the word "problem" would be ok. I don't use the command so I
don't too much. However it may lead to wrong impressions when users who don't
know topgit at all read it.

I'd like to understand why you have to use topgit commands at all.
Because if you do so you'll create new hashes which will not be on
remote servers.

I've changed it to this in my local branches:

        else
-           echo "WARNING: would populate TopGit branches but TopGit is not available" >&2
-           echo "WARNING: install TopGit to fix the problem" >&2
+            # TODO: is this useful at all? Should for each remote branch a local branch be created?
+           echo "If you had installed TopGit I would have populated local topic branches" >&2
        fi

However the key point is understanding what you want to do and why you have to
run top-git commands yourself.

My understanding of nix-prefetch-* commands is that they should print a hash
only which you can copy paste ..

If we are at it: Can't we make it even smarter outputting full

src = fetchurl { ..  }

code rewriting urls by mirrors?

Marc Weber



More information about the nix-dev mailing list