I have some text files that I would like to include in every commit (if they have changed since the prior commit). What is the right way to make this happen automatically? Or else I forget to add them ...
Adding the files to a _separate_ commit breaks Iceberg, because it decides that the image is behind the repo, but there is no code that it can load to bring it up to date. I’m hoping that if the text files go in the same commit, all will be well. I’ve made some progress with this. I have found that if I have staged the text files before I do the commit with Iceberg, then they will be included in the commit. So what I need is a way of detecting modifications in the local repository (the equivalent of "git status") and then doing a "git add ..." for the changed files. And then, ideally, hooking this into Iceberg. Alternatively, I could I suppose write a pre-commit hook as a shell script and just put it in the .git/hooks directory. |
I'm using the following | repo | repo := IceRepository registry detect: [ :each | each name = 'my-repo' ]. repo addFilesToIndex: {'CHANGELOG.md'}. so then the iceberg commit will also include the (external) file change Peter On Tue, Feb 27, 2018 at 11:06 PM, Andrew P. Black <[hidden email]> wrote: I have some text files that I would like to include in every commit (if they have changed since the prior commit). What is the right way to make this happen automatically? Or else I forget to add them ... |
> On 28 Feb 2018, at 12:32 , Peter Uhnák <[hidden email]> wrote: > > I'm using the following > > | repo | > repo := IceRepository registry detect: [ :each | each name = 'my-repo' ]. > repo addFilesToIndex: {'CHANGELOG.md'}. > > so then the iceberg commit will also include the (external) file change > Thank you! And it turns out that if the file is unchanged, then adding it to the index has no effect, so I can skip that step. Have you hooked the above code into Iceberg, or do you run it manually? Andrew |
> And it turns out that if the file is unchanged, then adding it to the index has no effect, so I can skip that step. this is equivalent to "git add"; further git can only track changes... so adding a file that hasn't changed produces an empty diff But the menus of iceberg are easily extensible (don't remember what exactly you need to subclass)... so you could add a context-menu on a repository with "add file to index" which would open a file dialog. Peter On Wed, Feb 28, 2018 at 1:24 AM, Andrew P. Black <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |