{"thread":{"id":"1203","subject":"Re: Trial git RPM's..","startedAt":"2005-07-11T20:11:11Z","lastAt":"2006-12-02T21:33:56Z","messageCount":19,"participants":["Horst von Brand","Linus Torvalds","Junio C Hamano","Petr Baudis","Jakub Narebski","Jeff King","Horst H. von Brand","Sam Vilain"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"5986","messageId":"200507112011.j6BKBBwx011503@laptop11.inf.utfsm.cl","threadId":"1203","inReplyTo":"torvalds@osdl.org","subject":"Re: Trial git RPM's..","fromName":"Horst von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2005-07-11T20:11:11Z","receivedAt":"2005-07-11T20:11:11Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> wrote:\n> On Mon, 11 Jul 2005, Eric W. Biederman wrote:\n> > A couple of pieces.  The dist target has assumes git-tar-tree is in the\n> > path.  Making it so you have to have git installed to build the rpm.\n\n> Yes. Maybe we could relax that requirement by using \"./git-tar-tree\" or \n> something? That still requires that you have _built_ git to do the rpm, \n> but at least you won't have had to install it.\n\nI don't see a problem here. Sure, you need git to build git, so place it in\nBuild-requires: Need to install the binary to build the next from source,\nthat's all. Just like gcc ;-)\n\n[...]\n\n> > The man pages are not built. The build dependencies do not call out\n> > the tools necessary to build the man pages.\n\n> Most people don't have asciidoc, and I'm not sure we want to require it. \n> Maybe we could have a separate \"make man-rpm\" target for that?\n\nWould have to be a requirement for building anyway. There is a (not really\nnice) SRPM at <http://www.pvv.ntnu.no/~terjeros/rpms/asciidoc/>. Will see\nto clean it up.\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                     Fono: +56 32 654431\nUniversidad Tecnica Federico Santa Maria              +56 32 654239\nCasilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513\n"},{"id":"8654","messageId":"200509160415.j8G48Oto006070@inti.inf.utfsm.cl","threadId":"1203","inReplyTo":"torvalds@osdl.org","subject":"Re: \"Read my lips: no more merges\" - aka Linux 2.6.14-rc1","fromName":"Horst von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2005-09-16T04:08:24Z","receivedAt":"2005-09-16T04:08:24Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> wrote:\n> On Wed, 14 Sep 2005, Alejandro Bonilla Beeche wrote:\n> > \n> > debian:~# cd linux-2.6/\n> > debian:~/linux-2.6# git log\n> > /usr/local/bin/git-log-script: line 4: less: command not found\n> \n> A very strange Linux installation that doesn't come with \"less\"...\n> \n> What a strange box. Anyway, that does point out that maybe the git RPM \n> spec should have \"less\" as a dependency. \n\nYour wish is my command.\n\n----\nThe git commands assume less(1) as pager. This adds the dependency, as\nsuggested by Linus.\n\nSigned-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>\n\n\n---\n\n git-core.spec.in |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\n0abd0856f2cb750a019451c7547694f36e60e83b\ndiff --git a/git-core.spec.in b/git-core.spec.in\n--- a/git-core.spec.in\n+++ b/git-core.spec.in\n@@ -10,7 +10,7 @@ URL: \t\thttp://kernel.org/pub/software/sc\n Source: \thttp://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz\n BuildRequires:\tzlib-devel, openssl-devel, curl-devel  %{!?_without_docs:, xmlto, asciidoc > 6.0.3}\n BuildRoot:\t%{_tmppath}/%{name}-%{version}-root\n-Requires: \tsh-utils, curl, diffutils, rsync, rcs, openssh-clients, perl, python >= 2.4, tk\n+Requires: \tsh-utils, curl, diffutils, less, rsync, rcs, openssh-clients, perl, python >= 2.4, tk\n \n %description\n This is a stupid (but extremely fast) directory content manager.  It\n@@ -44,6 +44,9 @@ rm -rf $RPM_BUILD_ROOT\n %{!?_without_docs: %{_mandir}/man7/*.7*}\n \n %changelog\n+* Fri Sep 16 2005 Horst H. von Brand <vonbrand@inf.utfsm.cl>\n+- Linus noticed that less is required, added to the dependencies\n+\n * Sun Sep 11 2005 Horst H. von Brand <vonbrand@inf.utfsm.cl>\n - Updated dependencies\n - Don't assume manpages are gzipped\n"},{"id":"9520","messageId":"200509292317.j8TNHC7S022247@inti.inf.utfsm.cl","threadId":"1203","inReplyTo":"torvalds@osdl.org","subject":"Re: [howto] Kernel hacker's guide to git, updated","fromName":"Horst von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2005-09-29T23:17:12Z","receivedAt":"2005-09-29T23:17:12Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> wrote:\n\n[...]\n\n> Of course, pico is still pico. Which I find a bit sad: my editor of choise \n> is still an improved version of uemacs, and pico actually comes from the \n> same uemacs history, but has different key-bindings for just enough keys \n> to be slightly confusing.\n\nCan I get a URL for the source for your editor? The one on kernel.org\ndoesn't compile, and probably hasn't for a long time.\n\n[Yes, there is some (perverse) fun in telling people you use the very same\n editor than Linus Torvalds :-]> \n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                     Fono: +56 32 654431\nUniversidad Tecnica Federico Santa Maria              +56 32 654239\nCasilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513\n"},{"id":"9524","messageId":"Pine.LNX.4.64.0509291742170.3378@g5.osdl.org","threadId":"1203","inReplyTo":"200509292317.j8TNHC7S022247@inti.inf.utfsm.cl","subject":"Re: [howto] Kernel hacker's guide to git, updated","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-30T00:47:58Z","receivedAt":"2005-09-30T00:47:58Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 29 Sep 2005, Horst von Brand wrote:\n> \n> Can I get a URL for the source for your editor? The one on kernel.org\n> doesn't compile, and probably hasn't for a long time.\n\nOh, it compiles with trivial modifications. Not cleanly, but it works.\n\nI put my git repo on \n\n\tkernel.org:/pub/software/editors/uemacs/uemacs.git\n\nbut it will take a moment to mirror out. \n\nThe \"readme\" says non-commercial only, but I asked Daniel Lawrence if it \nwas ok to include it in commercial distributions a long time ago, and he \nsaid yes. Sadly, I've lost that email, so I don't have any paper trail for \nthat. So you should consider the readme binding.\n\n> [Yes, there is some (perverse) fun in telling people you use the very same\n>  editor than Linus Torvalds :-]> \n\nThe thing is, it's not a wonderful editor. It's small, and good enough, \nbut I really wished somebody wrote something that handled UTF-8, for \nexample.  But I've got the keybindings hardcoded in my spine, so I can't \never change.\n\n\t\tLinus\n"},{"id":"9525","messageId":"7vwtkzb9qo.fsf@assigned-by-dhcp.cox.net","threadId":"1203","inReplyTo":"Pine.LNX.4.64.0509291742170.3378@g5.osdl.org","subject":"Re: [howto] Kernel hacker's guide to git, updated","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-30T01:54:55Z","receivedAt":"2005-09-30T01:54:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> I put my git repo on \n>\n> \tkernel.org:/pub/software/editors/uemacs/uemacs.git\n>\n> but it will take a moment to mirror out. \n\nWouldn't underneath pub/scm/ be more appropriate and gitweb\nfriendly?\n\n> The thing is, it's not a wonderful editor. It's small, and good enough, \n> but I really wished somebody wrote something that handled UTF-8, for \n> example.\n\nHmph.  I vaguely recall in my distant past when I was still in\nschool, I did my own Japanization of microEmacs.  I wonder if\nyours share the same root -- I do not have the source of my\nversion anymore so I have no way checking which ancient version\nI mucked with.\n"},{"id":"9526","messageId":"Pine.LNX.4.64.0509291918530.3378@g5.osdl.org","threadId":"1203","inReplyTo":"7vwtkzb9qo.fsf@assigned-by-dhcp.cox.net","subject":"Re: [howto] Kernel hacker's guide to git, updated","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-09-30T02:36:37Z","receivedAt":"2005-09-30T02:36:37Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 29 Sep 2005, Junio C Hamano wrote:\n> \n> Wouldn't underneath pub/scm/ be more appropriate and gitweb\n> friendly?\n\nWell, I don't actually have write permissions to anything there except for \nudner the kernel tree. Also, I suspect there aren't all that many uemacs \nusers out there, and anybody who isn't already a uemacs user probably \nshouldn't pick it up.\n\nI don't think it has gotten any real development for the last ten years, \nand while it was arguably the best editor twenty years ago (not a lot of \ncompetition - what else worked on DOS, VMS and UNIX without being crazy \nand modal?) it's definitely showing its age.\n\nSo since I already had a uemacs subdirectory, I just put the git archive \nthere too.\n\n> Hmph.  I vaguely recall in my distant past when I was still in\n> school, I did my own Japanization of microEmacs.  I wonder if\n> yours share the same root -- I do not have the source of my\n> version anymore so I have no way checking which ancient version\n> I mucked with.\n\nIt's based on 3.9e, with some fixes by Petri Kutvonen at Helsinki \nUniversity. With various (slight) modernizations by yours truly (eg posix \ntermios support rather than the old \"termio\" stuff).\n\nIt _shouldn't_ be that hard to teach it about UTF-8, but every time I look \nat it I realize that there is a lot of stuff that should be improved. \nConverting it to K&R, getting rid of the things that made sense in the \n80's but haven't made sense in ten years, re-indenting it (right now \nit's a strange mix of indentation styles)..\n\nAnd if you open a binary file with it, it will literally spew binary \ncharacters to the tty, and can seriously confuse it due to the control \nchars. Or if you have a really long line, it can SIGSEGV on you. Cute.\n\nBut dammit, I'm not giving it up.\n\n\t\t\tLinus\n"},{"id":"9572","messageId":"Pine.LNX.4.64.0509301709350.3378@g5.osdl.org","threadId":"1203","inReplyTo":"Pine.LNX.4.64.0509291742170.3378@g5.osdl.org","subject":"Re: [howto] Kernel hacker's guide to git, updated","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-10-01T00:10:40Z","receivedAt":"2005-10-01T00:10:40Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 29 Sep 2005, Linus Torvalds wrote:\n> \n> I put my git repo on \n> \n> \tkernel.org:/pub/software/editors/uemacs/uemacs.git\n\nGaah. You guys shamed me into actually trying to clean up the sources a \nbit.\n\nIt's by no means done, but some of it is even sparse-clean now.\n\nI suspect there's a lot of it that still works mainly by luck than because \nit does anything right.\n\n\t\tLinus\n"},{"id":"9598","messageId":"200510010158.j911wiB3005296@inti.inf.utfsm.cl","threadId":"1203","inReplyTo":"torvalds@osdl.org","subject":"Re: [howto] Kernel hacker's guide to git, updated","fromName":"Horst von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2005-10-01T01:58:44Z","receivedAt":"2005-10-01T01:58:44Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> wrote:\n> On Thu, 29 Sep 2005, Linus Torvalds wrote:\n> > \n> > I put my git repo on \n> > \n> > \tkernel.org:/pub/software/editors/uemacs/uemacs.git\n> \n> Gaah. You guys shamed me into actually trying to clean up the sources a \n> bit.\n\nI'd been trying my hand at the original version. Need to merge my changes\nwith yours...\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                     Fono: +56 32 654431\nUniversidad Tecnica Federico Santa Maria              +56 32 654239\nCasilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513\n"},{"id":"9620","messageId":"Pine.LNX.4.64.0510021752390.31407@g5.osdl.org","threadId":"1203","inReplyTo":"200510010158.j911wiB3005296@inti.inf.utfsm.cl","subject":"Re: [howto] Kernel hacker's guide to git, updated","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-10-03T01:03:12Z","receivedAt":"2005-10-03T01:03:12Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n[ Sorry about the spam, most of you probably have never cared ]\n\nOn Fri, 30 Sep 2005, Horst von Brand wrote:\n> \n> I'd been trying my hand at the original version. Need to merge my changes\n> with yours...\n\nHeh, now that I got into cleaning things up, I've also been actually \nfixing things that have long irritated me, but the code was just too messy \nfor me, and my level of care wasn't high enough to overcome.\n\nI fixed the \"outputs binary data in the 128-159 range to the terminal\" \nyesterday (which would quite possibly corrupt terminal state if trying to \nedit binary files), and today I added a \"utf-8\" mode.\n\nThe utf-8 mode is purely about the _terminal_ being in UTF-8. The actual \neditor is still very much byte-char based, but now it understands 8-bit \ninput that comes in UTF8-encoded, and can output things in UTF-8 format. \n\n(Since UTF-8 is basically always used with Unicode, and the 8-bit subset \nof Unicode is iso-8859-1 aka Latin1, this is probably _less_ international \nthan the non-UTF8, but hey, what can I say? If you want more, you'd need \nto teach uemacs about actual UTF8 contents).\n\nThe new \"emacs.rc\" will enable utf-8 mode automatically if $LANG contains \nthe substring \"UTF-8\", since that _usually_ means that the terminal is in \nutf-8 mode. If it's wrong, you can add or delete the mode by hand (just \nlike any global mode: Meta-X to add, Meta-Ctrl-X to delete).\n\nBasically, it means that you don't have to switch the whole terminal into \nlatin1 just to use uemacs.\n\n\t\t\tLinus\n"},{"id":"10984","messageId":"200511012311.jA1NBGii003792@inti.inf.utfsm.cl","threadId":"1203","inReplyTo":"torvalds@osdl.org","subject":"Re: git 0.99.9: Subversion importer breaks RPM generation (rpmbuild bug)","fromName":"Horst von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2005-11-01T23:11:16Z","receivedAt":"2005-11-01T23:11:16Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> wrote:\n> On Mon, 31 Oct 2005, H. Peter Anvin wrote:\n> > The git-core RPM definitiely needs to be split.  Doubly ironic that it's\n> > called \"core\".\n\n> I don't think it's necessarily ironic. It's actually a good thing.\n> \n> I think that what we want to have is one _project_ (called \"git\"), which \n> can generate multiple RPM's (\"git-core\", \"git-svnimport\", \"git-docs\", \n> whatever).\n\nBetter cut along outside requirements: git-svn, git-cvs, git-scm-du-jour,\ngit-gtk. Please _don't_ split out documentation.\n\n> So I think it was good that we called the RPM \"git-core\". We've just not \n> yet done the obvious thing to create a few _other_ RPM's.\n\nRight.\n\n> Now, I'm not certain how happy RPM would be with having one source RPM \n> generate multiple binary RPM's,\n\nWorks fine. It is exactly what is used to build -devel packages. What\ndoesn't work is doing multiple architectures, e.g. creating\ngit-core-1.2.3.i386.rpm and git-gitk-1.2.3.noarch.rpm, in one go.\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                     Fono: +56 32 654431\nUniversidad Tecnica Federico Santa Maria              +56 32 654239\nCasilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513\n"},{"id":"20796","messageId":"200605271252.k4RCqZhR003192@laptop11.inf.utfsm.cl","threadId":"1203","inReplyTo":"torvalds@osdl.org","subject":"Re: ~/.git/config ?","fromName":"Horst von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2006-05-27T12:52:35Z","receivedAt":"2006-05-27T12:52:35Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> wrote:\n> On Sat, 27 May 2006, Petr Baudis wrote:\n> > \n> > ~/.gitrc might get useful for actually doing what ~/.cvsrc or ~/.cgrc\n> > does, that is providing default options for git commands. ~/.gitconfig\n> > would just give you per-user defaults for the repository config file.\n\nYep.\n\n[...]\n\n> So they would do \"alias cvs git\" in a desperate attempt to save themselves \n> from CVS, and then add\n> \n> \t[alias \"co\"]\n> \t\tcmd = commit -a\n\nI don't like this syntax. What other stuff (beside \"cmd\") would be under\n\"[alias \"co\"]? Why not simply:\n\n        [alias]\n\t\tco = commit -a\n\t\tpublish = push public.site.com:/pub/scm/my-public-repo\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                     Fono: +56 32 654431\nUniversidad Tecnica Federico Santa Maria              +56 32 654239\nCasilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513\n"},{"id":"20840","messageId":"20060528215945.GD10488@pasky.or.cz","threadId":"1203","inReplyTo":"200605271252.k4RCqZhR003192@laptop11.inf.utfsm.cl","subject":"[PATCH] Support for configurable git command aliases","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2006-05-28T21:59:45Z","receivedAt":"2006-05-28T21:59:45Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sat, May 27, 2006 at 02:52:35PM CEST, I got a letter\nwhere Horst von Brand <vonbrand@inf.utfsm.cl> said that...\n> > So they would do \"alias cvs git\" in a desperate attempt to save themselves \n> > from CVS, and then add\n> > \n> > \t[alias \"co\"]\n> > \t\tcmd = commit -a\n> \n> I don't like this syntax. What other stuff (beside \"cmd\") would be under\n> \"[alias \"co\"]? Why not simply:\n> \n>         [alias]\n> \t\tco = commit -a\n> \t\tpublish = push public.site.com:/pub/scm/my-public-repo\n\nNice, I like this.\n\nWell, the following isn't exactly the nicest code I have ever written...\nBut it seems to work. ;-)\n\n---\n\nThis patch adds support for configurable aliases for git commands -\n\"alias.WHATEVER = which ever\" will kick in when you do \"git WHATEVER\"\nand substitute WHATEVER with \"which ever\" (splitted to arguments at\nwhitespaces).\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n Documentation/config.txt |    5 ++++\n Documentation/git.txt    |    3 +++\n git.c                    |   52 ++++++++++++++++++++++++++++++++++++++++++++--\n 3 files changed, 58 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex d1a4bec..ce616e3 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -83,6 +83,11 @@ core.warnAmbiguousRefs::\n \tIf true, git will warn you if the ref name you passed it is ambiguous\n \tand might match multiple refs in the .git/refs/ tree. True by default.\n \n+alias.*::\n+\tCommand aliases for the gitlink:git[1] command wrapper - e.g.\n+\tafter defining \"alias.last = cat-file commit HEAD\", the invocation\n+\t\"git last\" is equivalent to \"git cat-file commit HEAD\".\n+\n apply.whitespace::\n \tTells `git-apply` how to handle whitespaces, in the same way\n \tas the '--whitespace' option. See gitlink:git-apply[1].\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 24ca55d..e474bdf 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -21,6 +21,9 @@ link:everyday.html[Everyday Git] for a u\n \"man git-commandname\" for documentation of each command.  CVS users may\n also want to read link:cvs-migration.html[CVS migration].\n \n+The COMMAND is either a name of a Git command (see below) or an alias\n+as defined in the configuration file (see gitlink:git-repo-config[1]).\n+\n OPTIONS\n -------\n --version::\ndiff --git a/git.c b/git.c\nindex 10ea934..0d9cd0e 100644\n--- a/git.c\n+++ b/git.c\n@@ -10,6 +10,7 @@ #include <limits.h>\n #include <stdarg.h>\n #include \"git-compat-util.h\"\n #include \"exec_cmd.h\"\n+#include \"cache.h\" /* setup_git_directory_gently() */\n \n #include \"builtin.h\"\n \n@@ -87,13 +88,27 @@ static void handle_internal_command(int \n \t}\n }\n \n+static const char *cmd;\n+static char *cmdalias;\n+\n+int git_alias_config(const char *var, const char *value)\n+{\n+\tif (strncmp(var, \"alias.\", 6))\n+\t\treturn 0;\n+\tvar += /* strlen(\"alias.\") */ 6;\n+\tif (!strcmp(var, cmd))\n+\t\tcmdalias = strdup(value);\n+\treturn 0;\n+}\n+\n int main(int argc, const char **argv, char **envp)\n {\n-\tconst char *cmd = argv[0];\n-\tchar *slash = strrchr(cmd, '/');\n+\tchar *slash = strrchr(argv[0], '/');\n \tchar git_command[PATH_MAX + 1];\n \tconst char *exec_path = NULL;\n \n+\tcmd = argv[0];\n+\n \t/*\n \t * Take the basename of argv[0] as the command\n \t * name, and the dirname as the default exec_path\n@@ -165,6 +180,39 @@ int main(int argc, const char **argv, ch\n \t}\n \targv[0] = cmd;\n \n+\t/* Is this an alias? */\n+\t{\n+\t\t/* XXX: We do a redundant git directory detection. */\n+\t\tint nongit = 0;\n+\t\tconst char *subdir = setup_git_directory_gently(&nongit);\n+\n+\t\tif (!nongit) {\n+\t\t\tgit_config(git_alias_config);\n+\t\t\tif (cmdalias) {\n+\t\t\t\t/* More than the worst case: */\n+\t\t\t\tconst char **argv2 = malloc((strlen(cmdalias) + argc) * sizeof(char*));\n+\t\t\t\tint argc2 = 0, i = 1;\n+\n+\t\t\t\twhile (cmdalias && *cmdalias) {\n+\t\t\t\t\targv2[argc2++] = strsep(&cmdalias, \" \\t\");\n+\t\t\t\t\tif (cmdalias)\n+\t\t\t\t\t\twhile (*cmdalias == ' ' || *cmdalias == '\\t')\n+\t\t\t\t\t\t\tcmdalias++;\n+\t\t\t\t}\n+\t\t\t\twhile (i < argc) {\n+\t\t\t\t\targv2[argc2++] = argv[i++];\n+\t\t\t\t}\n+\t\t\t\targv2[argc2] = NULL;\n+\t\t\t\targv = argv2;\n+\t\t\t\targc = argc2;\n+\t\t\t}\n+\t\t}\n+\n+\t\t/* Go back so that the commands start with clean table */\n+\t\tif (subdir)\n+\t\t\tchdir(subdir);\n+\t}\n+\n \t/*\n \t * We search for git commands in the following order:\n \t *  - git_exec_path()\n\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nA person is just about as big as the things that make them angry.\n"},{"id":"20849","messageId":"e5d9sm$5d4$1@sea.gmane.org","threadId":"1203","inReplyTo":"20060528215945.GD10488@pasky.or.cz","subject":"Re: [PATCH] Support for configurable git command aliases","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-05-28T22:57:26Z","receivedAt":"2006-05-28T22:57:26Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Petr Baudis wrote:\n\n> Dear diary, on Sat, May 27, 2006 at 02:52:35PM CEST, I got a letter\n> where Horst von Brand <vonbrand@inf.utfsm.cl> said that...\n>>\n>> I don't like this syntax. What other stuff (beside \"cmd\") would be under\n>> \"[alias \"co\"]? Why not simply:\n>> \n>>         [alias]\n>>              co = commit -a\n>>              publish = push public.site.com:/pub/scm/my-public-repo\n> \n> Nice, I like this.\n> \n> Well, the following isn't exactly the nicest code I have ever written...\n> But it seems to work. ;-)\n\nWell, if [alias] would be used also for giving default options for git\ncommands, e.g.\n\n        [alias]\n            log = log --pretty\n\n(from what Petr \"Pasky\" Baudis said on IRC, currently on the right side\nthere should be only true git commands, which eliminates nicely problems\nwith recursion ;-), it would be better to ensure that aliases are checked\n*only* for interactive sessions - otherwise using aliases for default\narguments would/could mess the scripts.\n\n-- \nJakub Narebski\nWarsaw, Poland\n"},{"id":"20856","messageId":"7v7j45d1wz.fsf@assigned-by-dhcp.cox.net","threadId":"1203","inReplyTo":"20060528215945.GD10488@pasky.or.cz","subject":"Re: [PATCH] Support for configurable git command aliases","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-29T02:01:48Z","receivedAt":"2006-05-29T02:01:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@ucw.cz> writes:\n\n>> I don't like this syntax. What other stuff (beside \"cmd\") would be under\n>> \"[alias \"co\"]? Why not simply:\n>> \n>>         [alias]\n>> \t\tco = commit -a\n>> \t\tpublish = push public.site.com:/pub/scm/my-public-repo\n>\n> Nice, I like this.\n\nSorry, I don't.  The left hand side of '=' does not allow\nanything but alnum and squashes the case.  Please stick to\n[alias \"co\"] syntax.\n"},{"id":"20858","messageId":"20060529035857.GA7641@coredump.intra.peff.net","threadId":"1203","inReplyTo":"e5d9sm$5d4$1@sea.gmane.org","subject":"Re: [PATCH] Support for configurable git command aliases","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-05-29T03:58:58Z","receivedAt":"2006-05-29T03:58:58Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 29, 2006 at 12:57:26AM +0200, Jakub Narebski wrote:\n\n> Well, if [alias] would be used also for giving default options for git\n> commands, e.g.\n> \n>         [alias]\n>             log = log --pretty\n\nA funny side effect of that would be that \"git log\" and \"git-log\" would\nnow have completely different defaults (unless the alias mechanism\nstarts intercepting direct calls to git-*, which seems invasive). I\nwonder if it might be simpler to just add \n  core.defaults.log = \"--pretty\"\nor similar.\n\n-Peff\n"},{"id":"20875","messageId":"20060529080246.GT11941@pasky.or.cz","threadId":"1203","inReplyTo":"7v7j45d1wz.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Support for configurable git command aliases","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2006-05-29T08:02:46Z","receivedAt":"2006-05-29T08:02:46Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, May 29, 2006 at 04:01:48AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Petr Baudis <pasky@ucw.cz> writes:\n> \n> >> I don't like this syntax. What other stuff (beside \"cmd\") would be under\n> >> \"[alias \"co\"]? Why not simply:\n> >> \n> >>         [alias]\n> >> \t\tco = commit -a\n> >> \t\tpublish = push public.site.com:/pub/scm/my-public-repo\n> >\n> > Nice, I like this.\n> \n> Sorry, I don't.  The left hand side of '=' does not allow\n> anything but alnum and squashes the case.\n\nDoes that really matter that much? Perhaps we might support something\nlike\n\n\t\"!ooOk\" = commit -a\n\n(and it will probably not do what the user expects if he sticks\nwhitespaces in).\n\n> Please stick to [alias \"co\"] syntax.\n\nThat sucks, e.g. because it's alias-specific, and it's inconsistent.\nI can't have anything like \"cgalias\" then.\n\nLet's make some effort to keep the syntax clean...\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nA person is just about as big as the things that make them angry.\n"},{"id":"295727","messageId":"200612022059.kB2Kx565009646@laptop13.inf.utfsm.cl","threadId":"1203","inReplyTo":"torvalds@osdl.org","subject":"Re: On removing files and \"git-rm is pointless\"","fromName":"Horst H. von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2006-12-02T20:59:05Z","receivedAt":"2006-12-02T20:59:05Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> wrote:\n\n[...]\n\n> One thing to look out for: \"git rm\" actually defaults to the recursive \n> behaviour, something that might take people by surprise. If you give it a \n> directory name, it will happily delete all tracked files from within that \n> directory, even without \"-r\". That is probably a design mistake. So it \n> would probably make sense to:\n> \n>  - without \"-r\", don't do the partial matches at the beginning (but still \n>    do globbing matches, of course, so \"git rm dir/*\" wouldn't need an \n>    \"-r\", but \"git rm -r dir/\", which does the same thing, _would_ need an \n>    \"-r\" to be effective)\n\nThe command should never even see the '*' here. Globbing is handled\n(uniformly) by the shell. Don't loose that.\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                    Fono: +56 32 2654431\nUniversidad Tecnica Federico Santa Maria             +56 32 2654239\n"},{"id":"296966","messageId":"4571EBD7.2040004@vilain.net","threadId":"1203","inReplyTo":"200612022059.kB2Kx565009646@laptop13.inf.utfsm.cl","subject":"Re: On removing files and \"git-rm is pointless\"","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2006-12-02T21:10:47Z","receivedAt":"2006-12-02T21:10:47Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Horst H. von Brand wrote:\n\n>>  - without \"-r\", don't do the partial matches at the beginning (but still \n>>    do globbing matches, of course, so \"git rm dir/*\" wouldn't need an \n>>    \"-r\", but \"git rm -r dir/\", which does the same thing, _would_ need an \n>>    \"-r\" to be effective)\n> \n> The command should never even see the '*' here. Globbing is handled\n> (uniformly) by the shell. Don't loose that.\n\nBut;\n\n  git-rm \\*>/dev/null; git-add \\*\n\nis just so darned handy!\n\n"},{"id":"296572","messageId":"Pine.LNX.4.64.0612021330070.3476@woody.osdl.org","threadId":"1203","inReplyTo":"200612022059.kB2Kx565009646@laptop13.inf.utfsm.cl","subject":"Re: On removing files and \"git-rm is pointless\"","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-12-02T21:33:56Z","receivedAt":"2006-12-02T21:33:56Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 2 Dec 2006, Horst H. von Brand wrote:\n> \n> The command should never even see the '*' here. Globbing is handled\n> (uniformly) by the shell. Don't loose that.\n\nGit supprts an extra level of globbing.\n\nIn the kernel tree, try the difference between these two command lines:\n\n\tgit ls-files fs/*.c\n\t\n\tgit ls-files 'fs/*.c'\n\nand enjoy.\n\nIt's _very_ useful for a number of programs (including \"git add\") but I \nfind it _especially_ useful for something like\n\n\tgit grep jiffies -- '*.h'\n\nwhere the git-level globbign is important.\n\nNot all git programs do that globbing, but many do.\n\n"}]}