|
|
Log in / Subscribe / Register

Git + launchpad

Git + launchpad

Posted May 6, 2015 8:17 UTC (Wed) by cebewee (guest, #94775)
In reply to: Git + launchpad by NAR
Parent article: Git code hosting beta (launchpadblog)

Of course you can undo interactive rebases in Git. The reflog (git log -g) is your friend.


to post comments

Git + launchpad

Posted May 6, 2015 9:36 UTC (Wed) by tpo (subscriber, #25713) [Link] (4 responses)

git log -g? First time I've heard of that.

<rant>
And *of course* there's also git's own virtual machine and C like language that can be used to fix further stuff, because you can't really expect to use such advanced machinery as a "commit" without knowing the third order relations of quantum git algebra.
</rant>

Git + launchpad

Posted May 6, 2015 12:31 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (2 responses)

What? Commit doesn't require that knowledge. It *helps* to know what git is doing behind the scenes, but is by no means necessary.

Git's flexibility let's me write a tool that uses one clone to spawn X empty directories in which to do manipulations on the repository (such as running hooks, merging, etc.) without actually checking a workdir out (an bottleneck when you do it thousands of times a day on large repositories). Now, most people don't need to know about things like update-index, ls-files, or read-tree, but I really don't know how'd I'd even approach the problem with another VCS while staying in the requirements (though I admit ignorance, at least to the same depth I know of git, of other tools) since I don't think they give me the same tools. It also let's me atomically write references out to avoid race conditions when these parallel workdirs write back notes to keep the work they do around from being garbage collected.

Git + launchpad

Posted May 6, 2015 15:36 UTC (Wed) by pboddie (guest, #50784) [Link] (1 responses)

By "without actually checking a workdir out", do you mean like Mercurial clones which have been updated to the null revision? (You get the .hg directory and nothing else.)

I imagine bzr permits the same, although my experience with bzr has been mostly to dip into some repository someone has asked me to look at, and to run some fairly intuitively-named commands, which did what I expected. Quite a contrast to Git, in fact.

(It seems to be the case that criticism of Git's usability is frequently met by retorts that it's an object filesystem and sink-cleaner all in one, and that the frustrated user should feel the power. The manpages, despite probably having had a few iterations, reinforce this impression: git-checkout is my current "favourite".)

Git + launchpad

Posted May 6, 2015 21:11 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

You make a file path and an empty directory, set GIT_INDEX_FILE and GIT_WORK_TREE in the environment pointing to those and set GIT_DIR pointing to the bare repository with all the objects. We then prep the index with the right revision (git read-tree), tell the index that the working tree is OK without hitting disk (git update-index), and then checkout the .gitmodules file (if it exists) (git checkout-index followed by git update-index to update it that there's a real file on disk now) so that submodules work properly. This can be done concurrently with a single clone of a repository and each chain of commands thinking they are working on a real thing (you need the directory so that conflict files have a place to be dropped).

So basically, can I work with a single clone from multiple directories at once where all of them think they are in their own little sandbox and don't interfere with each other (even to the point of avoiding race conditions when asking for available names in refs/)?

I agree that the git docs are not as end-user-oriented as they could be. I'm also not *too* concerned with intuitiveness (cf. my use of Vim, XMonad, tmux, uzbl, etc.), but rather that things *make sense*. As an example, the "standard" cut/copy/paste shortcuts are convenient, but are not composable like Vim's versions of them. That's what I like about git; it gives me a toolbox with some pre-made tools composed of the bare bits rather than a completed sawsall or something which, while nice, can't quite be made into a hammer when I need one without some sanity checks.

Git + launchpad

Posted May 6, 2015 20:45 UTC (Wed) by nix (subscriber, #2304) [Link]

Git's own what? It doesn't have a virtual machine, nor a C like language. Its revision specifiers look more like the shell than anything.

You may be thinking of Mercurial here (which *also* doesn't have a virtual machine of any sort, but which has ways to specify revisions that look more like a conventional programming language).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds