Git development
 help / color / mirror / Atom feed
* [PATCH 2/3] packed_git: add new PACK_KEEP flag and haspackkeep() access macro
From: drafnel @ 2008-11-02 16:31 UTC (permalink / raw)
  To: git; +Cc: gitster, nico, spearce, Brandon Casey
In-Reply-To: <1225643477-32319-1-git-send-email-foo@foo.com>

From: Brandon Casey <drafnel@gmail.com>

If you want to tell whether a pack has an associated ".keep" file you
would do:

   if (haspackkeep(p))
      do_something

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---
 cache.h     |    2 ++
 sha1_file.c |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cache.h b/cache.h
index 0cb9350..48cd366 100644
--- a/cache.h
+++ b/cache.h
@@ -686,7 +686,9 @@ extern struct packed_git {
 } *packed_git;
 
 #define PACK_LOCAL	1
+#define PACK_KEEP	2
 #define ispacklocal(p) ((p)->flags & PACK_LOCAL)
+#define haspackkeep(p) ((p)->flags & PACK_KEEP)
 
 struct pack_entry {
 	off_t offset;
diff --git a/sha1_file.c b/sha1_file.c
index e4141c9..8a027e9 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -841,6 +841,11 @@ struct packed_git *add_packed_git(const char *path, int path_len, int local)
 		return NULL;
 	}
 	memcpy(p->pack_name, path, path_len);
+
+	strcpy(p->pack_name + path_len, ".keep");
+	if (!access(p->pack_name, F_OK))
+		p->flags |= PACK_KEEP;
+
 	strcpy(p->pack_name + path_len, ".pack");
 	if (stat(p->pack_name, &st) || !S_ISREG(st.st_mode)) {
 		free(p);
-- 
1.6.0.2.588.g3102

^ permalink raw reply related

* [PATCH 3/3] pack-objects: honor '.keep' files
From: drafnel @ 2008-11-02 16:31 UTC (permalink / raw)
  To: git; +Cc: gitster, nico, spearce, Brandon Casey
In-Reply-To: <1225643477-32319-2-git-send-email-foo@foo.com>

From: Brandon Casey <drafnel@gmail.com>

By default, pack-objects creates a pack file with every object specified by
the user. There are two options which can be used to exclude objects which
are accessible by the repository.

   1) --incremental
     This excludes any object which already exists in an accessible pack.

   2) --local
     This excludes any object which exists in a non-local pack.

With this patch, both arguments also cause objects which exist in packs
marked with a .keep file to be excluded. Only the --local option requires
an explicit check for the .keep file. If the user doesn't want the objects
in a pack marked with .keep to be exclude, then the .keep file should be
removed.

Additionally, this fixes the repack bug which allowed porcelain repack to
create packs which contained objects already contained in existing packs
marked with a .keep file.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---


This seems to be the correct fix.

I thought about two alternatives:

  1) New option to pack-objects which causes it to honor .keep files

     I didn't think this was necessary since that is why we have .keep
     files in the first place.

     So, now there are three variants:

     Neither --incremental or --local is used)
        Ignore repo packs, pack is created using all objects specified by
        user.
     --incremental is used)
        Look at repo packs, exclude already packed objects (including those
        marked with .keep file)
     --local is used)
        Look at repo packs, exclude objects in non-local packs (including local
        objects marked with .keep file)

  2) Always honor .keep files, even when --incremental or --local is
     not specified. 

     I think this may be counter-intuitive, since if you specify all of
     the objects explicitly, without using any other options, you expect
     all of those objects to be placed into the created pack file. If
     .keep is always honored, then a new option would be required to
     indicate ignoring .keep files, or we would adopt the platform that
     "the user must just remove the .keep file".


So, honoring .keep files only with --incremental (which is a side effect) or
 --local seems to be the most appropriate.

Comments welcome.

-brandon


 builtin-pack-objects.c |    2 +-
 t/t7700-repack.sh      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 6a8b9bf..5199e54 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -701,7 +701,7 @@ static int add_object_entry(const unsigned char *sha1, enum object_type type,
 				break;
 			if (incremental)
 				return 0;
-			if (local && !ispacklocal(p))
+			if (local && (!ispacklocal(p) || haspackkeep(p)))
 				return 0;
 		}
 	}
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index 1489e68..b6b02da 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -4,7 +4,7 @@ test_description='git repack works correctly'
 
 . ./test-lib.sh
 
-test_expect_failure 'objects in packs marked .keep are not repacked' '
+test_expect_success 'objects in packs marked .keep are not repacked' '
 	echo content1 > file1 &&
 	echo content2 > file2 &&
 	git add . &&
-- 
1.6.0.2.588.g3102

^ permalink raw reply related

* .gitattributes glob matching broken
From: Hannu Koivisto @ 2008-11-02 16:33 UTC (permalink / raw)
  To: git

Greetings,

It seems that, for example, glob pattern *.s matches files with .sh
extension at least with checkout and reset --hard but git status
thinks otherwise:

mkdir test
cd test
git init
echo -e "*.sh -crlf\n*.s crlf" > .gitattributes
echo -e "foobar\nfoobar\nfoobar" > kala.s
echo -e "foobar\nfoobar\nfoobar" > kala.sh
git add .gitattributes kala.s kala.sh
git commit -m "Foo."
cd ..
git clone -n test test2
cd test2
git config core.autocrlf true
git checkout
git status

# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working
# directory)
#
#       modified:   kala.sh
#
no changes added to commit (use "git add" and/or "git commit -a")

file kala.s kala.sh

kala.s:  ASCII text, with CRLF line terminators
kala.sh: ASCII text, with CRLF line terminators

Tested in Linux with git 1.6.0.3.535.g933bb (master as of this
writing) but also witnessed in Windows and with slightly older
git versions.

This makes git use in a Windows environment pretty much impossible
if you don't want to / can't rely on git guessing "text"
vs. "binary" files correctly so I hope a solution is found soon.

It would also be good to document what kind of glob patterns git
actually supports.  I made the assumption that at least on Linux it
supports whatever glob(7) says but even if that assumption is
correct (which it may not be, of course) for example Windows users
may not realize to look for such a manual page.

-- 
Hannu

^ permalink raw reply

* Re: commit takes 8 secs; but instant when offline - can I fix this?
From: Brendan Macmillan @ 2008-11-02 16:34 UTC (permalink / raw)
  To: Thomas Rast; +Cc: git
In-Reply-To: <200811021514.00057.trast@student.ethz.ch>

Many thanks for the explanation, and it's now instant.

To ~/.gitconfig, I added:

[user]
  email = myemail@address.com


On 03/11/2008, Thomas Rast <trast@student.ethz.ch> wrote:
> 13ren wrote:
>  > With the network plugged in, git-commit takes 8 seconds.
>  >
>  > When I unplug the network, commit is instant...
>
> Configure your user.email (and user.name), see man git-config.  If the
>  email is not set, Git tries to figure out your hostname, which
>  depending on DNS misconfigurations can apparently cause such delays.

^ permalink raw reply

* Re: [PATCH 1/7] Documentation: do not use regexp in refspec descriptions
From: Anders Melchiorsen @ 2008-11-02 17:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v7i7pba2x.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Anders Melchiorsen <mail@cup.kalibalik.dk> writes:
>
>> The syntax is now easier to read, though wrong: all parts of the
>> refspec are actually optional.
>
> It probably is easier to read, but strictly speaking it is not
> wrong. The two parts, <src> and <dst>, _always_ exist, even though
> either or both of them can be an empty string.

The colon is not required, though the format suggests that it is.


>>  <refspec>...::
>>  	The canonical format of a <refspec> parameter is
>> -	`+?<src>:<dst>`; that is, an optional plus `{plus}`, followed
>> +	`[+]<src>:<dst>`; that is, an optional plus `{plus}`, followed
>>  	by the source ref, followed by a colon `:`, followed by
>>  	the destination ref.
>
> I am wondering if it would be clearer and easier to understand if we just
> said:
>
>   	The canonical format of a <refspec> parameter is
> 	an optional plus `{plus}`, followed by the source ref,
>         followed by a colon `:`, followed by the destination ref.
> 	Find various forms of refspecs in examples section.

I think that is an improvement. Removing the word "canonical" would be
even better, IMHO.


Anders.

^ permalink raw reply

* [PATCH (MINGW) Resend] Windows: Make OpenSSH properly detect tty detachment.
From: Alexander Gavrilov @ 2008-11-02 17:11 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Johannes Sixt

Apparently, CREATE_NO_WINDOW makes the OS tell the process
that it has a console, but without actually creating the
window. As a result, when git is started from GUI, ssh
tries to ask its questions on the invisible console.

This patch uses DETACHED_PROCESS instead, which clearly
means that the process should be left without a console.
The downside is that if the process manually calls
AllocConsole, the window will appear. A similar thing
might occur if it calls another console executable.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Acked-by: Johannes Sixt <johannes.sixt@telecom.at>
---

	This patch appears to have been overlooked, so I	resend
	it just in case. It fixes a long standing problem in msysgit.

	-- Alexander

 compat/mingw.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/compat/mingw.c b/compat/mingw.c
