{"thread":{"id":"18274","subject":"[PATCH 1/2] [TopGit] Portability: Use tr instead of sed for translating spaces to newlines","startedAt":"2009-03-12T05:56:28Z","lastAt":"2009-03-14T12:47:48Z","messageCount":12,"participants":["Brian Campbell","Junio C Hamano","Uwe Kleine-König","martin f krafft"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"107763","messageId":"1236837389-35687-1-git-send-email-brian.p.campbell@dartmouth.edu","threadId":"18274","inReplyTo":null,"subject":"[PATCH 1/2] [TopGit] Portability: Use tr instead of sed for translating spaces to newlines","fromName":"Brian Campbell","fromEmail":"brian.p.campbell@dartmouth.edu","sentAt":"2009-03-12T05:56:28Z","receivedAt":"2009-03-12T05:56:28Z","isPatch":true,"sender":{"key":"brian.p.campbell@dartmouth.edu","avatar":"https://gravatar.com/avatar/e153b57e0e587595915877127d7b81e7618219abd7041d28675efe54f26f2b57?d=mp&s=160"},"body":"It is not portable to use \\n in the replacement of a sed substitute\ncommand.  On Mac OS X (and presumably FreeBSD, as Mac OS X uses\nsed from FreeBSD), \\n in the replacement of a substitution gives a\nliteral \"n\" instead of a newline.\n\nThis patch replaces the sed command with tr, which should be more\nportable.\n\nSigned-off-by: Brian Campbell <brian.p.campbell@dartmouth.edu>\n---\n tg-create.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/tg-create.sh b/tg-create.sh\nindex 2edd537..ef9a955 100644\n--- a/tg-create.sh\n+++ b/tg-create.sh\n@@ -116,7 +116,7 @@ done\n git update-ref \"refs/top-bases/$name\" \"HEAD\" \"\"\n git checkout -b \"$name\"\n \n-echo \"$deps\" | sed 's/ /\\n/g' >\"$root_dir/.topdeps\"\n+echo \"$deps\" | tr ' ' '\\n' >\"$root_dir/.topdeps\"\n git add -f \"$root_dir/.topdeps\"\n \n author=\"$(git var GIT_AUTHOR_IDENT)\"\n-- \n1.6.2.185.g8b635.dirty\n"},{"id":"107764","messageId":"1236837389-35687-2-git-send-email-brian.p.campbell@dartmouth.edu","threadId":"18274","inReplyTo":"1236837389-35687-1-git-send-email-brian.p.campbell@dartmouth.edu","subject":"[PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Brian Campbell","fromEmail":"brian.p.campbell@dartmouth.edu","sentAt":"2009-03-12T05:56:29Z","receivedAt":"2009-03-12T05:56:29Z","isPatch":true,"sender":{"key":"brian.p.campbell@dartmouth.edu","avatar":"https://gravatar.com/avatar/e153b57e0e587595915877127d7b81e7618219abd7041d28675efe54f26f2b57?d=mp&s=160"},"body":"There is no portable way in sed to express alternation (the \"|\"\noperator).  POSIX does not specify any way of expressing alternation;\naccording to POSIX, sed uses basic regular expressions which do not\nsupport alternation.  GNU sed allows \"\\|\" to express alternation,\nand BSD sed (as tested on Mac OS X) allows for the use of extended\nregular expressions with the -E flag, but there appears to be no\nportable way to express this.\n\nThis patch works around the problem by changing a single sed\nexpression into two.  This patch also factors out all the call\nsites that were doing this, to determing the current branch,\ninto a single function current_branch in tg.sh.\n\nSigned-off-by: Brian Campbell <brian.p.campbell@dartmouth.edu>\n---\n tg-info.sh    |    2 +-\n tg-patch.sh   |    2 +-\n tg-summary.sh |    2 +-\n tg-update.sh  |    2 +-\n tg.sh         |    5 +++++\n 5 files changed, 9 insertions(+), 4 deletions(-)\n\ndiff --git a/tg-info.sh b/tg-info.sh\nindex 7d6a34c..25c753c 100644\n--- a/tg-info.sh\n+++ b/tg-info.sh\n@@ -20,7 +20,7 @@ while [ -n \"$1\" ]; do\n \tesac\n done\n \n-[ -n \"$name\" ] || name=\"$(git symbolic-ref HEAD | sed 's#^refs/\\(heads\\|top-bases\\)/##')\"\n+[ -n \"$name\" ] || name=\"$(current_branch)\"\n base_rev=\"$(git rev-parse --short --verify \"refs/top-bases/$name\" 2>/dev/null)\" ||\n \tdie \"not a TopGit-controlled branch\"\n \ndiff --git a/tg-patch.sh b/tg-patch.sh\nindex d701c54..ba788c8 100644\n--- a/tg-patch.sh\n+++ b/tg-patch.sh\n@@ -35,7 +35,7 @@ done\n [ -n \"$name\"  -a  -z \"$diff_committed_only\" ]  &&\n \tdie \"-i/-w are mutually exclusive with NAME\"\n \n-[ -n \"$name\" ] || name=\"$(git symbolic-ref HEAD | sed 's#^refs/\\(heads\\|top-bases\\)/##')\"\n+[ -n \"$name\" ] || name=\"$(current_branch)\"\n base_rev=\"$(git rev-parse --short --verify \"refs/top-bases/$name\" 2>/dev/null)\" ||\n \tdie \"not a TopGit-controlled branch\"\n \ndiff --git a/tg-summary.sh b/tg-summary.sh\nindex 50ee883..62b499e 100644\n--- a/tg-summary.sh\n+++ b/tg-summary.sh\n@@ -22,7 +22,7 @@ while [ -n \"$1\" ]; do\n \tesac\n done\n \n-curname=\"$(git symbolic-ref HEAD | sed 's#^refs/\\(heads\\|top-bases\\)/##')\"\n+curname=\"$(current_branch)\"\n \n ! [ -n \"$terse\" -a -n \"$graphviz\" ] ||\n \tdie \"-t and --graphviz options are mutual exclusive\"\ndiff --git a/tg-update.sh b/tg-update.sh\nindex 288ec14..0cff0ac 100644\n--- a/tg-update.sh\n+++ b/tg-update.sh\n@@ -14,7 +14,7 @@ if [ -n \"$1\" ]; then\n fi\n \n \n-name=\"$(git symbolic-ref HEAD | sed 's#^refs/\\(heads\\|top-bases\\)/##')\"\n+name=\"$(current_branch)\"\n base_rev=\"$(git rev-parse --short --verify \"refs/top-bases/$name\" 2>/dev/null)\" ||\n \tdie \"not a TopGit-controlled branch\"\n \ndiff --git a/tg.sh b/tg.sh\nindex 43d1c9f..232a8b7 100644\n--- a/tg.sh\n+++ b/tg.sh\n@@ -18,6 +18,11 @@ die()\n \texit 1\n }\n \n+current_branch()\n+{\n+\techo \"$(git symbolic-ref HEAD | sed -e 's#^refs/heads/##' -e 's#^refs/top-bases/##')\"\n+}\n+\n # cat_file \"topic:file\"\n # Like `git cat-file blob $1`, but topics '(i)' and '(w)' means index and worktree\n cat_file()\n-- \n1.6.2.185.g8b635.dirty\n"},{"id":"107766","messageId":"7viqmfjklm.fsf@gitster.siamese.dyndns.org","threadId":"18274","inReplyTo":"1236837389-35687-2-git-send-email-brian.p.campbell@dartmouth.edu","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-12T06:55:49Z","receivedAt":"2009-03-12T06:55:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Campbell <brian.p.campbell@dartmouth.edu> writes:\n\n> +current_branch()\n> +{\n> +\techo \"$(git symbolic-ref HEAD | sed -e 's#^refs/heads/##' -e 's#^refs/top-bases/##')\"\n> +}\n\nTwo micronits.\n\n - what happens when you are on a detached HEAD?\n\n - You will be utterly confused by a local branch whose name is\n   \"refs/top-bases/foo\"\n\nTo fix these, you might want to do something like:\n\n\tif head_=$(git symbolic-ref HEAD)\n        then\n                case \"$head_\" in\n                refs/heads/*)\n                        echo \"${head_#refs/heads/}\"\n                        ;;\n                refs/top-bases/*)\n                        echo \"${head_#refs/top-bases/}\"\n                        ;;\n                *)\n                        echo \"$head_\"\n                        ;;\n                esac\n\telse\n        \twhatever you want to do on a detached HEAD\n\tfi\n"},{"id":"107771","messageId":"20090312074524.GA14844@pengutronix.de","threadId":"18274","inReplyTo":"7viqmfjklm.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2009-03-12T07:45:24Z","receivedAt":"2009-03-12T07:45:24Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Brian, hello Junio,\n\nOn Wed, Mar 11, 2009 at 11:55:49PM -0700, Junio C Hamano wrote:\n> Brian Campbell <brian.p.campbell@dartmouth.edu> writes:\n> \n> > +current_branch()\n> > +{\n> > +\techo \"$(git symbolic-ref HEAD | sed -e 's#^refs/heads/##' -e 's#^refs/top-bases/##')\"\n> > +}\n> \n> Two micronits.\n> \n>  - what happens when you are on a detached HEAD?\nThe original code had this problem, too, so I would not take this as a\nstopper for the patch.  There are some other locations that suffer from\nthe same problem.  That's already on my todo list.  So I don't care much\nhere.\n \n>  - You will be utterly confused by a local branch whose name is\n>    \"refs/top-bases/foo\"\nYou mean a branch that has the full name refs/heads/refs/top-bases/foo?\nWell OK, valid concern.\n\n> To fix these, you might want to do something like:\n> \n> \tif head_=$(git symbolic-ref HEAD)\n>         then\n>                 case \"$head_\" in\n>                 refs/heads/*)\n>                         echo \"${head_#refs/heads/}\"\n>                         ;;\n>                 refs/top-bases/*)\n>                         echo \"${head_#refs/top-bases/}\"\n>                         ;;\n>                 *)\n>                         echo \"$head_\"\n>                         ;;\n>                 esac\n> \telse\n>         \twhatever you want to do on a detached HEAD\n> \tfi\nThanks Junio and Brian.\n\nBrian, do you update the series?\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\n"},{"id":"107835","messageId":"78BA729B-0026-45D0-96FC-330700519AAB@dartmouth.edu","threadId":"18274","inReplyTo":"20090312074524.GA14844@pengutronix.de","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Brian Campbell","fromEmail":"brian.p.campbell@dartmouth.edu","sentAt":"2009-03-12T15:00:00Z","receivedAt":"2009-03-12T15:00:00Z","isPatch":true,"sender":{"key":"brian.p.campbell@dartmouth.edu","avatar":"https://gravatar.com/avatar/e153b57e0e587595915877127d7b81e7618219abd7041d28675efe54f26f2b57?d=mp&s=160"},"body":"On Mar 12, 2009, at 3:45 AM, Uwe Kleine-König wrote:\n\n>> - You will be utterly confused by a local branch whose name is\n>>   \"refs/top-bases/foo\"\n> You mean a branch that has the full name refs/heads/refs/top-bases/ \n> foo?\n> Well OK, valid concern.\n\nYes, you're right, this is a problem.\n\n>> To fix these, you might want to do something like:\n>>\n>> \tif head_=$(git symbolic-ref HEAD)\n>>        then\n>>                case \"$head_\" in\n>>                refs/heads/*)\n>>                        echo \"${head_#refs/heads/}\"\n>>                        ;;\n>>                refs/top-bases/*)\n>>                        echo \"${head_#refs/top-bases/}\"\n>>                        ;;\n>>                *)\n>>                        echo \"$head_\"\n>>                        ;;\n>>                esac\n>> \telse\n>>        \twhatever you want to do on a detached HEAD\n>> \tfi\n> Thanks Junio and Brian.\n>\n> Brian, do you update the series?\n\nSure, I'll send an updated patch.\n\nI'm thinking that for the detached HEAD case, this function should die  \nwith a message about not being on a valid branch, and then the call  \nsite in tg-summary that doesn't care about being on a valid branch  \nshould ignore the error and leave curname empty. Does that sound about  \nright? I'm fairly new to doing Bourne shell scripting, so I don't yet  \nhave a good sense of how these things should be structured.\n\nAlso, has anyone considered writing a test suite for TopGit? I  \nactually got fairly deep in to a series of 10 or so patches before I  \nhit these problems, since tg-create worked fine as long as I only  \nsupplied one dependency, and I didn't notice the second issue until I  \ntried to do a tg-update after modifying one of my base patches.\n\n-- Brian"},{"id":"107834","messageId":"20090312150923.GB14521@pengutronix.de","threadId":"18274","inReplyTo":"1236837389-35687-2-git-send-email-brian.p.campbell@dartmouth.edu","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2009-03-12T15:09:23Z","receivedAt":"2009-03-12T15:09:23Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Brian,\n\none more minor nitpick:\n\nOn Thu, Mar 12, 2009 at 01:56:29AM -0400, Brian Campbell wrote:\n> -[ -n \"$name\" ] || name=\"$(git symbolic-ref HEAD | sed 's#^refs/\\(heads\\|top-bases\\)/##')\"\n> +[ -n \"$name\" ] || name=\"$(current_branch)\"\ncurrent_branch doesn't look like the correct name.  I'd prefer\ncurrent_tgpatch is better?!  (For current_branch I would expect that\nonly refs/heads is stripped.)\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\n"},{"id":"107836","messageId":"20090312152039.GA15626@pengutronix.de","threadId":"18274","inReplyTo":"78BA729B-0026-45D0-96FC-330700519AAB@dartmouth.edu","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2009-03-12T15:20:39Z","receivedAt":"2009-03-12T15:20:39Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Brian, hello Junio,\n\nOn Thu, Mar 12, 2009 at 11:00:00AM -0400, Brian Campbell wrote:\n> On Mar 12, 2009, at 3:45 AM, Uwe Kleine-König wrote:\n>\n>>> - You will be utterly confused by a local branch whose name is\n>>>   \"refs/top-bases/foo\"\n>> You mean a branch that has the full name refs/heads/refs/top-bases/ \n>> foo?\n>> Well OK, valid concern.\n>\n> Yes, you're right, this is a problem.\n>\n>>> To fix these, you might want to do something like:\n>>>\n>>> \tif head_=$(git symbolic-ref HEAD)\nShouldn't git symbolic-ref -q HEAD be used here?\n\n>>>        then\n>>>                case \"$head_\" in\n>>>                refs/heads/*)\n>>>                        echo \"${head_#refs/heads/}\"\n>>>                        ;;\n>>>                refs/top-bases/*)\n>>>                        echo \"${head_#refs/top-bases/}\"\n>>>                        ;;\n>>>                *)\n>>>                        echo \"$head_\"\n>>>                        ;;\n>>>                esac\n>>> \telse\n>>>        \twhatever you want to do on a detached HEAD\nHow do I  distinguish between a detached HEAD and another error?  I have\nthe feeling that git symbolic-ref -q HEAD should exit(0) with a detached\nHEAD.\n\n>> Thanks Junio and Brian.\n>>\n>> Brian, do you update the series?\n>\n> Sure, I'll send an updated patch.\n>\n> I'm thinking that for the detached HEAD case, this function should die  \n> with a message about not being on a valid branch, and then the call site \n> in tg-summary that doesn't care about being on a valid branch should \n> ignore the error and leave curname empty. Does that sound about right? \nmmh, I would return \"\" and let the caller handle that.\n\n> Also, has anyone considered writing a test suite for TopGit?\nYes, but I didn't found the time for that until now.  If you'd volunteer\nthat would be very welcome.\n\nIMHO we should reuse as much as possible from git.git.  For me even\nrequiring a git.git checkout to use its files would be OK.  I consider\nthat even better then duplicating the relevant files.\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\nPeiner Strasse 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |\nAmtsgericht Hildesheim, HRA 2686              | Fax:   +49-5121-206917-5555 |\n"},{"id":"107839","messageId":"20090312152630.GA26379@piper.oerlikon.madduck.net","threadId":"18274","inReplyTo":"20090312152039.GA15626@pengutronix.de","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2009-03-12T15:26:30Z","receivedAt":"2009-03-12T15:26:30Z","isPatch":true,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2009.03.12.1620 +0100]:\n> IMHO we should reuse as much as possible from git.git.  For me even\n> requiring a git.git checkout to use its files would be OK.  I consider\n> that even better then duplicating the relevant files.\n\nMaybe we could even start to think about integrating TopGit back\ninto git.git?\n\n-- \nmartin | http://madduck.net/ | http://two.sentenc.es/\n \n\"perhaps debian is concerned more about technical excellence rather\n than ease of use by breaking software. in the former we may excel.\n in the latter we have to concede the field to microsoft. guess\n where i want to go today?\"\n                                                 -- manoj srivastava\n \nspamtraps: madduck.bogus@madduck.net\n"},{"id":"107849","messageId":"F3665462-16BC-42D6-BE28-F66CF48CEB9B@dartmouth.edu","threadId":"18274","inReplyTo":"20090312152039.GA15626@pengutronix.de","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Brian Campbell","fromEmail":"brian.p.campbell@dartmouth.edu","sentAt":"2009-03-12T16:41:45Z","receivedAt":"2009-03-12T16:41:45Z","isPatch":true,"sender":{"key":"brian.p.campbell@dartmouth.edu","avatar":"https://gravatar.com/avatar/e153b57e0e587595915877127d7b81e7618219abd7041d28675efe54f26f2b57?d=mp&s=160"},"body":"On Mar 12, 2009, at 11:20 AM, Uwe Kleine-König wrote:\n\n>>>> To fix these, you might want to do something like:\n>>>>\n>>>> \tif head_=$(git symbolic-ref HEAD)\n> Shouldn't git symbolic-ref -q HEAD be used here?\n\nYes, most likely.\n\n>>>>       then\n>>>>               case \"$head_\" in\n>>>>               refs/heads/*)\n>>>>                       echo \"${head_#refs/heads/}\"\n>>>>                       ;;\n>>>>               refs/top-bases/*)\n>>>>                       echo \"${head_#refs/top-bases/}\"\n>>>>                       ;;\n>>>>               *)\n>>>>                       echo \"$head_\"\n>>>>                       ;;\n>>>>               esac\n>>>> \telse\n>>>>       \twhatever you want to do on a detached HEAD\n> How do I  distinguish between a detached HEAD and another error?  I  \n> have\n> the feeling that git symbolic-ref -q HEAD should exit(0) with a  \n> detached\n> HEAD.\n\nIf you pass -q, it exits with status 1 on a detached head, 128 on  \nother errors, so we can use that to distinguish.\n\n>\n>>> Thanks Junio and Brian.\n>>>\n>>> Brian, do you update the series?\n>>\n>> Sure, I'll send an updated patch.\n>>\n>> I'm thinking that for the detached HEAD case, this function should  \n>> die\n>> with a message about not being on a valid branch, and then the call  \n>> site\n>> in tg-summary that doesn't care about being on a valid branch should\n>> ignore the error and leave curname empty. Does that sound about  \n>> right?\n> mmh, I would return \"\" and let the caller handle that.\n\nFair enough.\n\n>> Also, has anyone considered writing a test suite for TopGit?\n> Yes, but I didn't found the time for that until now.  If you'd  \n> volunteer\n> that would be very welcome.\n\nI would, but I'm not sure I'll be continuing to use TopGit for more  \nthan the one patch series I'm using it for now; I was trying it out,  \nbut it feels a little more heavy-weight than what I want. StGIT or  \njust rewriting a patch series with git rebase -i works better for my  \nuses; I'm not maintaining a lot of long-lived topic branches upon  \nwhich I need full history.\n\n> IMHO we should reuse as much as possible from git.git.  For me even\n> requiring a git.git checkout to use its files would be OK.  I consider\n> that even better then duplicating the relevant files.\n\nHmm. How would the tests find your git working tree? I'd be willing to  \nstart the process off at least by writing test cases for the  \nfunctionality I'm changing here if I had a good idea of how to start.  \nWould it be sufficient to make something like \"GIT_CHECKOUT=~/src/git  \nmake check\" work?\n\n-- Brian\n"},{"id":"107852","messageId":"20090312170454.GA2150@pengutronix.de","threadId":"18274","inReplyTo":"F3665462-16BC-42D6-BE28-F66CF48CEB9B@dartmouth.edu","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2009-03-12T17:04:54Z","receivedAt":"2009-03-12T17:04:54Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Brian,\n\nOn Thu, Mar 12, 2009 at 12:41:45PM -0400, Brian Campbell wrote:\n>> IMHO we should reuse as much as possible from git.git.  For me even\n>> requiring a git.git checkout to use its files would be OK.  I consider\n>> that even better then duplicating the relevant files.\n>\n> Hmm. How would the tests find your git working tree? I'd be willing to  \n> start the process off at least by writing test cases for the  \n> functionality I'm changing here if I had a good idea of how to start.  \n> Would it be sufficient to make something like \"GIT_CHECKOUT=~/src/git  \n> make check\" work?\nYes, this would be a good start.  I would call it GIT_SRC, but that's up\nto you.\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\n"},{"id":"107995","messageId":"7vvdqcejj2.fsf@gitster.siamese.dyndns.org","threadId":"18274","inReplyTo":"20090312152630.GA26379@piper.oerlikon.madduck.net","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-14T05:54:41Z","receivedAt":"2009-03-14T05:54:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"martin f krafft <madduck@madduck.net> writes:\n\n> also sprach Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2009.03.12.1620 +0100]:\n>> IMHO we should reuse as much as possible from git.git.  For me even\n>> requiring a git.git checkout to use its files would be OK.  I consider\n>> that even better then duplicating the relevant files.\n>\n> Maybe we could even start to think about integrating TopGit back\n> into git.git?\n\nHeh, it would need massive style fixes before that happens. I am fairly\npicky on shell script styles.\n"},{"id":"108010","messageId":"20090314124748.GA26082@pengutronix.de","threadId":"18274","inReplyTo":"7vvdqcejj2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/2] [TopGit] Portability: Don't use alternation (\"|\") in sed regular expressions","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2009-03-14T12:47:48Z","receivedAt":"2009-03-14T12:47:48Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nOn Fri, Mar 13, 2009 at 10:54:41PM -0700, Junio C Hamano wrote:\n> martin f krafft <madduck@madduck.net> writes:\n> \n> > also sprach Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2009.03.12.1620 +0100]:\n> >> IMHO we should reuse as much as possible from git.git.  For me even\n> >> requiring a git.git checkout to use its files would be OK.  I consider\n> >> that even better then duplicating the relevant files.\n> >\n> > Maybe we could even start to think about integrating TopGit back\n> > into git.git?\n> \n> Heh, it would need massive style fixes before that happens. I am fairly\n> picky on shell script styles.\nme, too.  That's one of my todo list items, independently from martin's\nsuggestion.  (More to the bottom of that list, though.)\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                              | Uwe Kleine-König            |\nIndustrial Linux Solutions                    | http://www.pengutronix.de/  |\n"}]}