{"thread":{"id":"17123","subject":"rebase-merge/done: No such file or directory","startedAt":"2009-01-12T19:13:18Z","lastAt":"2009-01-13T08:20:44Z","messageCount":5,"participants":["jidanni@jidanni.org","Johannes Schindelin","Adeodato Simó","Junio C Hamano","Pierre Habouzit"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"100170","messageId":"87ocycjq29.fsf@jidanni.org","threadId":"17123","inReplyTo":null,"subject":"rebase-merge/done: No such file or directory","fromName":"","fromEmail":"jidanni@jidanni.org","sentAt":"2009-01-12T19:13:18Z","receivedAt":"2009-01-12T19:13:18Z","isPatch":false,"sender":{"key":"jidanni@jidanni.org","avatar":"https://gravatar.com/avatar/36568d4af4c8d3e71627ef3b8c8d00e39065b12f29676cccd38ced75e68fa2a6?d=mp&s=160"},"body":"Bug at git-rebase--interactive.sh:107: count=$(grep -c '^[^#]' < \"$DONE\")\n\n$DONE might not exist. Do test -f $DONE before you grep it.\n\nThis will happen if the user gave a wrong squash choice.\n\n$ git rebase --interactive ...\nWaiting for Emacs...\ngrep: .git/rebase-merge/done: No such file or directory\nCannot 'squash' without a previous commit\n"},{"id":"100186","messageId":"alpine.DEB.1.00.0901122342420.3586@pacific.mpi-cbg.de","threadId":"17123","inReplyTo":"87ocycjq29.fsf@jidanni.org","subject":"Re: rebase-merge/done: No such file or directory","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-12T22:47:47Z","receivedAt":"2009-01-12T22:47:47Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 13 Jan 2009, jidanni@jidanni.org wrote:\n\n> Bug at git-rebase--interactive.sh:107: count=$(grep -c '^[^#]' < \"$DONE\")\n\nWoohoo.  Buuuug.\n\n> $DONE might not exist. Do test -f $DONE before you grep it.\n\nI cannot reproduce here.  Since all the files in .git/rebase-merge/ are \ninternal files to rebase--interactive, I think we do not have to guard \nagainst any possible user action rendering assumptions about internals \ninvalid.\n\nWasting a minute, I seem to understand why I cannot reproduce.  Just \nlooking all of _two_ lines above the line you mentioned:\n\n\tsed -e 1q < \"$TODO\" >> \"$DONE\"\n\nHrmpf.  You're right.  The user could have removed \"$DONE\"e between the \ntwo lines ;-)\n\nHth,\nDscho\n"},{"id":"100190","messageId":"20090112230228.GA28545@chistera.yi.org","threadId":"17123","inReplyTo":"alpine.DEB.1.00.0901122342420.3586@pacific.mpi-cbg.de","subject":"Re: rebase-merge/done: No such file or directory","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2009-01-12T23:02:28Z","receivedAt":"2009-01-12T23:02:28Z","isPatch":false,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Johannes Schindelin [Mon, 12 Jan 2009 23:47:47 +0100]:\n\n> > $DONE might not exist. Do test -f $DONE before you grep it.\n\n> I cannot reproduce here.  Since all the files in .git/rebase-merge/ are \n> internal files to rebase--interactive, I think we do not have to guard \n> against any possible user action rendering assumptions about internals \n> invalid.\n\n> Wasting a minute, I seem to understand why I cannot reproduce.  Just \n> looking all of _two_ lines above the line you mentioned:\n\n> \tsed -e 1q < \"$TODO\" >> \"$DONE\"\n\n> Hrmpf.  You're right.  The user could have removed \"$DONE\"e between the \n> two lines ;-)\n\nNo, not really. Start a rebase -i. Change the *first* \"pick\" to a\n\"squash\". Save and exit the editor. You'll see the output jidanni\nmentioned:\n\n  grep: .git/rebase-merge/done: No such file or directory\n  Cannot 'squash' without a previous commit\n\nThe second line tells the user what happened (what their error was), but\nI guess we could do without the first one.\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \nDebugging is twice as hard as writing the code in the first place. Therefore,\nif you write the code as cleverly as possible, you are, by definition, not\nsmart enough to debug it.\n                -- Brian W. Kernighan\n"},{"id":"299089","messageId":"1231801776-20724-1-git-send-email-madcoder@debian.org","threadId":"17123","inReplyTo":"20090112230228.GA28545@chistera.yi.org","subject":"[PATCH] Avoid spurious error messages on error mistakes.","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2009-01-12T23:09:36Z","receivedAt":"2009-01-12T23:09:36Z","isPatch":true,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"Prior to that, if the user chose \"squash\" as a first action, the stderr\nlooked like:\n\n    grep: /home/madcoder/dev/scm/git/.git/rebase-merge/done: No such file or directory\n    Cannot 'squash' without a previous commit\n\nNow the first line is gone.\n\nSigned-off-by: Pierre Habouzit <madcoder@debian.org>\n---\n git-rebase--interactive.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex c8b0861..8ed2244 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -349,7 +349,7 @@ do_next () {\n \tsquash|s)\n \t\tcomment_for_reflog squash\n \n-\t\thas_action \"$DONE\" ||\n+\t\ttest -f \"$DONE\" && has_action \"$DONE\" ||\n \t\t\tdie \"Cannot 'squash' without a previous commit\"\n \n \t\tmark_action_done\n-- \n1.6.1.161.g5e07b.dirty\n\n"},{"id":"100250","messageId":"7vk58zd3c3.fsf@gitster.siamese.dyndns.org","threadId":"17123","inReplyTo":"1231801776-20724-1-git-send-email-madcoder@debian.org","subject":"Re: [PATCH] Avoid spurious error messages on error mistakes.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-13T08:20:44Z","receivedAt":"2009-01-13T08:20:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pierre Habouzit <madcoder@debian.org> writes:\n\n> Prior to that, if the user chose \"squash\" as a first action, the stderr\n> looked like:\n>\n>     grep: /home/madcoder/dev/scm/git/.git/rebase-merge/done: No such file or directory\n>     Cannot 'squash' without a previous commit\n>\n> Now the first line is gone.\n>\n> Signed-off-by: Pierre Habouzit <madcoder@debian.org>\n> ---\n>  git-rebase--interactive.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index c8b0861..8ed2244 100755\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -349,7 +349,7 @@ do_next () {\n>  \tsquash|s)\n>  \t\tcomment_for_reflog squash\n>  \n> -\t\thas_action \"$DONE\" ||\n> +\t\ttest -f \"$DONE\" && has_action \"$DONE\" ||\n>  \t\t\tdie \"Cannot 'squash' without a previous commit\"\n>  \n>  \t\tmark_action_done\n> -- \n> 1.6.1.161.g5e07b.dirty\n\nMake sense.  Will apply to maint.\n"}]}