Skip to contentSkip to conversation

Tweak git-quiltimport to allow more flexible series format

PATCH In review Alexey Dobriyan 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Tweak git-quiltimport to allow more flexible series format

Make quiltimport also understand comments following patch name.

---

 git-quiltimport.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
git-quiltimport.sh +1 -1
@@ -63,7 +63,7 @@ tmp_info="$tmp_dir/info"
 commit=$(git rev-parse HEAD)
 
 mkdir $tmp_dir || exit 2
-for patch_name in $(grep -v '^#' < "$QUILT_PATCHES/series" ); do
+for patch_name in $(sed -e 's/#.*//' < "$QUILT_PATCHES/series" ); do
 	if ! [ -f "$QUILT_PATCHES/$patch_name" ] ; then
 		echo "$patch_name doesn't exist. Skipping."
 		continue
#1 lore raw
Quoted 11 lines · Alexey Dobriyan

Make quiltimport also understand comments following patch name.

---

 git-quiltimport.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

git-quiltimport.sh tmp_info="$tmp_dir/info" · line 69

Quoted 8 lines
git-quiltimport.sh +1 -1
@@ -63,7 +63,7 @@ tmp_info="$tmp_dir/info"
 commit=$(git rev-parse HEAD)
 
 mkdir $tmp_dir || exit 2
-for patch_name in $(grep -v '^#' < "$QUILT_PATCHES/series" ); do
+for patch_name in $(sed -e 's/#.*//' < "$QUILT_PATCHES/series" ); do
 	if ! [ -f "$QUILT_PATCHES/$patch_name" ] ; then
 		echo "$patch_name doesn't exist. Skipping."
 		continue

Is this consistent with the way quilt groks the series file?

IOW, does quilt forbid patchfile whose name contains a hash, and anything after a hash on the line is taken as comment?

Can a line in a quilt series file name more than one patchfile? If so, are they whitespace separated?

#2 lore raw
Quoted 24 lines · Junio C Hamano
Quoted 11 lines · Alexey Dobriyan

Make quiltimport also understand comments following patch name.

---

 git-quiltimport.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

git-quiltimport.sh tmp_info="$tmp_dir/info" · line 69

Quoted 8 lines
git-quiltimport.sh +1 -1
@@ -63,7 +63,7 @@ tmp_info="$tmp_dir/info"
 commit=$(git rev-parse HEAD)
 
 mkdir $tmp_dir || exit 2
-for patch_name in $(grep -v '^#' < "$QUILT_PATCHES/series" ); do
+for patch_name in $(sed -e 's/#.*//' < "$QUILT_PATCHES/series" ); do
 	if ! [ -f "$QUILT_PATCHES/$patch_name" ] ; then
 		echo "$patch_name doesn't exist. Skipping."
 		continue

Is this consistent with the way quilt groks the series file?

Quoted 2 lines

IOW, does quilt forbid patchfile whose name contains a hash, and anything after a hash on the line is taken as comment?

It looks like hash inside a patch name is legal.

Quoted 1 line

Can a line in a quilt series file name more than one patchfile?

No. Which means we can probably do sed -e 's/^#//' -e 's/[ \t]#.*//' ... let me experiment bit more.

Quoted 1 line

If so, are they whitespace separated?