{"thread":{"id":"40227","subject":"[PATCH] git-quiltimport: add commandline option --series <file>","startedAt":"2015-08-31T12:06:38Z","lastAt":"2015-09-01T18:16:30Z","messageCount":2,"participants":["Juerg Haefliger","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"268987","messageId":"1441022798-6033-1-git-send-email-juerg.haefliger@hp.com","threadId":"40227","inReplyTo":null,"subject":"[PATCH] git-quiltimport: add commandline option --series <file>","fromName":"Juerg Haefliger","fromEmail":"juerg.haefliger@hp.com","sentAt":"2015-08-31T12:06:38Z","receivedAt":"2015-08-31T12:06:38Z","isPatch":true,"sender":{"key":"juerg.haefliger@hp.com","avatar":null},"body":"The quilt series file doesn't have to be located in the same directory\nwith the patches and can be named differently than 'series' as well. This\npatch adds a commandline option to allow for a non-standard series\nfilename and location.\n\nSigned-off-by: Juerg Haefliger <juerg.haefliger@hp.com>\n---\n Documentation/git-quiltimport.txt | 11 +++++++++--\n git-quiltimport.sh                | 16 ++++++++++++++--\n 2 files changed, 23 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt\nindex d64388c..ff633b0 100644\n--- a/Documentation/git-quiltimport.txt\n+++ b/Documentation/git-quiltimport.txt\n@@ -10,6 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git quiltimport' [--dry-run | -n] [--author <author>] [--patches <dir>]\n+\t\t[--series <file>]\n \n \n DESCRIPTION\n@@ -42,13 +43,19 @@ OPTIONS\n \tinformation can be found in the patch description.\n \n --patches <dir>::\n-\tThe directory to find the quilt patches and the\n-\tquilt series file.\n+\tThe directory to find the quilt patches.\n +\n The default for the patch directory is patches\n or the value of the $QUILT_PATCHES environment\n variable.\n \n+--series <file>::\n+\tThe quilt series file.\n++\n+The default for the series file is <patches>/series\n+or the value of the $QUILT_SERIES environment\n+variable.\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nindex 167d79f..6d3a88d 100755\n--- a/git-quiltimport.sh\n+++ b/git-quiltimport.sh\n@@ -6,7 +6,8 @@ git quiltimport [options]\n --\n n,dry-run     dry run\n author=       author name and email address for patches without any\n-patches=      path to the quilt series and patches\n+patches=      path to the quilt patches\n+series=       path to the quilt series file\n \"\n SUBDIRECTORY_ON=Yes\n . git-sh-setup\n@@ -27,6 +28,10 @@ do\n \t\tshift\n \t\tQUILT_PATCHES=\"$1\"\n \t\t;;\n+\t--series)\n+\t\tshift\n+\t\tQUILT_SERIES=\"$1\"\n+\t\t;;\n \t--)\n \t\tshift\n \t\tbreak;;\n@@ -53,6 +58,13 @@ if ! [ -d \"$QUILT_PATCHES\" ] ; then\n \texit 1\n fi\n \n+# Quilt series file\n+: ${QUILT_SERIES:=$QUILT_PATCHES/series}\n+if ! [ -e \"$QUILT_SERIES\" ] ; then\n+\techo \"The \\\"$QUILT_SERIES\\\" file does not exist.\"\n+\texit 1\n+fi\n+\n # Temporary directories\n tmp_dir=\"$GIT_DIR\"/rebase-apply\n tmp_msg=\"$tmp_dir/msg\"\n@@ -135,5 +147,5 @@ do\n \t\tcommit=$( (echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git commit-tree $tree -p $commit) &&\n \t\tgit update-ref -m \"quiltimport: $patch_name\" HEAD $commit || exit 4\n \tfi\n-done 3<\"$QUILT_PATCHES/series\"\n+done 3<\"$QUILT_SERIES\"\n rm -rf $tmp_dir || exit 5\n-- \n2.1.4\n"},{"id":"269118","messageId":"xmqqa8t6ron5.fsf@gitster.mtv.corp.google.com","threadId":"40227","inReplyTo":"1441022798-6033-1-git-send-email-juerg.haefliger@hp.com","subject":"Re: [PATCH] git-quiltimport: add commandline option --series <file>","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-09-01T18:16:30Z","receivedAt":"2015-09-01T18:16:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Juerg Haefliger <juerg.haefliger@hp.com> writes:\n\n> The quilt series file doesn't have to be located in the same directory\n> with the patches and can be named differently than 'series' as well. This\n> patch adds a commandline option to allow for a non-standard series\n> filename and location.\n>\n> Signed-off-by: Juerg Haefliger <juerg.haefliger@hp.com>\n> ---\n>  Documentation/git-quiltimport.txt | 11 +++++++++--\n>  git-quiltimport.sh                | 16 ++++++++++++++--\n>  2 files changed, 23 insertions(+), 4 deletions(-)\n>\n> diff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt\n> index d64388c..ff633b0 100644\n> --- a/Documentation/git-quiltimport.txt\n> +++ b/Documentation/git-quiltimport.txt\n> @@ -10,6 +10,7 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git quiltimport' [--dry-run | -n] [--author <author>] [--patches <dir>]\n> +\t\t[--series <file>]\n>  \n>  \n>  DESCRIPTION\n> @@ -42,13 +43,19 @@ OPTIONS\n>  \tinformation can be found in the patch description.\n>  \n>  --patches <dir>::\n> -\tThe directory to find the quilt patches and the\n> -\tquilt series file.\n> +\tThe directory to find the quilt patches.\n>  +\n>  The default for the patch directory is patches\n>  or the value of the $QUILT_PATCHES environment\n>  variable.\n>  \n> +--series <file>::\n> +\tThe quilt series file.\n> ++\n> +The default for the series file is <patches>/series\n> +or the value of the $QUILT_SERIES environment\n> +variable.\n> +\n\nMakes sense.\n\nI am not a quilt user, but the Internet finds pages like\nhttp://lists.gnu.org/archive/html/quilt-dev/2009-12/msg00021.html\nand http://www.man-online.org/page/1-quilt/, both of which tell me\nthat QUILT_SERIES is an environment variable that has established\nmeaning, and the new use in this patch is consistent with the\nestablished practice.\n\nThanks, will apply.\n\n>  GIT\n>  ---\n>  Part of the linkgit:git[1] suite\n> diff --git a/git-quiltimport.sh b/git-quiltimport.sh\n> index 167d79f..6d3a88d 100755\n> --- a/git-quiltimport.sh\n> +++ b/git-quiltimport.sh\n> @@ -6,7 +6,8 @@ git quiltimport [options]\n>  --\n>  n,dry-run     dry run\n>  author=       author name and email address for patches without any\n> -patches=      path to the quilt series and patches\n> +patches=      path to the quilt patches\n> +series=       path to the quilt series file\n>  \"\n>  SUBDIRECTORY_ON=Yes\n>  . git-sh-setup\n> @@ -27,6 +28,10 @@ do\n>  \t\tshift\n>  \t\tQUILT_PATCHES=\"$1\"\n>  \t\t;;\n> +\t--series)\n> +\t\tshift\n> +\t\tQUILT_SERIES=\"$1\"\n> +\t\t;;\n>  \t--)\n>  \t\tshift\n>  \t\tbreak;;\n> @@ -53,6 +58,13 @@ if ! [ -d \"$QUILT_PATCHES\" ] ; then\n>  \texit 1\n>  fi\n>  \n> +# Quilt series file\n> +: ${QUILT_SERIES:=$QUILT_PATCHES/series}\n> +if ! [ -e \"$QUILT_SERIES\" ] ; then\n> +\techo \"The \\\"$QUILT_SERIES\\\" file does not exist.\"\n> +\texit 1\n> +fi\n> +\n>  # Temporary directories\n>  tmp_dir=\"$GIT_DIR\"/rebase-apply\n>  tmp_msg=\"$tmp_dir/msg\"\n> @@ -135,5 +147,5 @@ do\n>  \t\tcommit=$( (echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git commit-tree $tree -p $commit) &&\n>  \t\tgit update-ref -m \"quiltimport: $patch_name\" HEAD $commit || exit 4\n>  \tfi\n> -done 3<\"$QUILT_PATCHES/series\"\n> +done 3<\"$QUILT_SERIES\"\n>  rm -rf $tmp_dir || exit 5\n"}]}