#615: updating git repositories fails for git version 1.6.5.3 ---------------------------+------------------------------------------------ Reporter: rhaas | Owner: eric9 Type: defect | Status: new Priority: major | Milestone: Component: GetComponents | Version: Keywords: | ---------------------------+------------------------------------------------ trying to update a git repository with GetComponents (eg. einsteintoolkit.th) I get (using : {{{ ----------------------------------------------------------------- Updating module: GetComponents from repository: git://github.com/gridaphobe/CRL.git located in: ./bin Executing: git status --porcelain --untracked-files=no In: /home/rhaas/ET_2011_10/./repos/CRL error: unknown option `porcelain' usage: git status [options] [--] <filepattern>...
-q, --quiet be quiet -v, --verbose be verbose
Commit message options -F, --file <FILE> read log from file --author <AUTHOR> override author for commit -m, --message <MESSAGE> specify commit message -c, --reedit-message <COMMIT> reuse and edit message from specified commit -C, --reuse-message <COMMIT> reuse message from specified commit -s, --signoff add Signed-off-by: -t, --template <FILE> use specified template file -e, --edit force edit of commit
Commit contents options -a, --all commit all changed files -i, --include add specified files to index for commit --interactive interactively add files -o, --only commit only specified files -n, --no-verify bypass pre-commit hook --dry-run show what would be committed --amend amend previous commit -u, --untracked-files[=<mode>] show untracked files, optional modes: all, normal, no. (Default: all) --allow-empty ok to record an empty change --cleanup <default> how to strip spaces and #comments from message
Executing: git stash In: /home/rhaas/ET_2011_10/./repos/CRL No local changes to save Executing: git remote update origin In: /home/rhaas/ET_2011_10/./repos/CRL Updating origin Executing: git branch In: /home/rhaas/ET_2011_10/./repos/CRL * master Executing: git pull --rebase origin master In: /home/rhaas/ET_2011_10/./repos/CRL && git checkout master Already on 'master' From git://github.com/gridaphobe/CRL * branch master -> FETCH_HEAD Current branch master is up to date. Executing: git checkout master In: /home/rhaas/ET_2011_10/./repos/CRL Already on 'master' Executing: git stash pop In: /home/rhaas/ET_2011_10/./repos/CRL Nothing to apply
Warning: Could not update CRL. Could not pop stashed changes. }}} it seems the --porcelain option does not exisit in version 1.6.5.3. If this affects all versions of git before 1.6.5.3 as well then eg. ranger is affected.
Can the same functionality be achieved without it?
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: new Priority: major | Milestone: Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by bmundim):
you can use git/1.7.4 module on Ranger.
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: new Priority: major | Milestone: Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by rhaas):
Indeed, good to know. The new version is even the default in the module system (1.6 is the one in /usr/bin). Also affects QueenBee where {{{soft add +git}}} provides git version 1.6.1.3
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: new Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+----------------------------------------------- Changes (by eschnett):
* milestone: => ET_2011_10
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: review Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+----------------------------------------------- Changes (by rhaas):
* status: new => review
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: review Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by hinder):
I think this should be included in the release, otherwise people with old versions of git won't be able to update. I am concerned about making assumptions about the human-readable output of git status, but I think we have to live with it. I propose committing this before the release. Any objections?
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: review Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by knarf):
Right. 'status' is a porcelain command, and according to the manual that is "not meant to be parsed" and "susceptible to changes/evolutions". For tasks like this the plumbing commands should be used. On the other hand, the manual for git-status on option --porcelain gives the opposite impression: "Give the output in a stable, easy-to-parse format for scripts. ... guaranteed not to change in the future, making it safe for scripts". It seems like git itself isn't quite consistent here.
The current manpage for git-status lists '-s' as alternative. Ranger doesn't seem to be available for testing and queenbee doesn't seem to have a working git help. Maybe we could use this instead of --porcelain? But that's just an observation - I would be fine with the current patch.
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: review Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by anonymous):
I didn't know that git offered a stable interface. Very nice.
--short does not exist either. This is on bethe (git 1.6.5.3): {{{ [rhaas@bethe CRL]$ git status --short error: unknown option `short' usage: git status [options] [--] <filepattern>...
-q, --quiet be quiet -v, --verbose be verbose
Commit message options -F, --file <FILE> read log from file --author <AUTHOR> override author for commit -m, --message <MESSAGE> specify commit message -c, --reedit-message <COMMIT> reuse and edit message from specified commit -C, --reuse-message <COMMIT> reuse message from specified commit -s, --signoff add Signed-off-by: -t, --template <FILE> use specified template file -e, --edit force edit of commit
Commit contents options -a, --all commit all changed files -i, --include add specified files to index for commit --interactive interactively add files -o, --only commit only specified files -n, --no-verify bypass pre-commit hook --dry-run show what would be committed --amend amend previous commit -u, --untracked-files[=<mode>] show untracked files, optional modes: all, normal, no. (Default: all) --allow-empty ok to record an empty change --cleanup <default> how to strip spaces and #comments from message
}}}
There is a discussion on this on stackoverflow: http://stackoverflow.com/questions/2657935/checking-for-a-dirty-index-or- untracked-files-with-git and point 26 seems to suggest to use {{{ git diff-files --quiet }}} and to check its return value. That seems to work on bethe for me.
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: review Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by knarf):
Can you provide a patch - whoever was that 'anonymous'?
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: review Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by rhaas):
I was anonymous (I didn't add an extra post for that, thought my userename in the pasted output might be a dead giveaway). Oh well :-)
Patch is attached.
#615: updating git repositories fails for git version 1.6.5.3 ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: eric9 Type: defect | Status: closed Priority: major | Milestone: ET_2011_10 Component: GetComponents | Version: Resolution: fixed | Keywords: ----------------------------+----------------------------------------------- Changes (by knarf):
* status: review => closed * resolution: => fixed
Comment:
Applied, thanks.
trac@lists.einsteintoolkit.org