All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Mark Levedahl <mdl123@verizon.net>
Cc: Junio C Hamano <junkio@cox.net>,
	Mark Levedahl <mlevedahl@verizon.net>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: autoCRLF, git status, git-gui, what is the desired behavior?
Date: Sun, 25 Feb 2007 21:06:57 -0500	[thread overview]
Message-ID: <20070226020657.GA1884@spearce.org> (raw)
In-Reply-To: <45E1F6B5.8030907@verizon.net>

Mark Levedahl <mdl123@verizon.net> wrote:
> Also, if I invoke git-gui on the above repository showing foo as modified...
> 
> 1) foo shows up in the "Changed But Not Updated" list.
> 2) Clicking on foo gives message box with "No differences detected. ...
>    Clicking the "ok" button invokes a rescan, back to step 1.
> 3) Adding foo to the commit list in git-gui works.
> 4) Committing the above from git-gui gives a commit with no
>    changes (commit is made, shows up in git log, but has no
>    changes associated).
> 
> --- I don't think git-gui should make create an empty commit in the 
> above case.

Hmm.  Probably not.  In pg I used to compare HEAD^{tree} to the
tree output by git-write-tree and refuse to make the commit if
they had the same value.  git-gui just blindly assumes that if a
file is staged for committing then it won't make an empty commit;
this is also the behavior in git-commit.sh.

Yet in the case of a merge you may want the same tree and not even
realize it.  Like if I merge a commit from a coworker, get a merge
conflict, pick my version, but that just modified the tree to match
mine, effectively doing an `-s ours` style merge.  Of course here
we have MERGE_HEAD and know we are merging...

-- 
Shawn.

  reply	other threads:[~2007-02-26  2:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-25 19:33 autoCRLF, git status, git-gui, what is the desired behavior? Mark Levedahl
2007-02-25 19:54 ` Junio C Hamano
2007-02-25 20:28   ` Junio C Hamano
2007-02-25 21:14     ` Mark Levedahl
2007-02-25 21:22       ` Junio C Hamano
2007-02-25 22:20         ` Mark Levedahl
2007-02-25 23:55           ` Mark Levedahl
2007-02-25 20:51   ` Mark Levedahl
2007-02-26  2:06     ` Shawn O. Pearce [this message]
2007-02-26  2:45       ` Junio C Hamano
2007-02-26 15:54         ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070226020657.GA1884@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=mdl123@verizon.net \
    --cc=mlevedahl@verizon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.