git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-gui: Call changes "Staged" and "Unstaged" in file list  titles.
@ 2007-05-08 11:33 Johannes Sixt
  2007-05-08 14:38 ` Shawn O. Pearce
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2007-05-08 11:33 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git

From: Johannes Sixt <johannes.sixt@telecom.at>

All menu entries talk about "staging" and "unstaging" changes, but the
titles of the file lists use different wording, which may confuse
newcomers.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
I hope the patch went through without my MUA's "improvements".

Hannes

 git-gui/git-gui.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 60e79ca..45d251e 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -5494,7 +5494,7 @@ pack .vpane -anchor n -side top -fill both -expand 1
 # -- Index File List
 #
 frame .vpane.files.index -height 100 -width 200
-label .vpane.files.index.title -text {Changes To Be Committed} \
+label .vpane.files.index.title -text {Staged Changes (Will Be Committed)} \
 	-background green \
 	-font font_ui
 text $ui_index -background white -borderwidth 0 \
@@ -5516,7 +5516,7 @@ pack $ui_index -side left -fill both -expand 1
 # -- Working Directory File List
 #
 frame .vpane.files.workdir -height 100 -width 200
-label .vpane.files.workdir.title -text {Changed But Not Updated} \
+label .vpane.files.workdir.title -text {Unstaged Changes (Will Not Be Committed)} \
 	-background red \
 	-font font_ui
 text $ui_workdir -background white -borderwidth 0 \
-- 
1.5.1.1.27.g91776

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-gui: Call changes "Staged" and "Unstaged" in file list titles.
  2007-05-08 11:33 [PATCH] git-gui: Call changes "Staged" and "Unstaged" in file list titles Johannes Sixt
@ 2007-05-08 14:38 ` Shawn O. Pearce
  2007-05-08 15:13   ` Johannes Schindelin
  2007-05-08 19:29   ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Shawn O. Pearce @ 2007-05-08 14:38 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git

Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> From: Johannes Sixt <johannes.sixt@telecom.at>
> 
> All menu entries talk about "staging" and "unstaging" changes, but the
> titles of the file lists use different wording, which may confuse
> newcomers.
> 
> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
> ---
> I hope the patch went through without my MUA's "improvements".

Yes.  But...
 
>  git-gui/git-gui.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

That's the wrong path.  Clearly you made this patch in git.git and
not the git-gui.git repository itself.  Fortunately for me I added
-3 to git-am out of habit:

  $ git am -3 -s gg
  Applying 'git-gui: Call changes "Staged" and "Unstaged" in file list titles.'
  
  error: git-gui/git-gui.sh: does not exist in index
  Using index info to reconstruct a base tree...
  Falling back to patching base and 3-way merge...
  Renamed git-gui/git-gui.sh => git-gui.sh
  Wrote tree 8e034a94d9533af707279766e174b78ddf3874cc
  Committed: a1a4975824e8f9f88a8c96ae908c488a2c6047c5

Yay Git!  Go go gadget rename detection!  ;-)

I didn't even realize the git-gui/ prefix on the path in the patch
until after I saw the rename detection message.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-gui: Call changes "Staged" and "Unstaged" in file list titles.
  2007-05-08 14:38 ` Shawn O. Pearce
@ 2007-05-08 15:13   ` Johannes Schindelin
  2007-05-08 19:29   ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2007-05-08 15:13 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Johannes Sixt, git

Hi,

On Tue, 8 May 2007, Shawn O. Pearce wrote:

> Yay Git!  Go go gadget rename detection!  ;-)

Now, how cool is _that_!

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-gui: Call changes "Staged" and "Unstaged" in file list titles.
  2007-05-08 14:38 ` Shawn O. Pearce
  2007-05-08 15:13   ` Johannes Schindelin
@ 2007-05-08 19:29   ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2007-05-08 19:29 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Johannes Sixt, git

"Shawn O. Pearce" <spearce@spearce.org> writes:

> Yes.  But...
>  
>>  git-gui/git-gui.sh |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> That's the wrong path.  Clearly you made this patch in git.git and
> not the git-gui.git repository itself.  Fortunately for me I added
> -3 to git-am out of habit:
>
>   $ git am -3 -s gg
>   Applying 'git-gui: Call changes "Staged" and "Unstaged" in file list titles.'
>   
>   error: git-gui/git-gui.sh: does not exist in index
>   Using index info to reconstruct a base tree...
>   Falling back to patching base and 3-way merge...
>   Renamed git-gui/git-gui.sh => git-gui.sh
>   Wrote tree 8e034a94d9533af707279766e174b78ddf3874cc
>   Committed: a1a4975824e8f9f88a8c96ae908c488a2c6047c5
>
> Yay Git!  Go go gadget rename detection!  ;-)
>
> I didn't even realize the git-gui/ prefix on the path in the patch
> until after I saw the rename detection message.

Yeah, -3 is a magic, isn't it?

For the benefit of people who are unfamiliar with the internal,
here is how it works.

 - The patch Hannes gave Shawn had a change to
   git-gui/git-gui.sh, like this:

    git-gui/git-gui.sh |    4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

   diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
   index 60e79ca..45d251e 100755
    --- a/git-gui/git-gui.sh
    +++ b/git-gui/git-gui.sh
    @@ -5494,7 +5494,7 @@ pack .vpane -anchor n -side top -fill both -expand 1


 - Shawn had a tree that looked like this:

        GIT-VERSION-GEN
        Makefile
        git-gui.sh
        lib/blame.tcl
        lib/branch.tcl
        ...

 - The patch obviously does not apply, as Shawn does not have
   git-gui/git-gui.sh.  However, Shawn instructed "git am" to
   fall back on 3-way merge, which prepared two "fake" trees.

   Fake tree 1 (the ancestor) is prepared by reading the index
   line to figure out what blob the patch applies to.  The
   answer is 60e79ca, which Shawn has in his repository.  The
   resulting tree looks like this:

        040000 tree 0df2c7b...  git-gui
        100755 blob 60e79ca...  git-gui/git-gui.sh

   Fake tree 2 (update) is prepared by applying the patch to the
   ancestor fake tree.

        040000 tree 950e50d...	git-gui
        100755 blob 45d251e...	git-gui/git-gui.sh

 - Then, it falls back to the 3-way merge, using the fake tree 1
   as the common ancestor, Shawn's repository as "our" tree, and
   fake tree 2 as the update being merged into "our" tree.

   To this merge, most of the paths in "our" tree appear as if
   Shawn added them since the common ancestor, except that
   git-gui.sh at the toplevel in "our" tree was moved up by
   Shawn from git-gui subdirectory (and then possibly further
   modified), while git-gui/git-gui.sh was modified by Hannes.

   At the path level, this is the classic case of "one side
   (Shawn) modifies, while the other side (Hannes) kept it at
   the place it was before", 3-way merge at the path level takes
   Shawn's change (which is to "move the file up one level").

   At the same time, at the contents level, this is just a
   normal "common ancestor 60e79ca was modified to Shawn's
   git-gui.sh on one side while Hannes's side modified it to
   45d251e", and the contents are merged using the file level
   3-way merge.  The result is left in git-gui.sh.

   All the other paths look as if Shawn added them to the common
   ancestor that did not have any of them while Hannes did not
   do any such change, so the merge algorithm takes Shawn's
   "additions".

So in the end, Shawn ends up with most of his paths intact,
except that Hannes's patch which were meant to apply to
git-gui/git-gui.sh gets applied to his git-gui.sh.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-08 19:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08 11:33 [PATCH] git-gui: Call changes "Staged" and "Unstaged" in file list titles Johannes Sixt
2007-05-08 14:38 ` Shawn O. Pearce
2007-05-08 15:13   ` Johannes Schindelin
2007-05-08 19:29   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).