index 1e29b88..b6fcf69 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -586,12 +586,16 @@ static pid_t mingw_spawnve(const char *cmd, const char **argv, char **env,
 		 * would normally create a console window. But
 		 * since we'll be redirecting std streams, we do
 		 * not need the console.
+		 * It is necessary to use DETACHED_PROCESS
+		 * instead of CREATE_NO_WINDOW to make ssh
+		 * recognize that it has no console.
 		 */
-		flags = CREATE_NO_WINDOW;
+		flags = DETACHED_PROCESS;
 	} else {
 		/* There is already a console. If we specified
-		 * CREATE_NO_WINDOW here, too, Windows would
+		 * DETACHED_PROCESS here, too, Windows would
 		 * disassociate the child from the console.
+		 * The same is true for CREATE_NO_WINDOW.
 		 * Go figure!
 		 */
 		flags = 0;
-- 
1.6.0.2.1256.ga12f0

^ permalink raw reply related

* [PATCH] Makefile: add install-man rules (quick and normal)
From: Markus Heidelberg @ 2008-11-02 17:53 UTC (permalink / raw)
  To: gitster; +Cc: git

---
 Documentation/Makefile |    8 ++++++--
 INSTALL                |    5 +++--
 Makefile               |    6 ++++++
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index e33ddcb..c34c1ca 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -87,7 +87,9 @@ man7: $(DOC_MAN7)
 
 info: git.info gitman.info
 
-install: man
+install: install-man
+
+install-man: man
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man5dir)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man7dir)
@@ -220,7 +222,9 @@ $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
 install-webdoc : html
 	sh ./install-webdoc.sh $(WEBDOC_DEST)
 
-quick-install:
+quick-install: quick-install-man
+
+quick-install-man:
 	sh ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)
 
 quick-install-html:
diff --git a/INSTALL b/INSTALL
index a4fd862..d1deb0b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -126,8 +126,9 @@ Issues of note:
 
 	http://www.kernel.org/pub/software/scm/git/docs/
 
-   There are also "make quick-install-doc" and "make quick-install-html"
-   which install preformatted man pages and html documentation.
+   There are also "make quick-install-doc", "make quick-install-man"
+   and "make quick-install-html" which install preformatted man pages
+   and html documentation.
    This does not require asciidoc/xmlto, but it only works from within
    a cloned checkout of git.git with these two extra branches, and will
    not work for the maintainer for obvious chicken-and-egg reasons.
diff --git a/Makefile b/Makefile
index 4b54416..cc7959e 100644
--- a/Makefile
+++ b/Makefile
@@ -1411,6 +1411,9 @@ endif
 install-doc:
 	$(MAKE) -C Documentation install
 
+install-man:
+	$(MAKE) -C Documentation install-man
+
 install-html:
 	$(MAKE) -C Documentation install-html
 
@@ -1420,6 +1423,9 @@ install-info:
 quick-install-doc:
 	$(MAKE) -C Documentation quick-install
 
+quick-install-man:
+	$(MAKE) -C Documentation quick-install-man
+
 quick-install-html:
 	$(MAKE) -C Documentation quick-install-html
 
-- 
1.6.0.3.536.gb5136

^ permalink raw reply related

* Re: [PATCH] git send-email: allow any rev-list option as an argument.
From: Jeff King @ 2008-11-02 18:02 UTC (permalink / raw)
  To: Pierre Habouzit; +Cc: git
In-Reply-To: <20081102093907.GF4066@artemis>

On Sun, Nov 02, 2008 at 10:39:07AM +0100, Pierre Habouzit wrote:

> Well it still messes the file/reference name conflict with no way to
> prevent it because of the backward compatibility, and even if unlikely
> it's still possible.

