GetComponents misleading warning message

Issue #261 closed
Bruno Mundim created an issue

I receive the following kind of warning quite often when updating my tree:


Updating module: Carpet/doc
from repository: git://carpetcode.dyndns.org/carpet
located in: Cactus/arrangements
Executing: git stash
In: /work/01157/bcmundim/einstein_dev_chandra/Cactus/repos/carpet
No local changes to save
Executing: git pull --rebase
In: /work/01157/bcmundim/einstein_dev_chandra/Cactus/repos/carpet
Current branch master is up to date.
Executing: git stash pop
In: /work/01157/bcmundim/einstein_dev_chandra/Cactus/repos/carpet
fatal: Needed a single revision
no valid stashed state found

Warning: Could not update carpet. Could not pop stashed changes.


I am not sure what 'fatal: Needed a single revision' means, but if the current branch is already up to date, why do I receive a warning message saying that GetComponents couldn't update the repository?

Keyword: warning
Keyword: messages

Comments (8)

  1. Eric Seidel
    • changed status to open
    • removed comment

    Git actually fails if `git stash pop` is run when there is no stash. I thought that the error message would be consistent and I could catch it myself, but apparently that is not the case. What I could do instead is to first run `git status --short --untracked-files=no`, which will output nothing if there are no local modifications. Based on that command, I could then either run `git stash && git pull --rebase && git stash pop` or simply `git pull --rebase`. That should prevent your error.

  2. Eric Seidel
    • changed status to resolved
    • removed comment

    Ok, I've implemented what I described above. Please let me know if you still have these errors.

  3. Bruno Mundim reporter
    • removed comment

    It does work on my workstation, with git version 1.7.3.4, however it fails on Ranger where I have git version 1.6.3.1 loaded. There is no implementation of the --short option on that git version:

    error: unknown option `short'

    Maybe it would be better to use --quiet instead of --short, what do you think? Another option is to ask for an upgrade for the revision control tools in general on all machines supported by ET.

    Thanks.

  4. Eric Seidel
    • changed status to open
    • removed comment

    Ah of course it wouldn't be available on earlier versions of git. Can you tell me if the --porcelain option is available on 1.6.3.1? It provides similar functionality as --short. In version 1.7.3.5 I'm not seeing a --quiet option, and it would be annoying to parse the normal status output (git status always seems to exit with a 0 code if called inside a repo).

  5. Bruno Mundim reporter
    • removed comment

    Replying to [comment:4 eric9]:

    Ah of course it wouldn't be available on earlier versions of git. Can you tell me if the --porcelain option is available on 1.6.3.1? It provides similar functionality as --short.

    Unfortunately it is not provided by version 1.6.3.1.

    In version 1.7.3.5 I'm not seeing a --quiet option, and it would be annoying to parse the normal status output (git status always seems to exit with a 0 code if called inside a repo).

    Yes, it doesn't seem to be there! It is very strange that an option got deprecated so fast from one version to another. In any case I am not sure how to handle this issue. I guess I will file a ticket asking for a git upgrade on Ranger. It would be helpful if others could post here the git version they currently have in their production machines. Usually linux versions oriented to desktop use have a more up to date version of git, svn, hg, etc. That doesn't seem to be the case for production systems.

    Machines/Git version: Ranger/1.6.3.1 Kraken/1.7.1.1 BlueDrop/1.6.0.2

  6. Bruno Mundim reporter
    • removed comment

    Replying to [comment:5 bmundim]:

    Replying to [comment:4 eric9]: > Ah of course it wouldn't be available on earlier versions of git. Can you tell me if the --porcelain option is available on 1.6.3.1? It provides similar functionality as --short.

    I would change from --short to --porcelain. The --porcelain option is supposed to be safe for scripts.

    Machines/Git version: Ranger/1.6.3.1 Kraken/1.7.1.1 BlueDrop/1.6.0.2

    I filed a ticket to upgrade the git version installed on Ranger. Now we have git 1.7.4 there and this issue is gone, of course. I encourage others to do the same with their production machines in case this issue affects them too.

  7. Log in to comment