git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fwd: Delivery Status Notification (Failure)

From
DGDrew Gross <drew.a.gross@gmail.com>
Date
Apr 6, 2013, 04:15 UTC
Message-ID
<CAECh7fD6SKtfZudByeVD_HUjxN-fHBF1bA+pVM6=gV=Jy5Uhwg@mail.gmail.com>
In-Reply-To
<047d7b3a85a201067604d9a948e8@google.com>
Hello,

I'm am trying to patch git to refuse to commit if there are both staged and unstaged changes, and I pass the -a flag. I expected this simple addition to parse_and_validate_options() in commit.c to accomplish most of what I want:

if (all && s->workdir_dirty)
    die(_("Cannot commit with -a if there are staged and unstaged changes"));

But when compiled, this will commit anyway even with staged and unstaged files. I think I misunderstanding the workdir_dirty flag. Can someone help me?

Drew Gross
Next: Jeff King
Message 1 of 2 in “Fwd: Delivery Status Notification (Failure)”
  1. Drew GrossApr 6, 2013
  2. Jeff KingApr 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.