{"thread":{"id":"11898","subject":"[PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","startedAt":"2008-02-05T15:14:28Z","lastAt":"2008-02-06T01:37:50Z","messageCount":12,"participants":["Jari Aalto","Mike Hommey","Johannes Schindelin","Linus Torvalds","Kristian Høgsberg","Junio C Hamano","Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"67524","messageId":"ve53xwob.fsf@blue.sea.net","threadId":"11898","inReplyTo":null,"subject":"[PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2008-02-05T15:14:28Z","receivedAt":"2008-02-05T15:14:28Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"Change git specific doings into namespace .git*. Define new variable\nWORKDIR, which points to working directory .git-dotest.\n\nSigned-off-by: Jari Aalto <jari.aalto AT cante.net>\n---\n git-rebase.sh |   41 +++++++++++++++++++++--------------------\n 1 files changed, 21 insertions(+), 20 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex ec052c4..259096f 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -14,7 +14,7 @@ It is possible that a merge failure will prevent this process from being\n completely automatic.  You will have to resolve any such merge failure\n and run git rebase --continue.  Another option is to bypass the commit\n that caused the merge failure with git rebase --skip.  To restore the\n-original <branch> and remove the .dotest working files, use the command\n+original <branch> and remove the .git-dotest working files, use the command\n git rebase --abort instead.\n \n Note that if <branch> is not specified on the command line, the\n@@ -43,7 +43,8 @@ To restore the original branch and stop rebasing run \\\"git rebase --abort\\\".\n unset newbase\n strategy=recursive\n do_merge=\n-dotest=$GIT_DIR/.dotest-merge\n+WORKDIR=$GIT_DIR/.git-dotest\n+dotest=$WORKDIR-merge\n prec=4\n verbose=\n git_am_opt=\n@@ -171,9 +172,9 @@ do\n \t\t\tfinish_rb_merge\n \t\t\texit\n \t\tfi\n-\t\thead_name=$(cat .dotest/head-name) &&\n-\t\tonto=$(cat .dotest/onto) &&\n-\t\torig_head=$(cat .dotest/orig-head) &&\n+\t\thead_name=$(cat $WORKDIR/head-name) &&\n+\t\tonto=$(cat $WORKDIR/onto) &&\n+\t\torig_head=$(cat $WORKDIR/orig-head) &&\n \t\tgit am $git_am_opt --resolved --3way \\\n \t\t    --resolvemsg=\"$RESOLVEMSG\" &&\n \t\tmove_to_original_branch\n@@ -197,9 +198,9 @@ do\n \t\t\tfinish_rb_merge\n \t\t\texit\n \t\tfi\n-\t\thead_name=$(cat .dotest/head-name) &&\n-\t\tonto=$(cat .dotest/onto) &&\n-\t\torig_head=$(cat .dotest/orig-head) &&\n+\t\thead_name=$(cat $WORKDIR/head-name) &&\n+\t\tonto=$(cat $WORKDIR/onto) &&\n+\t\torig_head=$(cat $WORKDIR/orig-head) &&\n \t\tgit am -3 --skip --resolvemsg=\"$RESOLVEMSG\" &&\n \t\tmove_to_original_branch\n \t\texit\n@@ -210,11 +211,11 @@ do\n \t\tthen\n \t\t\tmove_to_original_branch\n \t\t\trm -r \"$dotest\"\n-\t\telif test -d .dotest\n+\t\telif test -d $WORKDIR\n \t\tthen\n-\t\t\tdotest=.dotest\n+\t\t\tdotest=$WORKDIR\n \t\t\tmove_to_original_branch\n-\t\t\trm -r .dotest\n+\t\t\trm -r $WORKDIR\n \t\telse\n \t\t\tdie \"No rebase in progress?\"\n \t\tfi\n@@ -262,17 +263,17 @@ do\n \tshift\n done\n \n-# Make sure we do not have .dotest\n+# Make sure we do not have $WORKDIR\n if test -z \"$do_merge\"\n then\n-\tif mkdir .dotest\n+\tif mkdir $WORKDIR\n \tthen\n-\t\trmdir .dotest\n+\t\trmdir $WORKDIR\n \telse\n \t\techo >&2 '\n-It seems that I cannot create a .dotest directory, and I wonder if you\n+It seems that I cannot create a $WORKDIR directory, and I wonder if you\n are in the middle of patch application or another rebase.  If that is not\n-the case, please rm -fr .dotest and run me again.  I am stopping in case\n+the case, please rm -fr $WORKDIR and run me again.  I am stopping in case\n you still have something valuable there.'\n \t\texit 1\n \tfi\n@@ -381,10 +382,10 @@ then\n \tgit am $git_am_opt --binary -3 -k --resolvemsg=\"$RESOLVEMSG\" &&\n \tmove_to_original_branch\n \tret=$?\n-\ttest 0 != $ret -a -d .dotest &&\n-\t\techo $head_name > .dotest/head-name &&\n-\t\techo $onto > .dotest/onto &&\n-\t\techo $orig_head > .dotest/orig-head\n+\ttest 0 != $ret -a -d $WORKDIR &&\n+\t\techo $head_name > $WORKDIR/head-name &&\n+\t\techo $onto > $WORKDIR/onto &&\n+\t\techo $orig_head > $WORKDIR/orig-head\n \texit $ret\n fi\n \n-- \n1.5.4-rc5.GIT-dirty\n\n\n-- \nWelcome to FOSS revolution: we fix and modify until it shines\n"},{"id":"67527","messageId":"20080205152320.GA19370@glandium.org","threadId":"11898","inReplyTo":"ve53xwob.fsf@blue.sea.net","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-02-05T15:23:21Z","receivedAt":"2008-02-05T15:23:21Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Tue, Feb 05, 2008 at 05:14:28PM +0200, Jari Aalto <jari.aalto@cante.net> wrote:\n> Change git specific doings into namespace .git*. Define new variable\n> WORKDIR, which points to working directory .git-dotest.\n> \nShouldn't this just go in the .git/ directory ?\n\nMike\n"},{"id":"67529","messageId":"alpine.LSU.1.00.0802051524580.8543@racer.site","threadId":"11898","inReplyTo":"ve53xwob.fsf@blue.sea.net","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-05T15:28:10Z","receivedAt":"2008-02-05T15:28:10Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 5 Feb 2008, Jari Aalto wrote:\n\n> Change git specific doings into namespace .git*. Define new variable \n> WORKDIR, which points to working directory .git-dotest.\n\nNo.\n\nIf at all, it should be in .git/rebase/, not in .git-dotest/.  Note that \nwe have a different directory already for interactive rebase and rebase \n-m, .git/.dotest-merge/ (which could have been a better name, too).\n\nBut the consensus was that there might be scripts relying on the name of \nthe directory, so we left it as-is, and did not even consolidate both \nversions into the same name.\n\nSo _if_ you still want to change it, you need a looooong-term switch-over \nplan.  For one, you _have_ to install a symbolic link in order not to \nbreak existing scripts, and remove it afterwards.\n\nCiao,\nDscho\n"},{"id":"67558","messageId":"prvbxfhl.fsf@blue.sea.net","threadId":"11898","inReplyTo":"alpine.LSU.1.00.0802051524580.8543@racer.site","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2008-02-05T21:25:42Z","receivedAt":"2008-02-05T21:25:42Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"* Tue 2008-02-05 Johannes Schindelin <Johannes.Schindelin@gmx.de>\n>\n> If at all, it should be in .git/rebase/\n\nMuch better.\n\n> we have a different directory already for interactive rebase and rebase \n> -m, .git/.dotest-merge/ (which could have been a better name, too).\n\nYes, that should go to .git too.\n\n> But the consensus was that there might be scripts relying on the name of \n> the directory\n\nWho would use or rely on the internal workings of git-rebase? The will\nnot be any considerable amount of those. I'm confident that those people\nhave enough expertise to change their scripts.\n\nThe current situation is plain ugly and git shouldn't stomp on any other\ndir than .git\n\nJari\n\n-- \nWelcome to FOSS revolution: we fix and modify until it shines\n"},{"id":"67560","messageId":"alpine.LFD.1.00.0802051334070.3110@woody.linux-foundation.org","threadId":"11898","inReplyTo":"prvbxfhl.fsf@blue.sea.net","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-02-05T21:49:18Z","receivedAt":"2008-02-05T21:49:18Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 5 Feb 2008, Jari Aalto wrote:\n> \n> The current situation is plain ugly and git shouldn't stomp on any other\n> dir than .git\n\nI do agree.\n\nThe whole (and _only_) reason for the directory being called \".dotest\" is \nliterally totally silly and historical:\n\n - I long since wrote my own stupid scripts around BK (and called \n   my set of scripts around BK \"bktools\")\n\n - that script set included a script to extract the patch and description \n   from a mailbox.\n\n - that script was called \"dotest\", because it started out as a testing \n   script, and I never re-named it. And while my bktools set had other \n   scripts in it, that was the one I used _every_single_day_, so \"dotest\" \n   is not only always in my shell history, it's also hardcoded in my \n   brainstem.\n\n - BitMover eventually merged an improved version of my mbox applicator \n   scripts into bitkeeper, making much of it pointless, but I kept the \n   name around as a shell macro, because it was what I was used to (I \n   think it basically expanded into something like \"bk import -temail\" or \n   something)\n\n - when I started git, I *rewrote* those old bktools for git, and created \n   a new \"git-tools\" directory. And yes, the script that actually tied all \n   the mail splitting and application together was *still* called \n   \"dotest\", because it was still what I used.\n\n - again, time passes, and again, my helper scripts end up migrating into \n   the actual SCM, now called \"git applymbox\" (and then later \"git am\"), \n   but yet *again*, I cannot teach myself to call it anything sane, so my \n   .bashrc file still contains\n\n\talias dotest='git-am --utf8'\n\n   and I still write \"dotest\" when I apply emails. Even though it hasn't \n   been about \"testing\" for the last five years or so, and it's how I do \n   all my work.\n\nSo the temporary directory that contains all the temp-files for my \n\"dotest\" script (which was external to git) - it's called \".dotest\". Of \ncourse.\n\nIt all makes perfect sense. Or rather, it made sense way back when. I \nagree that it's just totally insane these days, and \".dotest/\" should be \nrenamed to something like \".git/split/\" or something.\n\n\t\tLinus\n"},{"id":"67570","messageId":"alpine.LSU.1.00.0802052236220.8543@racer.site","threadId":"11898","inReplyTo":"alpine.LFD.1.00.0802051334070.3110@woody.linux-foundation.org","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-05T22:41:33Z","receivedAt":"2008-02-05T22:41:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[Jari, keep me Cc'ed.  I missed your mail, because you didn't.]\n\nOn Tue, 5 Feb 2008, Linus Torvalds wrote:\n\n> It all makes perfect sense. Or rather, it made sense way back when. I \n> agree that it's just totally insane these days, and \".dotest/\" should be \n> renamed to something like \".git/split/\" or something.\n\nBut please, please, please not without a proper plan to keep people \ninformed!  I.e. a switch-over plan with deprecation and all.  (IOW what I \n_already_ wrote to Jari.)\n\nOn at least one machine (not the current one, because I was too lazy), I \nhave a git alias to call when the patch does not apply, to call another \nprogram in turn which made it easier for me to integrate a non-applying \npatch into the current working directory.\n\nAnd guess what: this script accesses .dotest/.  Yes, I know, it was \n_prone_ to move.\n\nBut I am lucky, I read the git list regularly, I know what truck is going \nto hit me if I do not change that alias.\n\nHowever, there are others.  And while we like to give everybody way too \nmuch rope, we should not willfully run a truck in the direction of \nunsuspecting users.\n\nCiao,\nDscho\n"},{"id":"67573","messageId":"ejbrxbid.fsf@blue.sea.net","threadId":"11898","inReplyTo":"alpine.LSU.1.00.0802052236220.8543@racer.site","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2008-02-05T22:51:38Z","receivedAt":"2008-02-05T22:51:38Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"* Tue 2008-02-05 Johannes Schindelin <Johannes.Schindelin@gmx.de>\n* Message-Id: alpine.LSU.1.00.0802052236220.8543@racer.site\n> On at least one machine (not the current one, because I was too lazy), I \n> have a git alias to call when the patch does not apply, to call another \n> program in turn which made it easier for me to integrate a non-applying \n> patch into the current working directory.\n>\n> And guess what: this script accesses .dotest/.  Yes, I know, it was \n> _prone_ to move.\n\nIf somebody has written scripts to do something with the internals, he\nalready knows the internals. I'm confident those can easily track the\nchanges. They are experts already if they use .dotest.\n\nAll good shell scripts test the conditions before they proceed. Like\nin this case. Something:\n\n    dir=.dotest\n\n    [ -d \"$dir\" ] || { echo \"No directory $dir\" >&2; exit 1; }\n\nSloppy scripts are best left to script writers headache.\n\nJari\n\n-- \nWelcome to FOSS revolution: we fix and modify until it shines\n"},{"id":"67576","messageId":"alpine.LSU.1.00.0802052303060.8543@racer.site","threadId":"11898","inReplyTo":"ejbrxbid.fsf@blue.sea.net","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-05T23:04:55Z","receivedAt":"2008-02-05T23:04:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 6 Feb 2008, Jari Aalto wrote:\n\n> Sloppy scripts are best left to script writers headache.\n\nI see no sloppy behaviour when somebody sees that git-am (which uses \nthe same directory!) has no way of handling a non-applying patch, and then \nwrites a script that accesses .dotest/patch.\n\nBut I _see_ some sloppy behaviour of somebody not following netiquette, \nresponding to a certain mail, but not to the original poster!\n\nCiao,\nDscho \"who is annoyed\"\n"},{"id":"67578","messageId":"1202253890.26144.8.camel@gaara.boston.redhat.com","threadId":"11898","inReplyTo":"alpine.LSU.1.00.0802052236220.8543@racer.site","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Kristian Høgsberg","fromEmail":"krh@redhat.com","sentAt":"2008-02-05T23:24:50Z","receivedAt":"2008-02-05T23:24:50Z","isPatch":true,"sender":{"key":"krh@redhat.com","avatar":"https://gravatar.com/avatar/763dee6f9594ac474f725b137a39565792928e583ddf59b32befc2907409027e?d=mp&s=160"},"body":"On Tue, 2008-02-05 at 22:41 +0000, Johannes Schindelin wrote:\n> Hi,\n> \n> [Jari, keep me Cc'ed.  I missed your mail, because you didn't.]\n> \n> On Tue, 5 Feb 2008, Linus Torvalds wrote:\n> \n> > It all makes perfect sense. Or rather, it made sense way back when. I \n> > agree that it's just totally insane these days, and \".dotest/\" should be \n> > renamed to something like \".git/split/\" or something.\n> \n> But please, please, please not without a proper plan to keep people \n> informed!  I.e. a switch-over plan with deprecation and all.  (IOW what I \n> _already_ wrote to Jari.)\n> \n> On at least one machine (not the current one, because I was too lazy), I \n> have a git alias to call when the patch does not apply, to call another \n> program in turn which made it easier for me to integrate a non-applying \n> patch into the current working directory.\n\nAha, that's the script we're talking about :)\n\n> And guess what: this script accesses .dotest/.  Yes, I know, it was \n> _prone_ to move.\n> \n> But I am lucky, I read the git list regularly, I know what truck is going \n> to hit me if I do not change that alias.\n\nI think there's a correlation here: anybody who's meddling with git\nimplementation details (yes, I'm talking about .dotest here) is probably\nalso subscribed to this list :)  Seriously though, in git there is often\nno clear line between implementation details and supported features, so\nit's way to easy to claim everything is set in stone and that the world\nwill break if we change it.  Especially if you've written a script that\nhappens to reach a little to far into the git guts.\n\nKristian\n"},{"id":"67590","messageId":"7vlk5y7vv4.fsf@gitster.siamese.dyndns.org","threadId":"11898","inReplyTo":"alpine.LSU.1.00.0802052303060.8543@racer.site","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-06T00:48:47Z","receivedAt":"2008-02-06T00:48:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Wed, 6 Feb 2008, Jari Aalto wrote:\n>\n>> Sloppy scripts are best left to script writers headache.\n>\n> I see no sloppy behaviour when somebody sees that git-am (which uses \n> the same directory!) has no way of handling a non-applying patch, and then \n> writes a script that accesses .dotest/patch.\n\nIt may count sloppy not to feed the improvements back, though.\n\nOf course, if the reason is because somebody is ashamed of the\nscript being too hacky for public consumption, then not feeding\nis not sloppy at all.  But then probably that makes the script\nsloppy.  That somebody is sloppy either way, isn't s/he? ;-)\n\n> But I _see_ some sloppy behaviour of somebody not following netiquette, \n> responding to a certain mail, but not to the original poster!\n>\n> Ciao,\n> Dscho \"who is annoyed\"\n\nJC \"who is trapped in day-job\".\n"},{"id":"67593","messageId":"alpine.LSU.1.00.0802060053570.8543@racer.site","threadId":"11898","inReplyTo":"1202253890.26144.8.camel@gaara.boston.redhat.com","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-06T00:56:06Z","receivedAt":"2008-02-06T00:56:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 5 Feb 2008, Kristian Høgsberg wrote:\n\n> I think there's a correlation here: anybody who's meddling with git \n> implementation details (yes, I'm talking about .dotest here) is probably \n> also subscribed to this list :)  Seriously though, in git there is often \n> no clear line between implementation details and supported features, so \n> it's way to easy to claim everything is set in stone and that the world \n> will break if we change it.  Especially if you've written a script that \n> happens to reach a little to far into the git guts.\n\nI think you are being unfair here:\n\nImagine git-am stops somewhere because the patch fails.  What to do?  \nWhere to look?  What to fix?\n\nExactly.  You have _only_ one option.  You look into .dotest/.\n\nSo yes, it is an implementation detail.  But one that we could not \n_possibly_ hide.\n\nWhat's so wrong with using a symlink first, trying hard not to break \npeoples' assumptions, then tell them that they should change their scripts \n(which they can do lazily now, since both .dotest/ _and_ .git/rebase/ \nare valid)?\n\nHow is being nice to people wrong?\n\nCiao,\nDscho\n"},{"id":"67601","messageId":"alpine.LFD.1.00.0802052031240.2732@xanadu.home","threadId":"11898","inReplyTo":"alpine.LSU.1.00.0802060053570.8543@racer.site","subject":"Re: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-02-06T01:37:50Z","receivedAt":"2008-02-06T01:37:50Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 6 Feb 2008, Johannes Schindelin wrote:\n\n> So yes, it is an implementation detail.  But one that we could not \n> _possibly_ hide.\n> \n> What's so wrong with using a symlink first, trying hard not to break \n> peoples' assumptions, then tell them that they should change their scripts \n> (which they can do lazily now, since both .dotest/ _and_ .git/rebase/ \n> are valid)?\n> \n> How is being nice to people wrong?\n\nJohannes,\n\nWhy don't you simply manually add the symlink to your repo, or better \nyet, fix your script?\n\nI don't think many people will think they've been screwed just because \nthis .dotest directory has moved, since not so many people might be \nrelying on it.  And for those who do, well they certainly have the \nknowledge to help themselves out of this very complicated matter.  ;-)\n\nSo I'd suggest simply moving it and see if other people, if any, start \nscreaming.\n\n\nNicolas\n"}]}