Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading ignored/untracked files in Git #6

Merged
merged 1 commit into from
Aug 2, 2016

Conversation

Phanx
Copy link
Contributor

@Phanx Phanx commented Aug 2, 2016

I admit I'm not very knowledgable about the internal workings of Git (or bash scripting, for that matter) but the command you were using was reading the files from the current working directory (the packager's repo) rather than the addon's directory ($topdir).

If it matters, I'm using this file structure:

AddOns
    Grid
        .git
        Grid.toc
        -- other files
     zzz-packager
        .git
        release.sh

And I'm running the packager from the zzz-packager directory with this command:

./release.sh -t ../Grid

Running your line in the terminal, I couldn't get any variation on paths -- relative or absolute, to Grid or Grid/.git -- to work with --git-dir. Everything I tried either listed the packager's ignored/untracked files instead, or just gave an error stating that the given path wasn't a git repository.

Based on this StackOverflow post your way might work if you also added --work-tree, but -C works as expected already and is a lot shorter:

-C
Run as if git was started in instead of the current working directory.

(From https://git-scm.com/docs/git)

@nebularg
Copy link
Member

nebularg commented Aug 2, 2016

I've always run the script from the repo dir so I didn't notice it ignores --git-dir. Makes sense considering untracked/ignored files aren't stored as metadata. I should probably switch to -C everywhere else, too, seems closer to what I wanted than --git-dir.

@nebularg nebularg merged commit 39edb30 into BigWigsMods:master Aug 2, 2016
@Phanx Phanx deleted the fix-gitignores branch August 2, 2016 14:34
@Phanx Phanx restored the fix-gitignores branch August 3, 2016 15:28
@Phanx Phanx deleted the fix-gitignores branch August 10, 2016 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants