{"thread":{"id":"304","subject":"[FILE] GNU BIT","startedAt":"2005-04-25T06:24:24Z","lastAt":"2005-04-25T21:46:17Z","messageCount":6,"participants":["Andreas Gal","Daniel Barkalow","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"1599","messageId":"Pine.LNX.4.58.0504242308460.6454@sam.ics.uci.edu","threadId":"304","inReplyTo":null,"subject":"[FILE] GNU BIT","fromName":"Andreas Gal","fromEmail":"gal@uci.edu","sentAt":"2005-04-25T06:24:24Z","receivedAt":"2005-04-25T06:24:24Z","isPatch":false,"sender":{"key":"gal@uci.edu","avatar":null},"body":"\n\n               BIT - a little bit like SCM\n   \n\nBIT is a training exercise in shell programming and is the result of\nmy attempts to wrap my head around GIT's inner working. BIT's\ncommand line interface should be very familiar to anyone who worked\nwith other(tm) SCM tools before. I try to not depend on custom \nGIT features. BIT uses the off-the-shelf GIT core tools distributed\nby Linus. This means that BIT has about 2% of the features of\nCogito. Also, it has about 0.1% of the user base of Cogito, so its\nprobably very broken and I really don't recommend using it.\n\nYou can obtain BIT from the following GIT repository:\n\nhttp://nil.ics.uci.edu/~gal/public/bit\n\nYou can use the GIT core utilities to pull and check-out BIT:\n\ninit-db\ncurl http://nil.ics.uci.edu/~gal/public/bit/HEAD > .git/HEAD\nhttp-pull -a `cat .git/HEAD` \\\n    http://nil.ics.uci.edu/~gal/public/bit\nread-tree `cat .git/HEAD`\ncheckout-cache -f -a\n\nNaturally, you can also use BIT to pull the current sources, which\nis much simpler:\n\nbit clone http://nil.ics.uci.edu/~gal/public/bit\n\nThis will create a directory \"bit\", pull the latest sources and perform\na check-out for you.\n\nINSTALLATION\n\nPut \"bit\" anywhere in your search path. Its only a single bash script. It\nrequires a link \"bit-resolve\" to itself and the (soft) link should reside\nin the same directory as \"bit\" itself. \"bit\" acts as merge script when\ninvoked through that link.\n\nAt this point, BIT's functionality is minimal. It does what I need it for.\nI will obviously add more commands as we go along, but I won't touch\nthings like tags and stuff like that until Linus' makes up his mind how to \ndo it *RIGHT*.\n\nBASIC CONCEPTS\n\n- BIT always checks out all files in your repository and it does so\n  automatically. In other words, there is no \"bit co\" command. Not\n  everyone will like this, but I do.\n- You can't seek around in a repository. Checked-out files always\n  match the HEAD revision. You can diff files against older versions,\n  but if you want to check out an older version, you will have to\n  clone the repository (see below).\n  \nTRACKING SOMEONE ELSE'S TREE  \n  \n$ bit clone http://www.kernel.org/pub/linux/kernel/people/torvalds/git.git/\n\n(Note: Don't forget the '/' at the end, otherwise http-pull won't work.)\n\nThis command pulls Linus' latest GIT tree to a local repository \"git.git\".\nYou can change the latter by giving clone an additional argument.\n  \n$ bit clone http://www.kernel.org/pub/linux/kernel/people/torvalds/git.git/ \\\n    git-trunk\n  \nOnce you have a copy of the remote repository, you can check whether there\nare new changesets in the remote repository that you haven't seen yet:\n  \n$ bit changes -R \\\n      http://www.kernel.org/pub/linux/kernel/people/torvalds/git.git/\n      \nIf you see any changes, you can merge them into your own tree:\n  \n$ bit pull http://www.kernel.org/pub/linux/kernel/people/torvalds/git.git/\n      \nBRANCHING\n\nNow lets assume you want to work on an extension to GIT. For this, we will\nclone the repository:\n  \n$ bit clone git-trunk git-bit\n  \nThis will create a copy of the git-trunk repository and name it \"git-bit\".\nThe object directory is shared (using a soft link), which has the nice\nbenefit that once you run \"bit pull\" on one of the repositories, the\nother one will be able to merge changes without any network traffic\n(except for reading the current HEAD).\n  \nLets say we make some changes to sha1_file.c and want to commit it to\nour local repository \"git-bit\":\n  \n... edit sha1_file.c ...\n  \nIn case we already forgot what file we edited, \"bit pending\" will tells us:\n  \n$ bit pending\nsha1_file.c\n  \nJust in case we still can remember what we changed, there is \"bit diffs\",\nwhich shows a diff to the current HEAD or any other version of our \ntree.\n  \n$ bit diffs\n--- 28ad1598e54200ca8ee1261ed7beb4e31e20b2f1/sha1_file.c\n+++ sha1_file.c\n@@ -70,6 +70,7 @@\n        int i;\n        static char *name, *base;\n \n+       /* added a cool new feature here */\n        if (!base) {\n                char *sha1_file_directory = getenv(DB_ENVIRONMENT) ? : ...\n                int len = strlen(sha1_file_directory);\n  \nTo commit our changes, we use \"bit commit\". It will fire up \"vi\" to ask for\na commit message.\n\n$ bit commit\n... enter commit message in vi ...\n\nMERGING\n\nLets assume Linus' put out a new version of GIT, so we want to update both of\nour repositories. First lets do this for \"git-trunk\".\n\n$ cd bit-trunk\n$ bit pull http://www.kernel.org/pub/linux/kernel/people/torvalds/git.git/\n\n(Note: You have to specify the URL explicitly every time because there is no\n consensus yet where to store this information. Once thats sorted out, this\n will be automatic, of course.)\n \nAs this repository only tracks Linus' sources, there should be no conflicts.\n\nNow lets go to our \"git-bit\" repository and do the same there:\n\n$ cd git-bit\n$ bit pull http://www.kernel.org/pub/linux/kernel/people/torvalds/git.git/\n\nBecause both repositories share the object directory, you will get away\nwith minimal network traffic. Conflicts are resolved using RCS merge. If\nthat fails, you have to edit the offending files yourself.\n\nPUSHING PATCHES UPSTREAM\n\nLets assume we want to send our improvements to Linus. For this, we can\nask changes to show us all local changes in our repository:\n\n$ bit changes -L \\\n      http://www.kernel.org/pub/linux/kernel/people/torvalds/git.git/\n      \nThere is currently no mechanism in BIT to generate patches automatically,\nbut I will add one shortly. What is working already is that you can\npush your repository to a remote location:\n\n$ bit push ssh://gal@sam.ics.uci.edu/.nfs/public_html/public/git/\n\nThis will update the remote repository via SSH and set HEAD to point\nto your latest version. Please note that you have to create a \nrepository at the remote location using \"init-db\".\n\nHELP\n\nTry \"bit --help\" to get some simple instructions how to use BIT. All\ncommands have builtin help as well. Try \"bit commit --help\". Not all\noptions are always implemented. Feel free to send me a patch."},{"id":"1615","messageId":"Pine.LNX.4.21.0504251134090.30848-100000@iabervon.org","threadId":"304","inReplyTo":"Pine.LNX.4.58.0504242308460.6454@sam.ics.uci.edu","subject":"Re: [FILE] GNU BIT","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-04-25T15:37:00Z","receivedAt":"2005-04-25T15:37:00Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Sun, 24 Apr 2005, Andreas Gal wrote:\n\n> http-pull -a `cat .git/HEAD` \\\n>     http://nil.ics.uci.edu/~gal/public/bit\n\nDon't forget the slash at the end... (one of us should probably fix that\nat some point; just stick a slash at the end of any URL without one)\n\nAlso, it has become customary to have URLs like .../public/bit.git/, since\nthe contents match a .git directory.\n\n\t-Daniel\n*This .sig left intentionally blank*\n\n"},{"id":"1646","messageId":"Pine.LNX.4.58.0504251257460.10788@sam.ics.uci.edu","threadId":"304","inReplyTo":"Pine.LNX.4.21.0504251134090.30848-100000@iabervon.org","subject":"Re: [FILE] GNU BIT","fromName":"Andreas Gal","fromEmail":"gal@uci.edu","sentAt":"2005-04-25T20:03:16Z","receivedAt":"2005-04-25T20:03:16Z","isPatch":false,"sender":{"key":"gal@uci.edu","avatar":null},"body":"\nI fixed this bug and another nasty one in \"bit pull\". The new version is \nup in its usual place:\n\nbit clone http://nil.ics.uci.edu/~gal/public/bit\n\n(You can't use pull because it was broken in the previous version.)\n\nAnother unrelated note: to add files to your repository, do \"bit commit \nfilename\". To remove a file, delete it and then do \"bit commit \ndeleted-filename\" (yes, I will add \"bit add\" and \"bit rm\" at some point).\n\nAndreas\n\nOn Mon, 25 Apr 2005, Daniel Barkalow wrote:\n\n> On Sun, 24 Apr 2005, Andreas Gal wrote:\n> \n> > http-pull -a `cat .git/HEAD` \\\n> >     http://nil.ics.uci.edu/~gal/public/bit\n> \n> Don't forget the slash at the end... (one of us should probably fix that\n> at some point; just stick a slash at the end of any URL without one)\n> \n> Also, it has become customary to have URLs like .../public/bit.git/, since\n> the contents match a .git directory.\n> \n> \t-Daniel\n> *This .sig left intentionally blank*\n> \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n"},{"id":"1651","messageId":"20050425205226.GG13467@pasky.ji.cz","threadId":"304","inReplyTo":"Pine.LNX.4.58.0504242308460.6454@sam.ics.uci.edu","subject":"Re: [FILE] GNU BIT","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-25T20:52:26Z","receivedAt":"2005-04-25T20:52:26Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Apr 25, 2005 at 08:24:24AM CEST, I got a letter\nwhere Andreas Gal <gal@uci.edu> told me that...\n> HELP\n> \n> Try \"bit --help\" to get some simple instructions how to use BIT. All\n> commands have builtin help as well. Try \"bit commit --help\". Not all\n> options are always implemented. Feel free to send me a patch.\n\nDo you intend to licence it as free software? Also, you call it \"GNU\nBIT\". Does that mean it is part of the GNU project?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"1655","messageId":"Pine.LNX.4.58.0504251430380.11722@sam.ics.uci.edu","threadId":"304","inReplyTo":"20050425205226.GG13467@pasky.ji.cz","subject":"Re: [FILE] GNU BIT","fromName":"Andreas Gal","fromEmail":"gal@uci.edu","sentAt":"2005-04-25T21:33:12Z","receivedAt":"2005-04-25T21:33:12Z","isPatch":false,"sender":{"key":"gal@uci.edu","avatar":null},"body":"\nbit contains various pieces and snippets from Linus' and your scripts and \nthus automatically falls under GPL. Maybe I should have stated that \nsomewhere explicitly, but its a 800 lines bash script for crying out loud. \nThe \"GNU\" part was actually more like a joke. If you feel offended by it, \nI am happy to remove it. Are there any trademark issues involved in using \n\"GNU\"?\n\nAndreas\n\nPS: Unrelated note. There is a GNU GIT project (some graphical file \nmanager thing or so).\n\nOn Mon, 25 Apr 2005, Petr Baudis wrote:\n\n> Dear diary, on Mon, Apr 25, 2005 at 08:24:24AM CEST, I got a letter\n> where Andreas Gal <gal@uci.edu> told me that...\n> > HELP\n> > \n> > Try \"bit --help\" to get some simple instructions how to use BIT. All\n> > commands have builtin help as well. Try \"bit commit --help\". Not all\n> > options are always implemented. Feel free to send me a patch.\n> \n> Do you intend to licence it as free software? Also, you call it \"GNU\n> BIT\". Does that mean it is part of the GNU project?\n> \n> -- \n> \t\t\t\tPetr \"Pasky\" Baudis\n> Stuff: http://pasky.or.cz/\n> C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n> \n"},{"id":"1659","messageId":"20050425214617.GH13467@pasky.ji.cz","threadId":"304","inReplyTo":"Pine.LNX.4.58.0504251430380.11722@sam.ics.uci.edu","subject":"Re: [FILE] GNU BIT","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-04-25T21:46:17Z","receivedAt":"2005-04-25T21:46:17Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Apr 25, 2005 at 11:33:12PM CEST, I got a letter\nwhere Andreas Gal <gal@uci.edu> told me that...\n> bit contains various pieces and snippets from Linus' and your scripts and \n> thus automatically falls under GPL. Maybe I should have stated that \n> somewhere explicitly, but its a 800 lines bash script for crying out loud. \n\nI skimmed over it briefly and admitelly didn't find anything\n*obviously* borrowed from my scripts, so I wanted to ask. It is worth\nnoting explicitly, I think.\n\n> The \"GNU\" part was actually more like a joke. If you feel offended by it, \n> I am happy to remove it. Are there any trademark issues involved in using \n> \"GNU\"?\n\nI was not offended, just confused. :-) I think it's better not to use\n\"GNU\" in the name if it's not part of the GNU project.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"}]}