Hmm. As Junio mentioned, this is really an easier way of doing:

  git format-patch -o tmp "$@"
  $EDITOR tmp/*
  git send-email tmp

So I guess a wrapper program would suffice, that just called send-email.
But of course then you would have to think of a new name, and explain
the confusion between it and send-email.

-Peff

^ permalink raw reply

* Re: [PATCH] git-diff: Add --staged as a synonym for --cached.
From: Junio C Hamano @ 2008-11-02 18:30 UTC (permalink / raw)
  To: Björn Steinbrink
  Cc: Jeff King, Johannes Schindelin, David Symonds, git, gitster,
	Stephan Beyer
In-Reply-To: <20081102123519.GA21251@atjola.homenet>

Björn Steinbrink <B.Steinbrink@gmx.de> writes:

> Looking at --cached/--index we have basically three things:
>
>   --cached to refer to the state of the index (diff, grep, [stash], ...)
>   --cached to _work on_ the index only (rm, apply, ...)
>   --index to _work on_ both the index and the working tree (apply, ...)

I think the earlier two are the same thing.  The only difference between
them is that in the first one, the definition of your "work on" happens to
be a read-only operation.  Am I mistaken?

> A quick look through Documentation/ revealed only one problematic case,
> which is ls-files that already has a --stage option. And that looks like
> a dealbreaker :-(

'ls-files' is primarily about the index contents and all else is a fluff
;-)

You could say --show-stage-too if you wanted to, but the command is a
plumbing to begin with, so perhaps if we can identify the cases where
people need to use the command and enhance some Porcelain (likely
candidate is 'status' or perhaps 'status --short') to give the information
people use ls-files for, we hopefully wouldn't have to change ls-files
itself at all.

The only case I use ls-files these days when I am _using_ git (as opposed
to developing/debugging git) is "git ls-files -u" to get the list of still
unmerged paths during a conflicted merge.

^ permalink raw reply

* [PATCH] Document that git-log takes --all-match.
From: Mikael Magnusson @ 2008-11-02 18:32 UTC (permalink / raw)
  To: Git Mailing List, Junio C Hamano
In-Reply-To: <237967ef0811021028w3aa22411t99b2203a9148bbf6@mail.gmail.com>

Signed-off-by: Mikael Magnusson <mikachu@gmail.com>

---

It's already listed in the bash completion. Feel free to reword.
Looking at this I can't help but feel that the text for
--grep/--author/--committer is misleading, since they say they will
limit to commits blabla, but they don't if another is given. Ie they
only do what they say if you give the --all-match option.

 Documentation/rev-list-options.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

index 0ce916a..966276b 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -174,6 +174,10 @@ endif::git-rev-list[]
       Limit the commits output to ones with log message that
       matches the specified pattern (regular expression).

+--all-match::
+       Limit the commits output to ones that match all given --grep,
+       --author and --committer instead of ones that match at least one.
+
 -i::
 --regexp-ignore-case::

--
1.6.0.2.GIT

--
Mikael Magnusson

^ permalink raw reply related

* Re: [PATCH] git-diff: Add --staged as a synonym for --cached.
From: Björn Steinbrink @ 2008-11-02 18:54 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Jeff King, Johannes Schindelin, David Symonds, git, Stephan Beyer
In-Reply-To: <7vljw2yo93.fsf@gitster.siamese.dyndns.org>

On 2008.11.02 10:30:16 -0800, Junio C Hamano wrote:
> Björn Steinbrink <B.Steinbrink@gmx.de> writes:
> 
> > Looking at --cached/--index we have basically three things:
> >
> >   --cached to refer to the state of the index (diff, grep, [stash], ...)
> >   --cached to _work on_ the index only (rm, apply, ...)
> >   --index to _work on_ both the index and the working tree (apply, ...)
> 
> I think the earlier two are the same thing.  The only difference between
> them is that in the first one, the definition of your "work on" happens to
> be a read-only operation.  Am I mistaken?

Yeah, I actually wanted to change that "work on" to a simple "change",
but forgot to do that before sending... :-(

The idea was that currently "--cached" can be "passive" (just look at
the index instead of the working tree) or "active" (change the index
instead of the working tree). Thus there could be three "flag words",
and their usage can be unified, including stash.

"git diff [my] --staged [changes]"
"git stash [but] --keep-staged [changes]"
"git apply [and] --stage my_patch"
"git rm [but] --stage-only some_file"

OK, the last one is still not even close to a proper sentence, and but I
guess you get the idea ;-)

> > A quick look through Documentation/ revealed only one problematic case,
> > which is ls-files that already has a --stage option. And that looks like
> > a dealbreaker :-(
> 
> 'ls-files' is primarily about the index contents and all else is a fluff
> ;-)
> 
> You could say --show-stage-too if you wanted to, but the command is a
> plumbing to begin with, so perhaps if we can identify the cases where
> people need to use the command and enhance some Porcelain (likely
> candidate is 'status' or perhaps 'status --short') to give the information
> people use ls-files for, we hopefully wouldn't have to change ls-files
> itself at all.
> 
> The only case I use ls-files these days when I am _using_ git (as opposed
> to developing/debugging git) is "git ls-files -u" to get the list of still
> unmerged paths during a conflicted merge.

Heh, that's probably the one thing for which I use "git status" the
most.

Björn

^ permalink raw reply

* [PATCH (GITK) v3 0/6] Enhance popup dialogs in gitk.
From: Alexander Gavrilov @ 2008-11-02 18:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

This is a resend of my gitk patches rebased on top of the current
master. I also split the first patch into three parts.

Alexander Gavrilov (6):
      gitk: Add Return and Escape bindings to dialogs.
      gitk: Make gitk dialog windows transient.
      gitk: Add accelerators to frequently used menu commands.
      gitk: Make cherry-pick call git-citool on conflicts.
      gitk: Implement a user-friendly Edit View dialog.
      gitk: Explicitly position popup windows.

 gitk |  375 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 303 insertions(+), 72 deletions(-)

^ permalink raw reply

* [PATCH (GITK) v3 1/6] gitk: Add Return and Escape bindings to dialogs.
From: Alexander Gavrilov @ 2008-11-02 18:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras
In-Reply-To: <1225652389-22082-1-git-send-email-angavrilov@gmail.com>

It is often more convenient to dismiss or accept a
dialog using the keyboard, than by clicking buttons
on the screen. This commit adds key binding to make
it possible with gitk's dialogs.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 gitk |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 3fe1b47..edef9e2 100755
--- a/gitk
+++ b/gitk
@@ -1746,6 +1746,8 @@ proc show_error {w top msg} {
     pack $w.ok -side bottom -fill x
     bind $top <Visibility> "grab $top; focus $top"
     bind $top <Key-Return> "destroy $top"
+    bind $top <Key-space>  "destroy $top"
+    bind $top <Key-Escape> "destroy $top"
     tkwait window $top
 }
 
@@ -1769,6 +1771,9 @@ proc confirm_popup msg {
     button $w.cancel -text [mc Cancel] -command "destroy $w"
     pack $w.cancel -side right -fill x
     bind $w <Visibility> "grab $w; focus $w"
+    bind $w <Key-Return> "set confirm_ok 1; destroy $w"
+    bind $w <Key-space>  "set confirm_ok 1; destroy $w"
+    bind $w <Key-Escape> "destroy $w"
     tkwait window $w
     return $confirm_ok
 }
@@ -2611,6 +2616,7 @@ proc keys {} {
 	    -justify left -bg white -border 2 -relief groove
     pack $w.m -side top -fill both -padx 2 -pady 2
     button $w.ok -text [mc "Close"] -command "destroy $w" -default active
+    bind $w <Key-Escape> [list destroy $w]
     pack $w.ok -side bottom
     bind $w <Visibility> "focus $w.ok"
     bind $w <Key-Escape> "destroy $w"
@@ -3533,6 +3539,7 @@ proc vieweditor {top n title} {
     frame $top.buts
     button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
     button $top.buts.can -text [mc "Cancel"] -command [list destroy $top]
+    bind $top <Escape> [list destroy $top]
     grid $top.buts.ok $top.buts.can
     grid columnconfigure $top.buts 0 -weight 1 -uniform a
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -7793,6 +7800,8 @@ proc mkpatch {} {
     frame $top.buts
     button $top.buts.gen -text [mc "Generate"] -command mkpatchgo
     button $top.buts.can -text [mc "Cancel"] -command mkpatchcan
+    bind $top <Key-Return> mkpatchgo
+    bind $top <Key-Escape> mkpatchcan
     grid $top.buts.gen $top.buts.can
     grid columnconfigure $top.buts 0 -weight 1 -uniform a
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -7864,6 +7873,8 @@ proc mktag {} {
     frame $top.buts
     button $top.buts.gen -text [mc "Create"] -command mktaggo
     button $top.buts.can -text [mc "Cancel"] -command mktagcan
+    bind $top <Key-Return> mktaggo
+    bind $top <Key-Escape> mktagcan
     grid $top.buts.gen $top.buts.can
     grid columnconfigure $top.buts 0 -weight 1 -uniform a
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -7967,6 +7978,8 @@ proc writecommit {} {
     frame $top.buts
     button $top.buts.gen -text [mc "Write"] -command wrcomgo
     button $top.buts.can -text [mc "Cancel"] -command wrcomcan
+    bind $top <Key-Return> wrcomgo
+    bind $top <Key-Escape> wrcomcan
     grid $top.buts.gen $top.buts.can
     grid columnconfigure $top.buts 0 -weight 1 -uniform a
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -8014,6 +8027,8 @@ proc mkbranch {} {
     frame $top.buts
     button $top.buts.go -text [mc "Create"] -command [list mkbrgo $top]
     button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}"
+    bind $top <Key-Return> [list mkbrgo $top]
+    bind $top <Key-Escape> "catch {destroy $top}"
     grid $top.buts.go $top.buts.can
     grid columnconfigure $top.buts 0 -weight 1 -uniform a
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -8138,6 +8153,7 @@ proc resethead {} {
     button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
     pack $w.ok -side left -fill x -padx 20 -pady 20
     button $w.cancel -text [mc Cancel] -command "destroy $w"
+    bind $w <Key-Escape> [list destroy $w]
     pack $w.cancel -side right -fill x -padx 20 -pady 20
     bind $w <Visibility> "grab $w; focus $w"
     tkwait window $w
@@ -8315,6 +8331,7 @@ proc showrefs {} {
     pack $top.f.l -side left
     grid $top.f - -sticky ew -pady 2
     button $top.close -command [list destroy $top] -text [mc "Close"]
+    bind $top <Key-Escape> [list destroy $top]
     grid $top.close -
     grid columnconfigure $top 0 -weight 1
     grid rowconfigure $top 0 -weight 1
@@ -9666,6 +9683,8 @@ proc choosefont {font which} {
 	frame $top.buts
 	button $top.buts.ok -text [mc "OK"] -command fontok -default active
 	button $top.buts.can -text [mc "Cancel"] -command fontcan -default normal
+	bind $top <Key-Return> fontok
+	bind $top <Key-Escape> fontcan
 	grid $top.buts.ok $top.buts.can
 	grid columnconfigure $top.buts 0 -weight 1 -uniform a
 	grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -9845,6 +9864,8 @@ proc doprefs {} {
     frame $top.buts
     button $top.buts.ok -text [mc "OK"] -command prefsok -default active
     button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal
+    bind $top <Key-Return> prefsok
+    bind $top <Key-Escape> prefscan
     grid $top.buts.ok $top.buts.can
     grid columnconfigure $top.buts 0 -weight 1 -uniform a
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
-- 
1.6.0.3.15.gb8d36

^ permalink raw reply related

* [PATCH (GITK) v3 2/6] gitk: Make gitk dialog windows transient.
From: Alexander Gavrilov @ 2008-11-02 18:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras
In-Reply-To: <1225652389-22082-2-git-send-email-angavrilov@gmail.com>

Transient windows are always kept above their parent,
and don't occupy any space in the taskbar, which is useful
for dialogs. Also, when transient is used, it is important
to bind windows to the correct parent.

This commit adds transient annotations to all dialogs,
ensures usage of the correct parent for error and
confirmation popups, and, as a side job, makes gitk
preserve the create tag dialog window in case of errors.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 gitk |   46 ++++++++++++++++++++++++++++------------------
 1 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/gitk b/gitk
index edef9e2..41d3d2d 100755
--- a/gitk
+++ b/gitk
@@ -1751,19 +1751,19 @@ proc show_error {w top msg} {
     tkwait window $top
 }
 
-proc error_popup msg {
+proc error_popup {msg {owner .}} {
     set w .error
     toplevel $w
-    wm transient $w .
+    wm transient $w $owner
     show_error $w $w $msg
 }
 
-proc confirm_popup msg {
+proc confirm_popup {msg {owner .}} {
     global confirm_ok
     set confirm_ok 0
     set w .confirm
     toplevel $w
-    wm transient $w .
+    wm transient $w $owner
     message $w.m -text $msg -justify center -aspect 400
     pack $w.m -side top -fill x -padx 20 -pady 20
     button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
@@ -2546,6 +2546,7 @@ proc about {} {
     }
     toplevel $w
     wm title $w [mc "About gitk"]
+    wm transient $w .
     message $w.m -text [mc "
 Gitk - a commit viewer for git
 
@@ -2574,6 +2575,7 @@ proc keys {} {
     }
     toplevel $w
     wm title $w [mc "Gitk key bindings"]
+    wm transient $w .
     message $w.m -text "
 [mc "Gitk key bindings:"]
 
@@ -3503,6 +3505,7 @@ proc vieweditor {top n title} {
 
     toplevel $top
     wm title $top $title
+    wm transient $top .
     label $top.nl -text [mc "Name"]
     entry $top.name -width 20 -textvariable newviewname($n)
     grid $top.nl $top.name -sticky w -pady 5
@@ -3572,9 +3575,7 @@ proc newviewok {top n} {
     if {[catch {
 	set newargs [shellsplit $newviewargs($n)]
     } err]} {
-	error_popup "[mc "Error in commit selection arguments:"] $err"
-	wm raise $top
-	focus $top
+	error_popup "[mc "Error in commit selection arguments:"] $err" $top
 	return
     }
     set files {}
@@ -7770,6 +7771,7 @@ proc mkpatch {} {
     set patchtop $top
     catch {destroy $top}
     toplevel $top
+    wm transient $top .
     label $top.title -text [mc "Generate patch"]
     grid $top.title - -pady 10
     label $top.from -text [mc "From:"]
@@ -7836,7 +7838,7 @@ proc mkpatchgo {} {
     set cmd [lrange $cmd 1 end]
     lappend cmd >$fname &
     if {[catch {eval exec $cmd} err]} {
-	error_popup "[mc "Error creating patch:"] $err"
+	error_popup "[mc "Error creating patch:"] $err" $patchtop
     }
     catch {destroy $patchtop}
     unset patchtop
@@ -7856,6 +7858,7 @@ proc mktag {} {
     set mktagtop $top
     catch {destroy $top}
     toplevel $top
+    wm transient $top .
     label $top.title -text [mc "Create tag"]
     grid $top.title - -pady 10
     label $top.id -text [mc "ID:"]
@@ -7888,18 +7891,18 @@ proc domktag {} {
     set id [$mktagtop.sha1 get]
     set tag [$mktagtop.tag get]
     if {$tag == {}} {
-	error_popup [mc "No tag name specified"]
-	return
+	error_popup [mc "No tag name specified"] $mktagtop
+	return 0
     }
     if {[info exists tagids($tag)]} {
-	error_popup [mc "Tag \"%s\" already exists" $tag]
-	return
+	error_popup [mc "Tag \"%s\" already exists" $tag] $mktagtop
+	return 0
     }
     if {[catch {
 	exec git tag $tag $id
     } err]} {
-	error_popup "[mc "Error creating tag:"] $err"
-	return
+	error_popup "[mc "Error creating tag:"] $err" $mktagtop
+	return 0
     }
 
     set tagids($tag) $id
@@ -7908,6 +7911,7 @@ proc domktag {} {
     addedtag $id
     dispneartags 0
     run refill_reflist
+    return 1
 }
 
 proc redrawtags {id} {
@@ -7946,7 +7950,7 @@ proc mktagcan {} {
 }
 
 proc mktaggo {} {
-    domktag
+    if {![domktag]} return
     mktagcan
 }
 
@@ -7957,6 +7961,7 @@ proc writecommit {} {
     set wrcomtop $top
     catch {destroy $top}
     toplevel $top
+    wm transient $top .
     label $top.title -text [mc "Write commit to file"]
     grid $top.title - -pady 10
     label $top.id -text [mc "ID:"]
@@ -7994,7 +7999,7 @@ proc wrcomgo {} {
     set cmd "echo $id | [$wrcomtop.cmd get]"
     set fname [$wrcomtop.fname get]
     if {[catch {exec sh -c $cmd >$fname &} err]} {
-	error_popup "[mc "Error writing commit:"] $err"
+	error_popup "[mc "Error writing commit:"] $err" $wrcomtop
     }
     catch {destroy $wrcomtop}
     unset wrcomtop
@@ -8013,6 +8018,7 @@ proc mkbranch {} {
     set top .makebranch
     catch {destroy $top}
     toplevel $top
+    wm transient $top .
     label $top.title -text [mc "Create new branch"]
     grid $top.title - -pady 10
     label $top.id -text [mc "ID:"]
@@ -8044,12 +8050,12 @@ proc mkbrgo {top} {
     set cmdargs {}
     set old_id {}
     if {$name eq {}} {
-	error_popup [mc "Please specify a name for the new branch"]
+	error_popup [mc "Please specify a name for the new branch"] $top
 	return
     }
     if {[info exists headids($name)]} {
 	if {![confirm_popup [mc \
-		"Branch '%s' already exists. Overwrite?" $name]]} {
+		"Branch '%s' already exists. Overwrite?" $name] $top]} {
 	    return
 	}
 	set old_id $headids($name)
@@ -8310,6 +8316,7 @@ proc showrefs {} {
     }
     toplevel $top
     wm title $top [mc "Tags and heads: %s" [file tail [pwd]]]
+    wm transient $top .
     text $top.list -background $bgcolor -foreground $fgcolor \
 	-selectbackground $selectbgcolor -font mainfont \
 	-xscrollcommand "$top.xsb set" -yscrollcommand "$top.ysb set" \
@@ -9637,6 +9644,7 @@ proc mkfontdisp {font top which} {
 
 proc choosefont {font which} {
     global fontparam fontlist fonttop fontattr
+    global prefstop
 
     set fontparam(which) $which
     set fontparam(font) $font
@@ -9650,6 +9658,7 @@ proc choosefont {font which} {
 	font create sample
 	eval font config sample [font actual $font]
 	toplevel $top
+	wm transient $top $prefstop
 	wm title $top [mc "Gitk font chooser"]
 	label $top.l -textvariable fontparam(which)
 	pack $top.l -side top
@@ -9766,6 +9775,7 @@ proc doprefs {} {
     }
     toplevel $top
     wm title $top [mc "Gitk preferences"]
+    wm transient $top .
     label $top.ldisp -text [mc "Commit list display options"]
     grid $top.ldisp - -sticky w -pady 10
     label $top.spacer -text " "
-- 
1.6.0.3.15.gb8d36

^ permalink raw reply related

* [PATCH (GITK) v3 3/6] gitk: Add accelerators to frequently used menu commands.
From: Alexander Gavrilov @ 2008-11-02 18:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras
In-Reply-To: <1225652389-22082-3-git-send-email-angavrilov@gmail.com>

This commit documents keyboard accelerators used for menu
commands in the menu, as it is usually done, and adds some
more, e.g. F4 to invoke Edit View.

The changes include a workaround for handling Shift-F4 on
systems where XKB binds special XF86_Switch_VT_* symbols
to Ctrl-Alt-F* combinations. Tk often receives these codes
when Shift-F* is pressed, so it is necessary to bind the
relevant actions to them as well.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 gitk |   36 +++++++++++++++++++++++++++++-------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/gitk b/gitk
index 41d3d2d..f747c70 100755
--- a/gitk
+++ b/gitk
@@ -1801,6 +1801,11 @@ proc setoptions {} {
 # command to invoke for command, or {variable value} for radiobutton
 proc makemenu {m items} {
     menu $m
+    if {[tk windowingsystem] eq {aqua}} {
+	set M1T Cmd
+    } else {
+	set M1T Ctrl
+    }
     foreach i $items {
 	set name [mc [lindex $i 1]]
 	set type [lindex $i 2]
@@ -1826,7 +1831,9 @@ proc makemenu {m items} {
 		    -value [lindex $thing 1]
 	    }
 	}
-	eval $m add $params [lrange $i 4 end]
+	set tail [lrange $i 4 end]
+	regsub -all {\$M1T\y} $tail $M1T tail
+	eval $m add $params $tail
 	if {$type eq "cascade"} {
 	    makemenu $m.$submenu $thing
 	}
@@ -1860,17 +1867,17 @@ proc makewindow {} {
     makemenu .bar {
 	{mc "File" cascade {
 	    {mc "Update" command updatecommits -accelerator F5}
-	    {mc "Reload" command reloadcommits}
+	    {mc "Reload" command reloadcommits -accelerator $M1T-F5}
 	    {mc "Reread references" command rereadrefs}
-	    {mc "List references" command showrefs}
-	    {mc "Quit" command doquit}
+	    {mc "List references" command showrefs -accelerator F2}
+	    {mc "Quit" command doquit -accelerator $M1T-Q}
 	}}
 	{mc "Edit" cascade {
 	    {mc "Preferences" command doprefs}
 	}}
 	{mc "View" cascade {
-	    {mc "New view..." command {newview 0}}
-	    {mc "Edit view..." command editview -state disabled}
+	    {mc "New view..." command {newview 0} -accelerator Shift-F4}
+	    {mc "Edit view..." command editview -state disabled -accelerator F4}
 	    {mc "Delete view" command delview -state disabled}
 	    {xx "" separator}
 	    {mc "All files" radiobutton {selectedview 0} -command {showview 0}}
@@ -2232,7 +2239,12 @@ proc makewindow {} {
     bindkey <Key-Return> {dofind 1 1}
     bindkey ? {dofind -1 1}
     bindkey f nextfile
-    bindkey <F5> updatecommits
+    bind . <F5> updatecommits
+    bind . <$M1B-F5> reloadcommits
+    bind . <F2> showrefs
+    bind . <Shift-F4> {newview 0}
+    catch { bind . <Shift-Key-XF86_Switch_VT_4> {newview 0} }
+    bind . <F4> edit_or_newview
     bind . <$M1B-q> doquit
     bind . <$M1B-f> {dofind 1 1}
     bind . <$M1B-g> {dofind 1 0}
@@ -3483,6 +3495,16 @@ proc newview {ishighlight} {
     vieweditor $top $nextviewnum [mc "Gitk view definition"]
 }
 
+proc edit_or_newview {} {
+    global curview
+
+    if {$curview > 0} {
+	editview
+    } else {
+	newview 0
+    }
+}
+
 proc editview {} {
     global curview
     global viewname viewperm newviewname newviewperm
-- 
1.6.0.3.15.gb8d36

^ permalink raw reply related

* [PATCH (GITK) v3 4/6] gitk: Make cherry-pick call git-citool on conflicts.
From: Alexander Gavrilov @ 2008-11-02 18:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras
In-Reply-To: <1225652389-22082-4-git-send-email-angavrilov@gmail.com>

Now that git-gui has facilities to help users resolve
conflicts, it makes sense to launch it from other GUI
tools when they happen.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 gitk |   40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/gitk b/gitk
index f747c70..71f1b27 100755
--- a/gitk
+++ b/gitk
@@ -8110,6 +8110,32 @@ proc mkbrgo {top} {
     }
 }
 
+proc exec_citool {tool_args {baseid {}}} {
+    global commitinfo env
+
+    set save_env [array get env GIT_AUTHOR_*]
+
+    if {$baseid ne {}} {
+	if {![info exists commitinfo($baseid)]} {
+	    getcommit $baseid
+	}
+	set author [lindex $commitinfo($baseid) 1]
+	set date [lindex $commitinfo($baseid) 2]
+	if {[regexp {^\s*(\S.*\S|\S)\s*<(.*)>\s*$} \
+	            $author author name email]
+	    && $date ne {}} {
+	    set env(GIT_AUTHOR_NAME) $name
+	    set env(GIT_AUTHOR_EMAIL) $email
+	    set env(GIT_AUTHOR_DATE) $date
+	}
+    }
+
+    eval exec git citool $tool_args &
+
+    array unset env GIT_AUTHOR_*
+    array set env $save_env
+}
+
 proc cherrypick {} {
     global rowmenuid curview
     global mainhead mainheadid
@@ -8128,7 +8154,19 @@ proc cherrypick {} {
     # no error occurs, and exec takes that as an indication of error...
     if {[catch {exec sh -c "git cherry-pick -r $rowmenuid 2>&1"} err]} {
 	notbusy cherrypick
-	error_popup $err
+	if {[regexp -line \
+	    {Entry '(.*)' would be overwritten by merge} $err msg fname]} {
+	    error_popup [mc "Cherry-pick failed:
+file '%s' had local modifications.
+
+Please commit, reset or stash your changes." $fname]
+	} elseif {[regexp -line {^CONFLICT \(.*\):} $err msg]} {
+	    # Force citool to read MERGE_MSG
+	    file delete [file join [gitdir] "GITGUI_MSG"]
+	    exec_citool {} $rowmenuid
+	} else {
+	    error_popup $err
+	}
 	return
     }
     set newhead [exec git rev-parse HEAD]
-- 
1.6.0.3.15.gb8d36

^ permalink raw reply related

* [PATCH (GITK) v3 5/6] gitk: Implement a user-friendly Edit View dialog.
From: Alexander Gavrilov @ 2008-11-02 18:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras
In-Reply-To: <1225652389-22082-5-git-send-email-angavrilov@gmail.com>

Originally gitk required the user to specify all limiting
options manually in the same field with the list of commits.
It is rather unfriendly for new users, who may not know
which options can be used, or, indeed, that it is possible
to specify them at all.

This patch modifies the dialog to present the most useful
options as individual fields. Note that options that may
be useful to an extent, but produce a severely broken view,
are deliberately not included.

It is still possible to specify options in the commit list
field, but when the dialog is reopened, they will be extracted
into their own separate fields.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 gitk |  207 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 163 insertions(+), 44 deletions(-)

diff --git a/gitk b/gitk
index 71f1b27..5b4eaa2 100755
--- a/gitk
+++ b/gitk
@@ -3479,8 +3479,8 @@ proc shellsplit {str} {
 # Code to implement multiple views
 
 proc newview {ishighlight} {
-    global nextviewnum newviewname newviewperm newishighlight
-    global newviewargs revtreeargs viewargscmd newviewargscmd curview
+    global nextviewnum newviewname newishighlight
+    global revtreeargs viewargscmd newviewopts curview
 
     set newishighlight $ishighlight
     set top .gitkview
@@ -3489,9 +3489,9 @@ proc newview {ishighlight} {
 	return
     }
     set newviewname($nextviewnum) "[mc "View"] $nextviewnum"
-    set newviewperm($nextviewnum) 0
-    set newviewargs($nextviewnum) [shellarglist $revtreeargs]
-    set newviewargscmd($nextviewnum) $viewargscmd($curview)
+    set newviewopts($nextviewnum,perm) 0
+    set newviewopts($nextviewnum,cmd)  $viewargscmd($curview)
+    decode_view_opts $nextviewnum $revtreeargs
     vieweditor $top $nextviewnum [mc "Gitk view definition"]
 }
 
@@ -3505,53 +3505,167 @@ proc edit_or_newview {} {
     }
 }
 
+set known_view_options {
+    {perm    b    . {}               {mc "Remember this view"}}
+    {args    t50= + {}               {mc "Commits to include (arguments to git log):"}}
+    {all     b    * "--all"          {mc "Use all refs"}}
+    {dorder  b    . {"--date-order" "-d"}      {mc "Strictly sort by date"}}
+    {lright  b    . "--left-right"   {mc "Mark branch sides"}}
+    {since   t15  + {"--since=*" "--after=*"}  {mc "Since date:"}}
+    {until   t15  . {"--until=*" "--before=*"} {mc "Until date:"}}
+    {limit   t10  + "--max-count=*"  {mc "Max count:"}}
+    {skip    t10  . "--skip=*"       {mc "Skip:"}}
+    {first   b    . "--first-parent" {mc "Limit to first parent"}}
+    {cmd     t50= + {}               {mc "Command to generate more commits to include:"}}
+    }
+
+proc encode_view_opts {n} {
+    global known_view_options newviewopts
+
+    set rargs [list]
+    foreach opt $known_view_options {
+	set patterns [lindex $opt 3]
+	if {$patterns eq {}} continue
+	set pattern [lindex $patterns 0]
+
+	set val $newviewopts($n,[lindex $opt 0])
+	
+	if {[lindex $opt 1] eq "b"} {
+	    if {$val} {
+		lappend rargs $pattern
+	    }
+	} else {
+	    set val [string trim $val]
+	    if {$val ne {}} {
+		set pfix [string range $pattern 0 end-1]
+		lappend rargs $pfix$val
+	    }
+	}
+    }
+    return [concat $rargs [shellsplit $newviewopts($n,args)]]
+}
+
+proc decode_view_opts {n view_args} {
+    global known_view_options newviewopts
+
+    foreach opt $known_view_options {
+	if {[lindex $opt 1] eq "b"} {
+	    set val 0
+	} else {
+	    set val {}
+	}
+	set newviewopts($n,[lindex $opt 0]) $val
+    }
+    set oargs [list]
+    foreach arg $view_args {
+	if {[regexp -- {^-([0-9]+)$} $arg arg cnt]
+	    && ![info exists found(limit)]} {
+	    set newviewopts($n,limit) $cnt
+	    set found(limit) 1
+	    continue
+	}
+	catch { unset val }
+	foreach opt $known_view_options {
+	    set id [lindex $opt 0]
+	    if {[info exists found($id)]} continue
+	    foreach pattern [lindex $opt 3] {
+		if {![string match $pattern $arg]} continue
+		if {[lindex $opt 1] ne "b"} {
+		    set size [string length $pattern]
+		    set val [string range $arg [expr {$size-1}] end]
+		} else {
+		    set val 1
+		}
+		set newviewopts($n,$id) $val
+		set found($id) 1
+		break
+	    }
+	    if {[info exists val]} break
+	}
+	if {[info exists val]} continue
+	lappend oargs $arg
+    }
+    set newviewopts($n,args) [shellarglist $oargs]
+}
+
 proc editview {} {
     global curview
-    global viewname viewperm newviewname newviewperm
-    global viewargs newviewargs viewargscmd newviewargscmd
+    global viewname viewperm newviewname newviewopts
+    global viewargs viewargscmd
 
     set top .gitkvedit-$curview
     if {[winfo exists $top]} {
 	raise $top
 	return
     }
-    set newviewname($curview) $viewname($curview)
-    set newviewperm($curview) $viewperm($curview)
-    set newviewargs($curview) [shellarglist $viewargs($curview)]
-    set newviewargscmd($curview) $viewargscmd($curview)
+    set newviewname($curview)      $viewname($curview)
+    set newviewopts($curview,perm) $viewperm($curview)
+    set newviewopts($curview,cmd)  $viewargscmd($curview)
+    decode_view_opts $curview $viewargs($curview)
     vieweditor $top $curview "Gitk: edit view $viewname($curview)"
 }
 
 proc vieweditor {top n title} {
-    global newviewname newviewperm viewfiles bgcolor
+    global newviewname newviewopts viewfiles bgcolor
+    global known_view_options
 
     toplevel $top
     wm title $top $title
     wm transient $top .
+
+    # View name
+    frame $top.nfr
     label $top.nl -text [mc "Name"]
     entry $top.name -width 20 -textvariable newviewname($n)
-    grid $top.nl $top.name -sticky w -pady 5
-    checkbutton $top.perm -text [mc "Remember this view"] \
-	-variable newviewperm($n)
-    grid $top.perm - -pady 5 -sticky w
-    message $top.al -aspect 1000 \
-	-text [mc "Commits to include (arguments to git log):"]
-    grid $top.al - -sticky w -pady 5
-    entry $top.args -width 50 -textvariable newviewargs($n) \
-	-background $bgcolor
-    grid $top.args - -sticky ew -padx 5
-
-    message $top.ac -aspect 1000 \
-	-text [mc "Command to generate more commits to include:"]
-    grid $top.ac - -sticky w -pady 5
-    entry $top.argscmd -width 50 -textvariable newviewargscmd($n) \
-	-background white
-    grid $top.argscmd - -sticky ew -padx 5
-
-    message $top.l -aspect 1000 \
+    pack $top.nfr -in $top -fill x -pady 5 -padx 3
+    pack $top.nl -in $top.nfr -side left -padx {0 30}
+    pack $top.name -in $top.nfr -side left
+
+    # View options
+    set cframe $top.nfr
+    set cexpand 0
+    set cnt 0
+    foreach opt $known_view_options {
+	set id [lindex $opt 0]
+	set type [lindex $opt 1]
+	set flags [lindex $opt 2]
+	set title [eval [lindex $opt 4]]
+	set lxpad 0
+
+	if {$flags eq "+" || $flags eq "*"} {
+	    set cframe $top.fr$cnt
+	    incr cnt
+	    frame $cframe
+	    pack $cframe -in $top -fill x -pady 3 -padx 3
+	    set cexpand [expr {$flags eq "*"}]
+	} else {
+	    set lxpad 5
+	}
+
+	if {$type eq "b"} {
+	    checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id)
+	    pack $cframe.c_$id -in $cframe -side left \
+		-padx [list $lxpad 0] -expand $cexpand -anchor w
+	} elseif {[regexp {^t(\d+)$} $type type sz]} {
+	    message $cframe.l_$id -aspect 1500 -text $title
+	    entry $cframe.e_$id -width $sz -background $bgcolor \
+		-textvariable newviewopts($n,$id)
+	    pack $cframe.l_$id -in $cframe -side left -padx [list $lxpad 0]
+	    pack $cframe.e_$id -in $cframe -side left -expand 1 -fill x
+	} elseif {[regexp {^t(\d+)=$} $type type sz]} {
+	    message $cframe.l_$id -aspect 1500 -text $title
+	    entry $cframe.e_$id -width $sz -background $bgcolor \
+		-textvariable newviewopts($n,$id)
+	    pack $cframe.l_$id -in $cframe -side top -pady [list 3 0] -anchor w
+	    pack $cframe.e_$id -in $cframe -side top -fill x
+	}
+    }
+
+    # Path list
+    message $top.l -aspect 1500 \
 	-text [mc "Enter files and directories to include, one per line:"]
-    grid $top.l - -sticky w
-    text $top.t -width 40 -height 10 -background $bgcolor -font uifont
+    pack $top.l -in $top -side top -pady [list 7 0] -anchor w -padx 3
+    text $top.t -width 40 -height 5 -background $bgcolor -font uifont
     if {[info exists viewfiles($n)]} {
 	foreach f $viewfiles($n) {
 	    $top.t insert end $f
@@ -3560,15 +3674,19 @@ proc vieweditor {top n title} {
 	$top.t delete {end - 1c} end
 	$top.t mark set insert 0.0
     }
-    grid $top.t - -sticky ew -padx 5
+    pack $top.t -in $top -side top -pady [list 0 5] -fill both -expand 1 -padx 3
     frame $top.buts
     button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
+    button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1]
     button $top.buts.can -text [mc "Cancel"] -command [list destroy $top]
+    bind $top <Control-Return> [list newviewok $top $n]
+    bind $top <F5> [list newviewok $top $n 1]
     bind $top <Escape> [list destroy $top]
-    grid $top.buts.ok $top.buts.can
+    grid $top.buts.ok $top.buts.apply $top.buts.can
     grid columnconfigure $top.buts 0 -weight 1 -uniform a
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
-    grid $top.buts - -pady 10 -sticky ew
+    grid columnconfigure $top.buts 2 -weight 1 -uniform a
+    pack $top.buts -in $top -side top -fill x
     focus $top.t
 }
 
@@ -3589,13 +3707,13 @@ proc allviewmenus {n op args} {
     # doviewmenu $viewhlmenu 1 [list addvhighlight $n] $op $args
 }
 
-proc newviewok {top n} {
+proc newviewok {top n {apply 0}} {
     global nextviewnum newviewperm newviewname newishighlight
     global viewname viewfiles viewperm selectedview curview
-    global viewargs newviewargs viewargscmd newviewargscmd viewhlmenu
+    global viewargs viewargscmd newviewopts viewhlmenu
 
     if {[catch {
-	set newargs [shellsplit $newviewargs($n)]
+	set newargs [encode_view_opts $n]
     } err]} {
 	error_popup "[mc "Error in commit selection arguments:"] $err" $top
 	return
@@ -3611,10 +3729,10 @@ proc newviewok {top n} {
 	# creating a new view
 	incr nextviewnum
 	set viewname($n) $newviewname($n)
-	set viewperm($n) $newviewperm($n)
+	set viewperm($n) $newviewopts($n,perm)
 	set viewfiles($n) $files
 	set viewargs($n) $newargs
-	set viewargscmd($n) $newviewargscmd($n)
+	set viewargscmd($n) $newviewopts($n,cmd)
 	addviewmenu $n
 	if {!$newishighlight} {
 	    run showview $n
@@ -3623,7 +3741,7 @@ proc newviewok {top n} {
 	}
     } else {
 	# editing an existing view
-	set viewperm($n) $newviewperm($n)
+	set viewperm($n) $newviewopts($n,perm)
 	if {$newviewname($n) ne $viewname($n)} {
 	    set viewname($n) $newviewname($n)
 	    doviewmenu .bar.view 5 [list showview $n] \
@@ -3632,15 +3750,16 @@ proc newviewok {top n} {
 		# entryconf [list -label $viewname($n) -value $viewname($n)]
 	}
 	if {$files ne $viewfiles($n) || $newargs ne $viewargs($n) || \
-		$newviewargscmd($n) ne $viewargscmd($n)} {
+		$newviewopts($n,cmd) ne $viewargscmd($n)} {
 	    set viewfiles($n) $files
 	    set viewargs($n) $newargs
-	    set viewargscmd($n) $newviewargscmd($n)
+	    set viewargscmd($n) $newviewopts($n,cmd)
 	    if {$curview == $n} {
 		run reloadcommits
 	    }
 	}
     }
+    if {$apply} return
     catch {destroy $top}
 }
 
-- 
1.6.0.3.15.gb8d36

^ permalink raw reply related

* [PATCH (GITK) v3 6/6] gitk: Explicitly position popup windows.
From: Alexander Gavrilov @ 2008-11-02 18:59 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras
In-Reply-To: <1225652389-22082-6-git-send-email-angavrilov@gmail.com>

For some reason, on Windows all transient windows are placed
in the upper left corner of the screen. Thus, it is necessary
to explicitly position the windows relative to their parent.
For simplicity this patch uses the function that is used
internally by Tk dialogs.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---

	I wrapped the call to tk::PlaceWindow in a
	helper function to minimize the number of
	places to change if something happens to it.
	
	-- Alexander

 gitk |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/gitk b/gitk
index 5b4eaa2..7d153a3 100755
--- a/gitk
+++ b/gitk
@@ -1739,7 +1739,13 @@ proc removehead {id name} {
     unset headids($name)
 }
 
-proc show_error {w top msg} {
+proc center_window {window origin} {
+    # Use a handy function from Tk. Note that it
+    # calls 'update' to figure out dimensions.
+    tk::PlaceWindow $window widget $origin
+}
+
+proc show_error {w top msg {owner {}}} {
     message $w.m -text $msg -justify center -aspect 400
     pack $w.m -side top -fill x -padx 20 -pady 20
     button $w.ok -text [mc OK] -command "destroy $top"
@@ -1748,6 +1754,9 @@ proc show_error {w top msg} {
     bind $top <Key-Return> "destroy $top"
     bind $top <Key-space>  "destroy $top"
     bind $top <Key-Escape> "destroy $top"
+    if {$owner ne {}} {
+	center_window $top $owner
+    }
     tkwait window $top
 }
 
@@ -1755,7 +1764,7 @@ proc error_popup {msg {owner .}} {
     set w .error
     toplevel $w
     wm transient $w $owner
-    show_error $w $w $msg
+    show_error $w $w $msg $owner
 }
 
 proc confirm_popup {msg {owner .}} {
@@ -1774,6 +1783,7 @@ proc confirm_popup {msg {owner .}} {
     bind $w <Key-Return> "set confirm_ok 1; destroy $w"
     bind $w <Key-space>  "set confirm_ok 1; destroy $w"
     bind $w <Key-Escape> "destroy $w"
+    center_window $w $owner
     tkwait window $w
     return $confirm_ok
 }
@@ -2572,6 +2582,7 @@ Use and redistribute under the terms of the GNU General Public License"] \
     bind $w <Visibility> "focus $w.ok"
     bind $w <Key-Escape> "destroy $w"
     bind $w <Key-Return> "destroy $w"
+    center_window $w .
 }
 
 proc keys {} {
@@ -2635,6 +2646,7 @@ proc keys {} {
     bind $w <Visibility> "focus $w.ok"
     bind $w <Key-Escape> "destroy $w"
     bind $w <Key-Return> "destroy $w"
+    center_window $w .
 }
 
 # Procedures for manipulating the file list window at the
@@ -3687,6 +3699,7 @@ proc vieweditor {top n title} {
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
     grid columnconfigure $top.buts 2 -weight 1 -uniform a
     pack $top.buts -in $top -side top -fill x
+    center_window $top .
     focus $top.t
 }
 
@@ -7950,6 +7963,7 @@ proc mkpatch {} {
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
     grid $top.buts - -pady 10 -sticky ew
     focus $top.fname
+    center_window $top .
 }
 
 proc mkpatchrev {} {
@@ -8024,6 +8038,7 @@ proc mktag {} {
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
     grid $top.buts - -pady 10 -sticky ew
     focus $top.tag
+    center_window $top .
 }
 
 proc domktag {} {
@@ -8131,6 +8146,7 @@ proc writecommit {} {
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
     grid $top.buts - -pady 10 -sticky ew
     focus $top.fname
+    center_window $top .
 }
 
 proc wrcomgo {} {
@@ -8181,6 +8197,7 @@ proc mkbranch {} {
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
     grid $top.buts - -pady 10 -sticky ew
     focus $top.name
+    center_window $top .
 }
 
 proc mkbrgo {top} {
@@ -8341,6 +8358,7 @@ proc resethead {} {
     bind $w <Key-Escape> [list destroy $w]
     pack $w.cancel -side right -fill x -padx 20 -pady 20
     bind $w <Visibility> "grab $w; focus $w"
+    center_window $w .
     tkwait window $w
     if {!$confirm_ok} return
     if {[catch {set fd [open \
@@ -8526,6 +8544,7 @@ proc showrefs {} {
     bind $top.list <ButtonRelease-1> {sel_reflist %W %x %y; break}
     set reflist {}
     refill_reflist
+    center_window $top .
 }
 
 proc sel_reflist {w x y} {
@@ -9878,6 +9897,7 @@ proc choosefont {font which} {
 	grid columnconfigure $top.buts 1 -weight 1 -uniform a
 	pack $top.buts -side bottom -fill x
 	trace add variable fontparam write chg_fontparam
+	center_window $top $prefstop
     } else {
 	raise $top
 	$top.c itemconf text -text $which
@@ -10060,6 +10080,7 @@ proc doprefs {} {
     grid columnconfigure $top.buts 1 -weight 1 -uniform a
     grid $top.buts - - -pady 10 -sticky ew
     bind $top <Visibility> "focus $top.buts.ok"
+    center_window $top .
 }
 
 proc choose_extdiff {} {
-- 
1.6.0.3.15.gb8d36

^ permalink raw reply related

* Re: commit takes 8 secs; but instant when offline - can I fix this?
From: Linus Torvalds @ 2008-11-02 19:18 UTC (permalink / raw)
  To: Brendan Macmillan; +Cc: Thomas Rast, git
In-Reply-To: <7d856ea50811020834n3a252ae2r21d36b24c10eebbf@mail.gmail.com>



On Mon, 3 Nov 2008, Brendan Macmillan wrote:
>
> Many thanks for the explanation, and it's now instant.
> 
> To ~/.gitconfig, I added:
> 
> [user]
>   email = myemail@address.com

I'd like to point out that in addition to making git not try to figure out 
your hostname, you may well want to try to fix your setup so that it 
doesn't take that long in the first place. 

In fact, you might use "git commit" (or "git var -l" which probably shows 
the same 8-second thing more easily without needing anything else) as a 
way to debug what it is that takes too long.

Because even though adding your email to yout .gitconfig file is the right 
solution _anyway_ (because the git guess is rather more flaky than you 
just telling it what host to use), I bet there are other programs that 
will have the same 8-second delay, and you are better off trying to just 
fix your DNS problem.

			Linus

^ permalink raw reply

* Re: Pull request for sub-tree merge into /contrib/gitstats
From: Sverre Rabbelier @ 2008-11-02 19:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailinglist
In-Reply-To: <7vljw5evj5.fsf@gitster.siamese.dyndns.org>

[Sorry for the late reply, have been travelling, sleeping, and
catching up with family in the past few days]

On Thu, Oct 30, 2008 at 20:24, Junio C Hamano <gitster@pobox.com> wrote:
> I have a mixed feeling about this.  From a longer-term perspective, do you
> really want this to be a part of git.git repository?

My main reason for wanting to have it in git.git is getting additional
exposure, being in /contrib seems like a good way to do that.

> I do not mind having notes to endorse and advocate "stats" as one of the
> "Third party packages that may make your git life more pleasuable", just
> like tig, stgit, guilt and topgit, but I cannot convince myself that
> merging it as a subtree is the right thing to do at this point.

Heh, blame Johannes for that one; the main reason for not doing
something like this earlier was my uncertaincy as to -what- to do.
Dscho suggested to request-pull a subtree merge, which is what I did.

> The "stats" tool, at least at the conceptual level, shares one important
> property with tools like gitk and gitweb: it could be useful to people
> whose sources are not in git repositories but in say Hg or Bzr, with some
> effort.  The code may need refactoring to make it easier to plug in
> different backends and writing actual backends (aka "porting"), but that
> is something you can expect people with different backends to help you
> with.

This is true, it uses a python wrapper around git, but with some work
it could be make to use a more abstract wrapper instead, that allows
the use of different backends.

> However, it would be awkward for the contrib/ area in git.git to carry a
> lot of code that are only needed to produce stat data from non-git
> repositories, once such a porting effort begins.

I reckon it would not be a lot of code, but I agree, that would be awkward.

> It's perfectly fine if you are not interested in any of the other
> backends, and tell the people that they are welcome to fork it never to
> merge back.  But if this were my brainchild, I'd imagine I'd be wishing to
> be able to buy back the improvements to the "core stats" parts that are
> done by people with other backends.  I would imagine binding the current
> code as part of git.git would make such improvements harder to manage,
> both for you (who wants to buy back the changes made by others on
> different backends) and for others on different backends (who want to
> merge the changes made by you to their forks).

This is true, if there is indeed interest from other backends to use
this kind of functionality, I would welcome the patches. In such a
case being in git.git/contrib might not be a good thing.

> Perhaps pointing at your tree as a submodule would be the right thing to
> do; then git.git proper will be just one of the users of "stats" tool.

Would a subdir in git.git for such submodules be a good idea? That way
we don't have to worry about a conflict between (for example) git-gui
as a subdir, and git-gui as a submodule.

> How about making that as a mid-to-longer term goal?  When we eject git-gui
> and gitk from git.git and make them a submodule (wasn't that supposed to
> happen in 1.8 or 2.0 timeframe?), we may also add "stats" as a submodule?

I didn't know there was a timeframe for this, I thought your
suggestion tree to eject-and-make-into-submodule was somewhat ignored;
if there are indeed plans for this, I would be ok with having
git-stats as a submodule instead.

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply

* Re: Offtopic [Re: Can't use gitk.]
From: Paolo Ciarrocchi @ 2008-11-02 19:28 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Franck, Andreas Ericsson, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0511141005590.3263@g5.osdl.org>

On Mon, Nov 14, 2005 at 7:24 PM, Linus Torvalds <torvalds@osdl.org> wrote:
>
> On Mon, 14 Nov 2005, Franck wrote:

Sorry for commenting on this email only now but I found it in my
archive while looking for a different thread :-)

>> oops, sorry Andreas for that ! I use to spelling this name without 's'
>> that's why I did the mistake I think.
>
> In Finland and Sweden Andrea without the "s" is a girls name, while
> Andreas with the "s" (or André without "-as") is a boy.
>
> It's not even very rare. "Andrea" was the 84th most popular female name in
> Sweden in 2000.
>
> It can be confusing, since in Italy (and, I think, southern Germany and
> much of Eastern Europe), "Andrea" is a boy, and in fact, the name
> originally comes from the Greek meaning "man".

In Italy Andrea might be a girl as well even if that name is often
used for a boy.

Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/

^ permalink raw reply

* Re: [PATCH 3/7] Documentation: rework SHA1 description in git push
From: Anders Melchiorsen @ 2008-11-02 20:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v1vxxba2c.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Anders Melchiorsen <mail@cup.kalibalik.dk> writes:
>
>> Get rid of a double pair of parentheses. The arbitrary SHA1 is a
>> special case, so it can be postponed a bit.
>
> Hmmm...
>
> Strictly speaking, arbitrary SHA-1 is the general case, and branch name is
> a special case of it, but in practice, branch name is the most frequently
> used form, and that is why it has the short-hand convention that allows it
> to to be pushed to the same name.

Right, that was poor wording. When I said "special case", I meant it
as "rare use case".


>> Also mention HEAD, which is possibly the most useful SHA1 in this
>> situation.
>
> HEAD is indeed useful, but it falls into the special case of "branch
> name", not "arbitrary SHA-1 expression".  This distinction is important
> because you can push "HEAD" without colon and it will act as if you said
> master:master (or whatever branch you are currently on).  This is already
> described in the existing doc:
>
>     The local ref that matches <src> is used
>     to fast forward the remote ref that matches <dst> (or, if no <dst> was
>     specified, the same ref that <src> referred to locally).

Oh, I did (obviously) not realize that you can use HEAD in that way,
and actually I cannot read that from the quoted paragraph even now
that I know about it.

It seems to me that HEAD is a special-special case, and that it is not
even mentioned in the current documentation. With my current
understanding, I would say that HEAD can work both as a "branch name"
(that discovers its own name automatically) and as an "arbitrary
SHA-1" (with a detached head).


>> --- a/Documentation/git-push.txt
>> +++ b/Documentation/git-push.txt
>> @@ -38,9 +38,7 @@ OPTIONS
>>  	by the source ref, followed by a colon `:`, followed by
>>  	the destination ref.
>>  +
>> -The <src> side represents the source branch (or arbitrary
>> -"SHA1 expression", such as `master~4` (four parents before the
>> -tip of `master` branch); see linkgit:git-rev-parse[1]) that you
>> +The <src> side represents the source branch that you
>>  want to push.  The <dst> side represents the destination location.
>
> The <src> is often the name of the branch you would want to push, but it
> can be any arbitrary "SHA-1 expression", such as `master~4` (four parents
> before the tip of `master` branch -- see linkgit:git-rev-parse[1]), or
> `HEAD` (the tip of the current branch).  The <dst> tells which ref on the
> remote side is updated with this push.
>
> The object referenced by <src> is used to fast forward the ref <dst> on
> the remote side.  You can omit <dst> to update the same ref on the remote
> side as <src> (<src> is often the name of a branch you push, and often you
> push to the same branch on the remote side; `git push HEAD` is a handy way
> to push only the current branch to the remote side under the same name).
> If the optional leading plus `{plus}` is used, the remote ref is updated
> even if it does not result in a fast forward update.

I find those paragraphs hard to read. The shorter sentences and lack
of parentheses in my patch series was more to my taste. I actually
think that the examples, like explaining master~4, detracts from the
main topic and makes it harder to find the information.



>> @@ -193,6 +195,10 @@ git push origin master::
>>  	with it.  If `master` did not exist remotely, it would be
>>  	created.
>>  
>> +git push origin HEAD:master::
>> +	Push the current head to the remote ref matching `master` in
>> +	the `origin` repository.
>> +
>
> Additional example is good, but you would want to tell readers that this
> would be useful when your current branch is _not_ 'master'.

Right.



Cheers,
Anders.

^ permalink raw reply

* Git and Media repositories....
From: Tim Ansell @ 2008-11-02 19:50 UTC (permalink / raw)
  To: git

Hey guys,

Last week at the gittogether I lead some discussions about how we could
make Git better support large media repositories (which is one area
where Subversion still make sense). It was suggested that I post to this
list to get a discussion going. 

The general idea is that we always clone the complete meta-data (tags,
commits and trees) and then only clone blobs when they are needed (using
something like alternates). This allows us to support shallow, narrow
and sparse checkouts while still being able to perform operations such
as committing and merging.

You can find a copy of the summary presentation at
 http://www.thousandparsec.net/~tim/media+git.pdf

I have started working on adapting git to check a remote http alternate
to provide a proof of concept.

I appreciate any help or suggestions.

Tim 'mithro' Ansell

^ permalink raw reply

* git-cvsimport BUG: some commits are completely out of phase (but cvsps sees them all right)
From: Francis Galiegue @ 2008-11-02 21:03 UTC (permalink / raw)
  To: git

Maybe it's due to the other bug that I reported with git-cvsimport a few days 
ago: namely, it does NOT see branches created by CVS with no commits in them 
(ie, create the branch and that's it, don't touch anything).

The problem is very serious, since it seems to trigger another bug which 
prevents git-cvsimport from working at all. cvsps DOES see the commit 
correctly (branc exists for this file at 1.47.6):

---
Members:
        
src/java/com/one2team/database/bean/impl/relation/reporting/Register.java:1.47->1.47.6.1
---

But on the imported git repository, the diff is rather 1.60 -> 1.47.6.1! As a 
result, the repository is plain unusable.

As to the first problem, git finds 6 branches, cvs log finds 8 for the same 
module. git finds 22 tags, cvs log finds 29!

-- 
fge

^ permalink raw reply

* What's cooking in git.git (Nov 2008, #01; Sun, 02)
From: Junio C Hamano @ 2008-11-02 21:34 UTC (permalink / raw)
  To: git; +Cc: David M. Syzdek, pasky

Here are the topics that have been cooking.  Commits prefixed
with '-' are only in 'pu' while commits prefixed with '+' are
in 'next'.

The topics list the commits in reverse chronological order.  The topics
meant to be merged to the maintenance series have "maint-" in their names.

There are backlog patches I'm planning to deal with later today; they do
not appear in this list.

----------------------------------------------------------------
[New Topics]

* mv/maint-branch-m-symref (Sat Nov 1 00:25:44 2008 +0100) 5 commits
 + update-ref --no-deref -d: handle the case when the pointed ref is
   packed
 + git branch -m: forbid renaming of a symref
 + Fix git update-ref --no-deref -d.
 + rename_ref(): handle the case when the reflog of a ref does not
   exist
 + Fix git branch -m for symrefs.

* rs/blame (Sat Oct 25 15:31:36 2008 +0200) 5 commits
 - blame: use xdi_diff_hunks(), get rid of struct patch
 - add xdi_diff_hunks() for callers that only need hunk lengths
 - Allow alternate "low-level" emit function from xdl_diff
 - Always initialize xpparam_t to 0
 - blame: inline get_patch()

* ds/uintmax-config (Sun Oct 26 03:52:47 2008 -0800) 2 commits
 - Add Makefile check for FreeBSD 4.9-SECURITY
 - Build: add NO_UINTMAX_T to support ancient systems

I amended the topmost one to widen the applicability of this new feature
to all FreeBSD 4.*, not limited to 4.9-SECURITY; testing before this hits
'next' is appreciated.

* ds/autoconf (Sun Nov 2 01:04:46 2008 -0700) 2 commits
 - DONTMERGE: fixup with a convenience macro
 - autoconf: Add link tests to each AC_CHECK_FUNC() test

The topmost one is my attempt to simplify the new way of checking; the
resulting configure.ac produces the identical configure script with or
without it, so I think it is Ok, but testing before this hits 'next' is
appreciated.  If all goes well, I think the two should be squashed into
one patch.

* jk/diff-convfilter-test-fix (Fri Oct 31 01:09:13 2008 -0400) 4 commits
 + Avoid using non-portable `echo -n` in tests.
 + add userdiff textconv tests
 + document the diff driver textconv feature
 + diff: add missing static declaration

* ar/maint-mksnpath (Mon Oct 27 11:22:09 2008 +0100) 7 commits
 + Use git_pathdup instead of xstrdup(git_path(...))
 + git_pathdup: returns xstrdup-ed copy of the formatted path
 + Fix potentially dangerous use of git_path in ref.c
 + Add git_snpath: a .git path formatting routine with output buffer
 + Fix potentially dangerous uses of mkpath and git_path
 + Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c
 + Add mksnpath which allows you to specify the output buffer

* ar/mksnpath (Thu Oct 30 18:08:58 2008 -0700) 10 commits
 + Merge branch 'ar/maint-mksnpath' into ar/mksnpath
 + Use git_pathdup instead of xstrdup(git_path(...))
 + git_pathdup: returns xstrdup-ed copy of the formatted path
 + Fix potentially dangerous use of git_path in ref.c
 + Add git_snpath: a .git path formatting routine with output buffer
 + Fix potentially dangerous uses of mkpath and git_path
 + Merge branch 'ar/maint-mksnpath' into HEAD
 + Fix potentially dangerous uses of mkpath and git_path
 + Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c
 + Add mksnpath which allows you to specify the output buffer

----------------------------------------------------------------
[Will be merged to 'master' soon]

* cj/maint-gitpm-fix-maybe-self (Sat Oct 18 20:25:12 2008 +0200) 1 commit
 + Git.pm: do not break inheritance

Looked Ok; will be in 'master' soon.

* gb/gitweb-pathinfo (Tue Oct 21 21:34:54 2008 +0200) 5 commits
 + gitweb: generate parent..current URLs
 + gitweb: parse parent..current syntax from PATH_INFO
 + gitweb: use_pathinfo filenames start with /
 + gitweb: generate project/action/hash URLs
 + gitweb: parse project/action/hash_base:filename PATH_INFO

Seventh iteration.

* ag/blame-encoding (Wed Oct 22 00:55:57 2008 +0400) 1 commit
 + builtin-blame: Reencode commit messages according to git-log
   rules.

Looked Ok; will be in 'master' soon.

* mv/parseopt-checkout-index (Sat Oct 18 03:17:23 2008 +0200) 1 commit
 + parse-opt: migrate builtin-checkout-index.

Looked Ok; will be in 'master' soon.

* sh/rebase-i-p (Wed Oct 22 11:59:30 2008 -0700) 9 commits
 + git-rebase--interactive.sh: comparision with == is bashism
 + rebase-i-p: minimum fix to obvious issues
 + rebase-i-p: if todo was reordered use HEAD as the rewritten parent
 + rebase-i-p: do not include non-first-parent commits touching
   UPSTREAM
 + rebase-i-p: only list commits that require rewriting in todo
 + rebase-i-p: fix 'no squashing merges' tripping up non-merges
 + rebase-i-p: delay saving current-commit to REWRITTEN if squashing
 + rebase-i-p: use HEAD for updating the ref instead of mapping
   OLDHEAD
 + rebase-i-p: test to exclude commits from todo based on its parents

Changes the `rebase -i -p` behavior to behave like git sequencer's
rewrite of `rebase -i` would behave.

* np/index-pack (Thu Oct 23 15:05:59 2008 -0400) 5 commits
 + index-pack: don't leak leaf delta result
 + improve index-pack tests
 + fix multiple issues in index-pack
 + index-pack: smarter memory usage during delta resolution
 + index-pack: rationalize delta resolution code

The buglets that caused people on 'next' some surprises are quickly
killed.  Thanks.

----------------------------------------------------------------
[Stalled]

* jk/diff-convfilter (Sun Oct 26 00:50:02 2008 -0400) 8 commits
 - enable textconv for diff in verbose status/commit
 - wt-status: load diff ui config

* nd/narrow (Wed Oct 1 11:04:09 2008 +0700) 9 commits
 - grep: skip files outside sparse checkout area
 - checkout_entry(): CE_NO_CHECKOUT on checked out entries.
 - Prevent diff machinery from examining worktree outside sparse
   checkout
 - ls-files: Add tests for --sparse and friends
 - update-index: add --checkout/--no-checkout to update
   CE_NO_CHECKOUT bit
 - update-index: refactor mark_valid() in preparation for new options
 - ls-files: add options to support sparse checkout
 - Introduce CE_NO_CHECKOUT bit
 - Extend index to save more flags

Needs review.

* jn/gitweb-customlinks (Sun Oct 12 00:02:32 2008 +0200) 1 commit
 - gitweb: Better processing format string in custom links in navbar

Waiting for some sort of response from Pasky.

* jc/gitweb-fix-cloud-tag (Tue Oct 14 21:27:12 2008 -0700) 1 commit
 + Fix reading of cloud tags

Request-for-review-and-ack sent; still waiting for response.

----------------------------------------------------------------
[Dropped]

* bd/blame (Thu Aug 21 18:22:01 2008 -0500) 5 commits
 . Use xdiff caching to improve git blame performance
 . Allow xdiff machinery to cache hash results for a file
 . Always initialize xpparam_t to 0
 . Bypass textual patch generation and parsing in git blame
 . Allow alternate "low-level" emit function from xdl_diff

Réne started code restructuring, which is queued to 'pu'; this series is
dropped.

----------------------------------------------------------------
[On Hold]

* jc/send-pack-tell-me-more (Thu Mar 20 00:44:11 2008 -0700) 1 commit
 - "git push": tellme-more protocol extension

This seems to have a deadlock during communication between the peers.
Someone needs to pick up this topic and resolve the deadlock before it can
continue.

* jc/blame (Wed Jun 4 22:58:40 2008 -0700) 2 commits
 - blame: show "previous" information in --porcelain/--incremental
   format
 - git-blame: refactor code to emit "porcelain format" output

* jk/renamelimit (Sat May 3 13:58:42 2008 -0700) 1 commit
 - diff: enable "too large a rename" warning when -M/-C is explicitly
   asked for

This would be the right thing to do for command line use,
but gitk will be hit due to tcl/tk's limitation, so I am holding
this back for now.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox