# git-quiltimport complaining yet still working

6 messages from 2007-04-13 to 2007-04-14. Participants: Greg KH, Don Zickus, Linus Torvalds, Junio C Hamano.
Thread: https://gitlist.dev/t/7648

## Greg KH, 2007-04-13 20:38

Subject: git-quiltimport complaining yet still working
Message-ID: <20070413203837.GA27660@kroah.com>
URL: https://gitlist.dev/e/20070413203837.GA27660%40kroah.com

```
In git 1.5.1 the quiltimport function started complaining in a new way:

	libata-clear-tf-before-doing-request-sense.patch
	Patch is empty.  Was is split wrong?
	/usr/bin/git-quiltimport: line 78: stop_here: command not found

yet it still applies the patch properly.

For an example of patches that causes this output, the -stable kernel
tree queue can be used (which is where I started seeing this problem...)

Any hints?  Or is it time to start bisecting?

thanks,

greg k-h

```

## Don Zickus, 2007-04-13 21:13

Subject: Re: git-quiltimport complaining yet still working
Message-ID: <68948ca0704131413t687c7196h70c6cc8c316b640e@mail.gmail.com>
URL: https://gitlist.dev/e/68948ca0704131413t687c7196h70c6cc8c316b640e%40mail.gmail.com
In-Reply-To: <20070413203837.GA27660@kroah.com>

```
On 4/13/07, Greg KH <greg@kroah.com> wrote:
> In git 1.5.1 the quiltimport function started complaining in a new way:
>
>         libata-clear-tf-before-doing-request-sense.patch
>         Patch is empty.  Was is split wrong?
>         /usr/bin/git-quiltimport: line 78: stop_here: command not found

Sorry about that.  I assumed all the scripts using git-mailinfo had
the stop_here command.  Not sure why I made that assumption.

I changed the behaviour of git-mailinfo to allow empty patches and
have the scripts check if a patch was empty and fail.  Unfortunately,
I incorrectly applied the change to git-quiltimport.

Anyway the following should fix it.

Signed-off-by: Don Zickus <dzickus@redhat.com>


diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index edccd82..0d20dc5 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -75,7 +75,7 @@ for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
 	(cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
 	test -s $dotest/patch || {
 		echo "Patch is empty.  Was is split wrong?"
-		stop_here $this
+		exit 3
 	}
 
 	# Parse the author information

```

## Greg KH, 2007-04-13 21:19

Subject: Re: git-quiltimport complaining yet still working
Message-ID: <20070413211913.GA7134@kroah.com>
URL: https://gitlist.dev/e/20070413211913.GA7134%40kroah.com
In-Reply-To: <68948ca0704131413t687c7196h70c6cc8c316b640e@mail.gmail.com>

```
On Fri, Apr 13, 2007 at 05:13:58PM -0400, Don Zickus wrote:
> On 4/13/07, Greg KH <greg@kroah.com> wrote:
> >In git 1.5.1 the quiltimport function started complaining in a new way:
> >
> >        libata-clear-tf-before-doing-request-sense.patch
> >        Patch is empty.  Was is split wrong?
> >        /usr/bin/git-quiltimport: line 78: stop_here: command not found
> 
> Sorry about that.  I assumed all the scripts using git-mailinfo had
> the stop_here command.  Not sure why I made that assumption.
> 
> I changed the behaviour of git-mailinfo to allow empty patches and
> have the scripts check if a patch was empty and fail.  Unfortunately,
> I incorrectly applied the change to git-quiltimport.
> 
> Anyway the following should fix it.
> 
> Signed-off-by: Don Zickus <dzickus@redhat.com>

> diff --git a/git-quiltimport.sh b/git-quiltimport.sh
> index edccd82..0d20dc5 100755
> --- a/git-quiltimport.sh
> +++ b/git-quiltimport.sh
> @@ -75,7 +75,7 @@ for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
>  	(cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
>  	test -s $dotest/patch || {
>  		echo "Patch is empty.  Was is split wrong?"
> -		stop_here $this
> +		exit 3

Are you sure?  This will exit, and yet, there was nothing really wrong
with the patch in the first place (as proven by the fact that it is
applied properly.)

Or did the patch format that can be accepted by git-quiltimport suddenly
change somehow?  I'm passing mbox-like files to it, and have been since
it was created.  To change this, is fine, but let me know what format
is now needed please.

thanks,

greg k-h

```

