Re: What's cooking in git.git (Jul 2013, #09; Mon, 29)

2013-08-02 Thread Torsten Bögershausen
On 2013-08-01 22.51, Ramsay Jones wrote: > Junio C Hamano wrote: >> Ramsay Jones writes: >> I am personally in favor of this simpler solution. Comments? >>> >>> I had expected this to me marked for 'master'. >>> >>> Has this simply been overlooked, or do you have reservations about >>> appl

Please pull l10n updates for 1.8.4 round 1

2013-08-02 Thread Jiang Xin
Hi, Junio Please pull these updates for git l10n. BTW, Ralf's updates for de.po are still in the review process in this list, but I want to send this pull request earlier, because I find there are some new l10n changes (5 new/modified messages) in v1.8.4-rc1. I will start git 1.8,4 l10n rnd 2 rig

Re: Rewriting git-repack.sh in C

2013-08-02 Thread Fredrik Gustafsson
On Fri, Aug 02, 2013 at 09:10:59PM +0700, Duy Nguyen wrote: > > So my question is, how you'd generally approach rewriting a > > shell script in C. > > Start a new process via start_command/run_command interface. It's > safer to retain the process boundary at this stage. You can try to > integrate

[PATCH v2] gc: reject if another gc is running, unless --force is given

2013-08-02 Thread Nguyễn Thái Ngọc Duy
This may happen when `git gc --auto` is run automatically, then the user, to avoid wait time, switches to a new terminal, keeps working and `git gc --auto` is started again because the first gc instance has not clean up the repository. This patch tries to avoid multiple gc running, especially in -

Re: [BUG?] gc and impatience

2013-08-02 Thread Duy Nguyen
On Sat, Aug 3, 2013 at 11:44 AM, Junio C Hamano wrote: > On Fri, Aug 2, 2013 at 8:53 PM, Duy Nguyen wrote: >> Good point. I think that is because gc does not check if gc is already >> running. Adding such a check should not be too hard. I think gc could >> save its pid in $GIT_DIR/auto-gc.pid. Th

[PATCH] cherry-pick: allow "-" as abbreviation of '@{-1}'

2013-08-02 Thread Hiroshige Umino
As "git cherry-pick -" or "git merge -" is convenient to switch back to or merge the previous branch, "git cherry-pick -" is abbreviation of "git cherry-pick @{-1}" to pick up a commit from the previous branch conveniently. Signed-off-by: Hiroshige Umino --- builtin/revert.c| 2 ++

Re: [BUG?] gc and impatience

2013-08-02 Thread Junio C Hamano
On Fri, Aug 2, 2013 at 8:53 PM, Duy Nguyen wrote: > Good point. I think that is because gc does not check if gc is already > running. Adding such a check should not be too hard. I think gc could > save its pid in $GIT_DIR/auto-gc.pid. The next auto-gc checks this, if > the pid is valid, skip auto-

[PATCH] gc: reject if another gc is running, unless --force is given

2013-08-02 Thread Nguyễn Thái Ngọc Duy
This may happen when `git gc --auto` is run automatically, then the user, to avoid wait time, switches to a new terminal, keeps working and `git gc --auto` is started again because the first gc instance has not clean up the repository. Signed-off-by: Nguyễn Thái Ngọc Duy --- I don't know if the

Re: [BUG?] gc and impatience

2013-08-02 Thread Duy Nguyen
On Sat, Aug 3, 2013 at 8:48 AM, Ramkumar Ramachandra wrote: > Auto packing the repository for optimum performance. You may also > run "git gc" manually. See "git help gc" for more information. > > Being my usual impatient self, I opened another prompt and started > merging changes. After the che

change remote to track new branch

2013-08-02 Thread Daniel Convissor
Hi: Long ago I added a remote to my repo. It is set to track what was then WordPress' main release branch (3.4-branch) and created a local branch to use it. Well, time marches on. I want to update my remote and branch to track the new main release branch (3.6-branch). Here's how I set things u

[BUG?] gc and impatience

2013-08-02 Thread Ramkumar Ramachandra
Hi, I was pulling in some changes in the morning to find: Auto packing the repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more information. Being my usual impatient self, I opened another prompt and started merging changes. After the checkout, it

Re: [PATCH] git_mkstemps: improve test suite test

