Git hall of shame adition

aruiz@dopamine:~/src/gtk-roles-and-siblings$ git commit -a “Added test for hit detection”
fatal: Paths with -a does not make sense.

Funny.

Advertisements

10 thoughts on “Git hall of shame adition

  1. How about using -m for the message? git can’t know that “Added test for hit detection” isn’t a path.. bzr and hg do the same:
    Vienna:b pieter$ bzr commit “bla bla”
    bzr: ERROR: Path(s) are not versioned: “bla bla”
    Vienna:b pieter$ hg commit “bla bla”
    bla bla: No such file or directory
    abort: file bla bla not found!
    so what’s your problem exactly?

    Like

  2. @John, @Pieter
    Right that he needs -m to pass the message, wrong that it expects a path. The error is explicitly that it’s *not* expecting a path, due to the -a option that makes passing a path meaningless.

    Like

  3. Yeah, obviously I missed the -m. I just find funny how it says “you idiot, don’t pass a path here”, who’s the idiot here?
    I guess that I wanted to remark how bad git handles unexpected behavior.

    Like

  4. $ bzr commit “blaa blaa”
    bzr: ERROR: Path(s) are not versioned: “blaa blaa”
    $ hg commit “blaa blaa”
    blaa blaa: No such file or directory
    abort: file blaa blaa not found!
    Come on people, these Git rants are getting _really_ ridiculous.

    Like

  5. The GIT mailing list is very friendly and people living there are putting lot of love in the UI.
    If there is something you don’t like, why don’t you drop and email over there?

    Like

  6. 1. The error message should have been: “fatal: The following paths are ignored, because -a option is given: ‘Added test for hit detection'”
    2. That should not have been fatal.
    3. It should be followed by another error/warning that you did not specify a message for your commit asking if you want it to start you $EDITOR to write one.
    THat is user friendly design!

    Like

  7. @Aigars: I disagree. -a and a path is just contradictory, you can’t know which one the user meant. You definitely don’t want to ignore paths and create a perhaps faulty commit. The only sane thing you can do is error out.

    Like

  8. git commit –help ftw:
    -a, –all
    Tell the command to automatically stage files that have been
    modified and deleted, but new files you have not told git about are
    not affected.

    When files are given on the command line, the command commits the
    contents of the named files, without recording the changes already
    staged. The contents of these files are also staged for the next
    commit on top of what have been staged before.
    So you CAN and SHOULD be able to have BOTH -a AND a filename/path. Now just becouse you can’t read man-files and/or remeber to use the command, you should not bash the tool for trying to do what it should.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s