## Linus Torvalds, 2007-04-13 21:34

Subject: Re: git-quiltimport complaining yet still working
Message-ID: <Pine.LNX.4.64.0704131431040.28042@woody.linux-foundation.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0704131431040.28042%40woody.linux-foundation.org
In-Reply-To: <20070413203837.GA27660@kroah.com>

```


On Fri, 13 Apr 2007, Greg KH wrote:
>
> In git 1.5.1 the quiltimport function started complaining in a new way:
> 
> 	libata-clear-tf-before-doing-request-sense.patch
> 	Patch is empty.  Was is split wrong?
> 	/usr/bin/git-quiltimport: line 78: stop_here: command not found

This is an *old* bug. It got fixed once already. Did it get re-introduced?

Ahh - somebody copied the bug from git-applymbox

> Any hints?  Or is it time to start bisecting?

This should fix it.

There were two bugs: "stop_here" doesn't exist, but the bug that causes 
this code to trigger in the *first* place is the wrong use of "$dotest". 
It should be ".dotest"

		Linus

---
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index edccd82..018cc75 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -73,9 +73,9 @@ mkdir $tmp_dir || exit 2
 for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
 	echo $patch_name
 	(cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
-	test -s $dotest/patch || {
+	test -s .dotest/patch || {
 		echo "Patch is empty.  Was is split wrong?"
-		stop_here $this
+		exit 1
 	}
 
 	# Parse the author information

```

## Junio C Hamano, 2007-04-13 22:42

Subject: Re: git-quiltimport complaining yet still working
Message-ID: <7vodlrc2vt.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vodlrc2vt.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.64.0704131431040.28042@woody.linux-foundation.org>

```
Linus Torvalds <torvalds@linux-foundation.org> writes:

> This should fix it.
>
> There were two bugs: "stop_here" doesn't exist, but the bug that causes 
> this code to trigger in the *first* place is the wrong use of "$dotest". 
> It should be ".dotest"

I am quite sure that I've said the same thing as above in my
earlier message to fix this exact thing, but as usual I appear
to have sent it to the list and then forgot to apply it myself.

Thanks.

```

## Greg KH, 2007-04-14 03:57

Subject: Re: git-quiltimport complaining yet still working
Message-ID: <20070414035726.GA6488@kroah.com>
URL: https://gitlist.dev/e/20070414035726.GA6488%40kroah.com
In-Reply-To: <Pine.LNX.4.64.0704131431040.28042@woody.linux-foundation.org>

```
On Fri, Apr 13, 2007 at 02:34:18PM -0700, Linus Torvalds wrote:
> 
> 
> On Fri, 13 Apr 2007, Greg KH wrote:
> >
> > In git 1.5.1 the quiltimport function started complaining in a new way:
> > 
> > 	libata-clear-tf-before-doing-request-sense.patch
> > 	Patch is empty.  Was is split wrong?
> > 	/usr/bin/git-quiltimport: line 78: stop_here: command not found
> 
> This is an *old* bug. It got fixed once already. Did it get re-introduced?
> 
> Ahh - somebody copied the bug from git-applymbox
> 
> > Any hints?  Or is it time to start bisecting?
> 
> This should fix it.
> 
> There were two bugs: "stop_here" doesn't exist, but the bug that causes 
> this code to trigger in the *first* place is the wrong use of "$dotest". 
> It should be ".dotest"

Thanks, that seems to do the trick for me.

greg k-h

```