2013-08-02 Thread Jonathan Nieder
Hi, Dale R. Worley wrote: > Commit 52749 fixes a bug regarding testing the return of an open() $ git show 52749 fatal: ambiguous argument '52749': unknown revision or path not in the working tree. Could you mention its subject line or date so it's easier to find? > call for success/failure.

[PATCH] git_mkstemps: improve test suite test

2013-08-02 Thread Dale R. Worley
Commit 52749 fixes a bug regarding testing the return of an open() call for success/failure. Improve the testsuite test for that fix by removing the helper program 'test-close-fd-0' and replacing it with the shell redirection '<&-'. (The redirection is Posix, so it should be portable.) Signed-of

[[TIG][PATCH] 1/3] Add log_select function to find commit from context in log view

2013-08-02 Thread Kumar Appaiah
This commit introduces and uses the log_select function to find the correct commit in the unsplit log view. In the log view, if one scrolls down across a commit line, the current commit (as displayed in the status bar) gets updated, but not so when scrolling upward across a commit. The log_select f

[[TIG][PATCH] 2/3] Display correct diff the context in split log view

2013-08-02 Thread Kumar Appaiah
In the log view, when scrolling across a commit, the diff view should automatically switch to the commit whose context the cursor is on in the log view. This commit changes things to catch the REQ_ENTER in the log view and handle recalculation of the commit and diff display from log_request, rather

[[TIG][PATCH] 3/3] Revert "Scroll diff with arrow keys in log view"

2013-08-02 Thread Kumar Appaiah
This reverts commit 888611dd5d407775245d574a3dc5c01b5963a5ba. This is because, in the re-engineered log view, scrolling the log with the arrows now updates the diff in the diff view when the screen is split. This resembles the earlier behaviour, and is also what users of software like Mutt (which u

[TIG][PATCH 0/3] Refactoring of the log view

2013-08-02 Thread Kumar Appaiah
Hi. These set of patches refactor the log view to provide a behaviour that is quite similar to, say, e-mail with Mutt. The key improvements are: - The current commit is inferred based on the context. For example, if you focus on the commit message of a particular commit, the correct commit is

Re: Making a patch: "git format-patch" does not produce the documented format

2013-08-02 Thread Junio C Hamano
wor...@alum.mit.edu (Dale R. Worley) writes: > I'm preparing some clarifications of SubmittingPatches to explain > things that a new person (e.g., me) would not know. I am not sure if SubmittingPatches is a good place, though. The document is a guidance for people who contribute to _this_ project

[PATCH 2/3] hooks/post-receive-email: force log messages in UTF-8

2013-08-02 Thread Jonathan Nieder
Git commands write commit messages in UTF-8 by default, but that default can be overridden by the [i18n] commitEncoding and logOutputEncoding settings. With such a setting, the emails written by the post-receive-email hook use a mixture of encodings: 1. Log messages use the configured log output

[PATCH 3/3] hooks/post-receive-email: set declared encoding to utf-8

2013-08-02 Thread Jonathan Nieder
From: Gerrit Pape Date: Thu, 11 Dec 2008 20:27:21 + Some email clients (e.g., claws-mail) display the message body incorrectly when the charset is not defined explicitly in a Content-Type header. "git log" generates logs in UTF-8 encoding by default, so add a Content-Type header declaring th

[PATCH 1/3] hooks/post-receive-email: use plumbing instead of git log/show

2013-08-02 Thread Jonathan Nieder
This way the hook doesn't have to keep being tweaked as porcelain learns new features like color and pagination. While at it, replace the "git rev-list | git shortlog" idiom with plain "git shortlog" for simplicity. Except for depending less on the value of settings like '[log] abbrevCommit', no

[PATCH/RFC 0/3] post-receive-email: explicitly set Content-Type header

2013-08-02 Thread Jonathan Nieder
Hi all, This is a revival of [1], which declares encoding in emails to make it more likely that they can be read. I like to think it avoids the mistakes of previous attempts, but I'll let you judge. :) Sorry for the long delay. Thoughts of all kinds welcome, as always. Thanks, Jonathan Gerrit

[PATCH v3 9/6] push: teach --force-with-lease to smart-http transport

2013-08-02 Thread Junio C Hamano
We have been passing enough information to enable the compare-and-swap logic down to the transport layer, but the transport helper was not passing it to smart-http transport. Signed-off-by: Junio C Hamano --- * I didn't bother with the dumb commit walker push for obvious reasons, but if some

[PATCH v3 8/6] send-pack: fix parsing of --force-with-lease option

2013-08-02 Thread Junio C Hamano
The last argument for parse_push_cas_option() is if it is "unset" (i.e. --no-force-with-lease), and we are parsing the option with an explicit value here, so it has to be 0. Signed-off-by: Junio C Hamano --- builtin/send-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH/RFC] log doc: explain --encoding=none and default output encoding

2013-08-02 Thread Jonathan Nieder
Signed-off-by: Jonathan Nieder --- I'm not thrilled with the wording. This can probably be explained more simply. Ideas? Documentation/pretty-options.txt | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-optio

[PATCH] log doc: the argument to --encoding is not optional

2013-08-02 Thread Jonathan Nieder
$ git log --encoding fatal: Option '--encoding' requires a value $ git rev-list --encoding fatal: Option '--encoding' requires a value The argument to --encoding has always been mandatory. Unfortunately manpages like git-rev-list(1), git-log(1), and git-show(1) have described the option's syn

Re: Making a patch: "git format-patch" does not produce the documented format

2013-08-02 Thread Dale R. Worley
> From: John Keeping > > git-format-patch(1) says: > > By default, the subject of a single patch is "[PATCH] " followed > by the concatenation of lines from the commit message up to the > first blank line (see the DISCUSSION section of git-commit(1)). > > I think that ac

Re: [PATCH] git-p4: use "p4 fstat" to interpret View setting

2013-08-02 Thread Pete Wyckoff
ksaitoh...@gmail.com wrote on Fri, 02 Aug 2013 17:02 +0900: > I trying clone Perforce project and I found git-p4. It's a great tool! > > And I don't know how to exclude special extension file in a directory? > (Practically, I want to exclude Excel files at git p4 clone/sync.) > > In Perforce, Vie

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Jonathan Nieder
Junio C Hamano wrote: > Here is what is on top of the revert that has been pushed out on > 'pu'. For what it's worth, Reviewed-by: Jonathan Nieder [...] > To remain backwards compatible, we cannot split on whitespace by > default, hence we will ship 1.8.4 with the commit reverted. [...] > It mi

Re: How to hierarchically merge from the root to the leaf of a branch tree? (Patch stack management)

2013-08-02 Thread Jens Müller
Am 02.08.2013 06:33, schrieb Jens Müller: > Am 01.08.2013 09:28, schrieb Jakub Narebski: >> > There is also TopGit, which is feature-branch management tools (which >> > seems like what you want, from what you written below). > Indeed, thank you very much for pointing me to it. I have not read the >

[PATCH] Documentation/rev-list-options: add missing word in --*-parents

2013-08-02 Thread Torstein Hegge
A commit has "parent commits" or "parents", not "commits". Signed-off-by: Torstein Hegge --- Documentation/rev-list-options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 27f8de3..5bdfb42 1006

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Junio C Hamano
Jeff King writes: > On Fri, Aug 02, 2013 at 09:41:52AM -0700, Junio C Hamano wrote: > >> > Of the two, I think the latter is more sensible; the former is >> > unnecessarily placing the burden on the user to match "--split" with >> > their use of "%(rest)". The second is pointless without the firs

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Jeff King
On Fri, Aug 02, 2013 at 09:41:52AM -0700, Junio C Hamano wrote: > > Of the two, I think the latter is more sensible; the former is > > unnecessarily placing the burden on the user to match "--split" with > > their use of "%(rest)". The second is pointless without the first. > > > > A patch to impl

Re: [PATCH v3] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-08-02 Thread Brandon Casey
On Fri, Aug 2, 2013 at 9:26 AM, Junio C Hamano wrote: > Brandon Casey writes: > >> +/* >> + * The LRU pack is the one with the oldest MRU window, preferring packs >> + * with no used windows, or the oldest mtime if it has no windows allocated. >> + */ >> +static void find_lru_pack(struct packed_g

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Junio C Hamano
Jeff King writes: > On Fri, Aug 02, 2013 at 03:54:02AM -0700, Jeff King wrote: > >> We need to revert that commit before the release. It can either be >> replaced with: >> >> 1. A "--split" (or similar) option to use the behavior only when >> desired. >> >> 2. Enabling splitting only w

Re: Rewriting git-repack.sh in C

2013-08-02 Thread Duy Nguyen
On Fri, Aug 02, 2013 at 09:10:59PM +0700, Duy Nguyen wrote: > On Fri, Aug 2, 2013 at 8:48 PM, Stefan Beller > wrote: > > Hello, > > > > I'd like to rewrite the repack shell script in C. > > So I tried the naive approach reading the man page and > > the script itself and write C program by matching

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Junio C Hamano
Jeff King writes: > We need to revert that commit before the release. It can either be > replaced with: > > 1. A "--split" (or similar) option to use the behavior only when > desired. > > 2. Enabling splitting only when %(rest) is used in the output format. > > And I suppose it is too la

Re: [PATCH v3] sha1_file: introduce close_one_pack() to close packs on fd pressure

2013-08-02 Thread Junio C Hamano
Brandon Casey writes: > +/* > + * The LRU pack is the one with the oldest MRU window, preferring packs > + * with no used windows, or the oldest mtime if it has no windows allocated. > + */ > +static void find_lru_pack(struct packed_git *p, struct packed_git **lru_p, > struct pack_window **mru_w

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Brandon Casey
On Fri, Aug 2, 2013 at 8:27 AM, Joey Hess wrote: > Jeff King wrote: >> By the way, Joey, I am not sure how safe "git cat-file --batch-check" is >> for arbitrary filenames. In particular, I don't know how it would react >> to a filename with an embedded newline (and I do not think it will undo >> q

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Joey Hess
Jeff King wrote: > By the way, Joey, I am not sure how safe "git cat-file --batch-check" is > for arbitrary filenames. In particular, I don't know how it would react > to a filename with an embedded newline (and I do not think it will undo > quoting). Certainly that does not excuse this regression;

Re: [PATCH v2] Provide some linguistic guidance for the documentation.

2013-08-02 Thread Marc Branchaud
On 13-08-02 02:25 AM, Jonathan Nieder wrote: Junio C Hamano wrote: Is that accurate? My impression has been: The documentation liberally mixes US and UK English (en_US/UK) norms for spelling and grammar, which is somewhat unfortunate. In an ideal world, it would have been bette

Re: Rewriting git-repack.sh in C

2013-08-02 Thread Duy Nguyen
On Fri, Aug 2, 2013 at 8:48 PM, Stefan Beller wrote: > Hello, > > I'd like to rewrite the repack shell script in C. > So I tried the naive approach reading the man page and > the script itself and write C program by matching each block/line > of the script with a function in C > > Now I stumble up

Rewriting git-repack.sh in C

2013-08-02 Thread Stefan Beller
Hello, I'd like to rewrite the repack shell script in C. So I tried the naive approach reading the man page and the script itself and write C program by matching each block/line of the script with a function in C Now I stumble upon other git commands (git pack-objects). What's the best way to a

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Jeff King
On Fri, Aug 02, 2013 at 03:54:02AM -0700, Jeff King wrote: > We need to revert that commit before the release. It can either be > replaced with: > > 1. A "--split" (or similar) option to use the behavior only when > desired. > > 2. Enabling splitting only when %(rest) is used in the out

Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

2013-08-02 Thread Jeff King
On Thu, Aug 01, 2013 at 11:40:03PM -0700, Jonathan Nieder wrote: > > Commit c334b87b30c1464a1ab563fe1fb8de5eaf0e5bac caused a reversion in > > git-cat-file --batch. > > > > With an older version: > > > > joey@gnu:~/tmp/rrr>git cat-file --batch > > :file name > > e69de29bb2d1d6434b8b29ae775ad8c2e48

Re: [PATCH 04/13] contrib/subtree: Fix Synopsis

2013-08-02 Thread Andreas Schwab
"David A. Greene" writes: > diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh > index 771f39d..8a23f58 100755 > --- a/contrib/subtree/git-subtree.sh > +++ b/contrib/subtree/git-subtree.sh > @@ -9,6 +9,7 @@ if [ $# -eq 0 ]; then > fi > OPTS_SPEC="\ > git subtree add

Re: [PATCH 03/13] contrib/subtree: Better Error Handling for add

2013-08-02 Thread Andreas Schwab
"David A. Greene" writes: > elif [ $# -eq 2 ]; then > - "cmd_add_repository" "$@" > + git rev-parse -q --verify "$2^{commit}" >/dev/null || > + die "'$2' does not refer to a commit" That doesn't make any sense. $2 is a commit in a remote repository which hasn't