Comments (4)
I see what you mean. I think for now it would be valuable to have the --fail-if-unpushed
could solve the problem if this could be specified together with the --fail-if-dirty
then we can have the alias alias git='f(){ if ! gitman list --fail-if-dirty --fail-if-unpushed > /dev/null; then gitman list --fail-if-dirty --fail-if-unpushed; fi; git "$@"; unset -f f; }; f'
as well as have the gitman list --fail-if-dirty --fail-if-unpushed
in a pre-commit hook.
I guess it is not possible for git
to be aware of changes made introduced by another tool (gitman
) so until then the above alias will solve it.
from gitman.
To be clear, are you proposing that --fail-if-dirty
should cause gitman
to return an error if there are any unpushed changes?
Generally, "dirty" does not refer to unpushed changes so perhaps a new --fail-if-unpushed
option is in order?
from gitman.
Yes, I would like gitman
to return an error (exit code 1) if changes are found in any dependency repositories. This could be used by other scripts.
At least in our use of git submodules
, we work directly in the submodule to test the changes in the context of where they are used. If they are sourced directly with no changes, I guess the functionality of gitman
would cover this. When/if we make any changes to a submodule, git
will indicate modified: ../../[path-to-submodule] (modified content)
, which will allow the developer to commit and push the change to the submodule. In an ideal world, git
would also recognize changes in gitman
dependency repositories.
I would actually prefer to minimize the number of flags, as a single flag could cover both --fail-if-dirty
and --fail-if-unpushed
(unless there is a specific reason for separating the flags). However, the problem still exists if git
does not recognize these changes locally, so we would need to have a custom alias for git
(as in previous comment) to ensure we execute the correct gitman
command to verify these local changes to any dependency repositories.
Alternatively, we could include gitman
list in a pre-commit
hook to avoid missing any local changes to the dependency repository. The exit code would be valuable here as well.
from gitman.
My initial thought on why --fail-if-dirty
should not care about remote repositories is that it currently operates using the same mechanism install
uses to check for changes that will be overwritten. That is to say, if gitman list --fail-if-dirty
fails, then gitman install
will necessary fail unless the --force
option is added.
from gitman.
Related Issues (20)
- Default groups aren't honored for recursive installs/updates HOT 2
- Question: Is it possible to symlink a sub folder of the repository? HOT 5
- Using install and `--fetch`, gitman does not reset local branch to the remote version HOT 2
- Support for installing in "bare" with depth=1 and no .git folder HOT 4
- Document every field available in configuration files HOT 3
- Changes to 'sparse_paths' are not reflected on subsequent installs HOT 3
- UnicodeDecodeError occurs when running gitman update/install in Windows HOT 2
- Add dependencies from the CLI
- Clone sources in parallel
- Fix failing tests on Windows
- find_nested_configs does not use depth value or find depth > 2 packages HOT 2
- Authentication for HTTPS cloning HOT 7
- Symbolic links in nested repositories change after running gitman install HOT 9
- Support creating hard links (in additional to symlinks) HOT 7
- filter_nested_configs is doing the opposite of what it should HOT 6
- About using gitman with CR/LF line ending setting HOT 2
- Reattach HEAD if revision is locked HOT 3
- Nested projects are skipped
- Symlinks stored in the repository cannot be overwritten without --force HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitman.