Opened on 03/30/17 at 11:50:10
Last modified on 10/19/18 at 00:10:54
#2960 accepted defect
RSB: Reports modified Git version in case RSB is a Git submodule
Reported by: | Sebastian Huber | Owned by: | Chris Johns |
---|---|---|---|
Priority: | normal | Milestone: | Indefinite |
Component: | tool/rsb | Version: | 6 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
In case the RSB is used as a Git submodules the git status yields
git status # HEAD detached at b64b38e nothing to commit, working directory clean
leading to
RTEMS Source Builder - Set Builder, 4.12 (b64b38ef076c modified)
Change History (9)
comment:1 follow-up: 2 Changed on 03/30/17 at 20:44:03 by Chris Johns
comment:2 Changed on 03/31/17 at 04:55:34 by Sebastian Huber
Replying to Chris Johns:
Is the bug you would like fixed the
modified
being added to the git hash?
Yes I think so, nothing is modified. I had some problems to understand the git.status() function in git.py.
comment:3 Changed on 03/31/17 at 04:59:40 by Chris Johns
The status function should return a dict of discovered states. I wonder if the last elif
should be an if
?
comment:4 follow-up: 5 Changed on 06/08/17 at 09:09:54 by Sebastian Huber
I tried to fix this, but I have no idea what repo.status() is supposed to do (especially the last elif part).
comment:5 Changed on 09/22/17 at 01:27:03 by Chris Johns
Replying to Sebastian Huber:
I have no idea what repo.status() is supposed to do (especially the last elif part).
The last elif
part when there is a valid state picks of the content of a section of the status
output. For example:
Untracked files: (use "git add <file>..." to include in what will be committed) x
The _state
is selected and then the contents of the state are parsed and added to the state or a new state is selected.
comment:6 Changed on 09/22/17 at 01:45:26 by Chris Johns
I can ignore a detached HEAD as condition for being dirty. That seems reasonable.
I will also ignore untracked files. They should be ignored in a build if nothing is modified. It does assume the build is not modified by untracked files. Untracked cannot be easily handled as I cannot look into the files or make assumptions. This is a change to the initial implementation but I am seeing tool builds with up to date repos that have untracked files like logs, or patches and that is not a true indication of the state. Needing a completely clean directory does seem a little onerous.
Is a modified submodule considered dirty? I think so. For example:
$ git st On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: freebsd-org (new commits, untracked content)
comment:7 Changed on 11/09/17 at 06:27:14 by Sebastian Huber
Milestone: | 4.12.0 → 5.1 |
---|
Milestone renamed
comment:8 Changed on 10/14/18 at 00:54:02 by Chris Johns
Status: | new → accepted |
---|
comment:9 Changed on 10/19/18 at 00:10:54 by Chris Johns
Milestone: | 5.1 → Indefinite |
---|---|
Version: | → 6 |
Is the bug you would like fixed the
modified
being added to the git hash?