{"thread":{"id":"12638","subject":"How to ignore deleted files","startedAt":"2008-03-11T12:58:43Z","lastAt":"2008-03-11T18:03:21Z","messageCount":6,"participants":["Andreas Hildebrandt","Jakub Narebski","Santi Béjar","David Tweed","Sergio Callegari"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"71702","messageId":"47D68203.10905@bioinf.uni-sb.de","threadId":"12638","inReplyTo":null,"subject":"How to ignore deleted files","fromName":"Andreas Hildebrandt","fromEmail":"anhi@bioinf.uni-sb.de","sentAt":"2008-03-11T12:58:43Z","receivedAt":"2008-03-11T12:58:43Z","isPatch":false,"sender":{"key":"anhi@bioinf.uni-sb.de","avatar":null},"body":"Dear all,\n\nour git repository contains a number of .tar.gz - files that are\nautomatically extracted and then deleted during the build process.\nUnfortunately, commiting any changes after that step will mark those\nfiles as deleted and try to commit that to the repository. Is there any\nway to tell git to ignore those files automatically (apart from changing\nour build process not to use or not to delete those files)?\n\nSorry if I overlooked something obvious,\n\nAndreas Hildebrandt\n"},{"id":"71709","messageId":"m3y78pxsf5.fsf@localhost.localdomain","threadId":"12638","inReplyTo":"47D68203.10905@bioinf.uni-sb.de","subject":"Re: How to ignore deleted files","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-03-11T14:10:57Z","receivedAt":"2008-03-11T14:10:57Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Andreas Hildebrandt <anhi@bioinf.uni-sb.de> writes:\n\n> Dear all,\n> \n> our git repository contains a number of .tar.gz - files that are\n> automatically extracted and then deleted during the build process.\n> Unfortunately, commiting any changes after that step will mark those\n> files as deleted and try to commit that to the repository. Is there any\n> way to tell git to ignore those files automatically (apart from changing\n> our build process not to use or not to delete those files)?\n\nI don't quite understand: are those .tar.gz files stored in _source_\nrepository? That would be a bit strange...\n\nI guess that you have tried adding \"*.tar.gz\" to either .gitignore or\n.git/info/excludes file?\n\nAnother solution would be (if they are truly needed to reside in\nrepository) to re-checkout them as a last part of build process /\nafter-build process.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"71713","messageId":"47D69CE0.3030505@bioinf.uni-sb.de","threadId":"12638","inReplyTo":"m3y78pxsf5.fsf@localhost.localdomain","subject":"Re: How to ignore deleted files","fromName":"Andreas Hildebrandt","fromEmail":"anhi@bioinf.uni-sb.de","sentAt":"2008-03-11T14:53:20Z","receivedAt":"2008-03-11T14:53:20Z","isPatch":false,"sender":{"key":"anhi@bioinf.uni-sb.de","avatar":null},"body":"Dear Jakub!\n\nJakub Narebski schrieb:\n>> our git repository contains a number of .tar.gz - files that are\n>> automatically extracted and then deleted during the build process.\n>> Unfortunately, commiting any changes after that step will mark those\n>> files as deleted and try to commit that to the repository. Is there any\n>> way to tell git to ignore those files automatically (apart from changing\n>> our build process not to use or not to delete those files)?\n>>     \n>\n> I don't quite understand: are those .tar.gz files stored in _source_\n> repository? That would be a bit strange...\n>\n>   \n\nI absolutetly agree that it's strange. The main reason for this is that\nwe have some collections of data files (some of them pretty large) that\ncan be compressed pretty effectively. At compilation time, it is decided\nif the files are needed or not. If so, they are extracted. In the end,\nthe .tar.gz files are deleted since they are no longer needed. In\naddition, once a user obtained a checkout, the whole thing is supposed\nto work without a further net connection, so downloading the files\nduring build is not really an option.\n\n> I guess that you have tried adding \"*.tar.gz\" to either .gitignore or\n> .git/info/excludes file?\n>   \nI did, but as far as I understand it, these only work for untracked\nfiles, and the files themselves are tracked (from time to time, they\nchange and the idea was to track those changes). Or am I missing\nsomething here?\n\nbtw: I just noted that\n\ngit-commit $(git-ls-files -m --exclude-from=.git/info/exclude)\n\nwith the correct entries in the exclude file seems to do pretty much\nwhat I want it to do, namely finding all modifications apart from those\nmentioned in the exclude file and commiting them. Would this be a sane\nstrategy to handle things before we can maybe some day re-structure our\nbuild process?\n\n\nThanks a lot for your help!\n\nAndreas Hildebrandt\n"},{"id":"71720","messageId":"8aa486160803110807m277363d6kaf7e1dd401fc9e2f@mail.gmail.com","threadId":"12638","inReplyTo":"47D69CE0.3030505@bioinf.uni-sb.de","subject":"Re: How to ignore deleted files","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2008-03-11T15:07:13Z","receivedAt":"2008-03-11T15:07:13Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Tue, Mar 11, 2008 at 3:53 PM, Andreas Hildebrandt\n<anhi@bioinf.uni-sb.de> wrote:\n>\n>  I absolutetly agree that it's strange. The main reason for this is that\n>  we have some collections of data files (some of them pretty large) that\n>  can be compressed pretty effectively. At compilation time, it is decided\n>  if the files are needed or not. If so, they are extracted. In the end,\n>  the .tar.gz files are deleted since they are no longer needed. In\n>  addition, once a user obtained a checkout, the whole thing is supposed\n>  to work without a further net connection, so downloading the files\n>  during build is not really an option.\n\nMaybe you can have a look to pristine-tar. From:\n\nhttp://kitenet.net/~joey/code/pristine-tar/\n\npristine-tar can regenerate a pristine upstream tarball using only a\nsmall binary delta file and a copy of the source which can be a\nrevision control checkout.\n\nThe package also includes a pristine-gz command, which can regenerate\na pristine .gz file.\n\nThe delta file is designed to be checked into revision control\nalong-side the source code, thus allowing the original tarball to be\nextracted from revision control.\n\n---------------------\n\nSo you can recreate the tar from files in a git branch.\n\nSanti\n"},{"id":"71727","messageId":"e1dab3980803110843u3fdf2189xf5931f1cb5526ff9@mail.gmail.com","threadId":"12638","inReplyTo":"47D69CE0.3030505@bioinf.uni-sb.de","subject":"Re: How to ignore deleted files","fromName":"David Tweed","fromEmail":"david.tweed@gmail.com","sentAt":"2008-03-11T15:43:47Z","receivedAt":"2008-03-11T15:43:47Z","isPatch":false,"sender":{"key":"david.tweed@gmail.com","avatar":null},"body":"On Tue, Mar 11, 2008 at 2:53 PM, Andreas Hildebrandt\n<anhi@bioinf.uni-sb.de> wrote:\n>  I absolutetly agree that it's strange. The main reason for this is that\n>  we have some collections of data files (some of them pretty large) that\n>  can be compressed pretty effectively. At compilation time, it is decided\n>  if the files are needed or not. If so, they are extracted. In the end,\n>  the .tar.gz files are deleted since they are no longer needed. In\n\nThis is probably a silly questions: why are you actually deleting the\ntar.gz files? If they compress the data files well, then any storage\nrequirement for keeping them is dwarfed by the size of the unpacked\ndata files (presumably). If a minor tweak to your build process avoids\nmore complicated git scripting, that sounds a reasonable trade-off.\n\n-- \ncheers, dave tweed__________________________\ndavid.tweed@gmail.com\nRm 124, School of Systems Engineering, University of Reading.\n\"while having code so boring anyone can maintain it, use Python.\" --\nattempted insult seen on slashdot\n"},{"id":"71745","messageId":"loom.20080311T180018-539@post.gmane.org","threadId":"12638","inReplyTo":"8aa486160803110807m277363d6kaf7e1dd401fc9e2f@mail.gmail.com","subject":"Git and pristine-tar","fromName":"Sergio Callegari","fromEmail":"sergio.callegari@gmail.com","sentAt":"2008-03-11T18:03:21Z","receivedAt":"2008-03-11T18:03:21Z","isPatch":false,"sender":{"key":"sergio.callegari@gmail.com","avatar":"https://gravatar.com/avatar/c98f41317e0422c1e630385de0e3970227b8e5ad15f35ba8586066467cc833bc?d=mp&s=160"},"body":"> Maybe you can have a look to pristine-tar. From:\n> \n> http://kitenet.net/~joey/code/pristine-tar/\n> \n\nI have just given a look to pristine tar.  If I understand correctly what it\ndoes, I believe it would be very nice to have a pristine zip too. That should\ndo the job nicely with all opendocument files, making openoffice document\nmanagement with git very parsimonious on storage.\n\nAm I correct?\n"}]}