Note that there are some explanatory texts on larger screens.

plurals
  1. POGit issue - git archive handling files with space in their names
    primarykey
    data
    text
    <p>I am having trouble while handling <code>filenames</code> having space in them. </p> <p>I use the below piece of <code>script</code> to fetch the files contained in a <code>push onto</code> a folder in a <code>zip</code> format and later <code>unzip</code> the files.</p> <pre><code>tempdir=$(mktemp -d /apps/sample/XXXX) while read oldrev newrev refname do commits=`git rev-list $oldrev..$newrev` for commit in $commits do git diff-tree -z --no-commit-id --name-only -r $commit | xargs -0 git archive -o $tempdir/list.zip HEAD: unzip $tempdir/list.zip -d $scandir rm -rf /apps/sample/list.zip done done exit 0 </code></pre> <p>In the below example, I added and committed the file <code>SAMPLE FILE.txt</code>. The thing is when <code>git archive</code> command encounters a space, i get the error below.</p> <pre><code>[root@inba2 repo]# git push origin master Counting objects: 4, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 296 bytes, done. Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. remote: fatal: path not found: SAMPLE FILE.txt remote: Archive: /apps/sample/l7Im/list.zip remote: End-of-central-directory signature not found. Either this file is not remote: a zipfile, or it constitutes one disk of a multi-part archive. In the remote: latter case the central directory and zipfile comment will be found on remote: the last disk(s) of this archive. remote: unzip: cannot find zipfile directory in one of /apps/sample/l7Im/list.zip or remote: /apps/sample/l7Im/list.zip.zip, and cannot find /apps/sample/l7Im/list.zip.ZIP, period </code></pre> <blockquote> <p>git version is 1.7.1</p> <p>bash version is 4.1.2</p> </blockquote> <p>Help would be appreciated :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload