Re: [Request] Git export with hardlinks

2013-02-10 Thread Thomas Koch
Jeff King: [...] So a full checkout is 24M. For the next deploy, we'll start by asking cp to duplicate the old, using hard links: Hi Jeff, thank you very much for your idea! It's good and simple. It just breaks down for the case when a large folder got renamed. But I already hacked the

Re: inotify to minimize stat() calls

2013-02-10 Thread Duy Nguyen
On Sun, Feb 10, 2013 at 12:24:58PM +0700, Duy Nguyen wrote: On Sun, Feb 10, 2013 at 12:10 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Finn notes in the commit message that it offers no speedup, because .gitignore files in every directory still have to be read. I think this is

Re: inotify to minimize stat() calls

2013-02-10 Thread Duy Nguyen
On Sun, Feb 10, 2013 at 06:17:32PM +0700, Duy Nguyen wrote: The following patch eliminates untracked search code. As we can see, open+getdents also disappears with this patch: 0.462909 40950 lstat 0.462909 40950 lstat 0.003417 129 brk 0.003417 129 brk 0.000762 53 read 0.000762

Re: Feature request: Allow extracting revisions into directories

2013-02-10 Thread Thomas Koch
Robert Clausecker: I have a server that hosts a bare git repository. This git repository contains a branch production. Whenever somebody pushes to production a hook automatically puts a copy of the current production branch into /var/www/foo. I could of course use pull for that but it just

[PATCH] fixup! graph: output padding for merge subsequent parents

2013-02-10 Thread John Keeping
--- On Sat, Feb 09, 2013 at 03:39:33PM -0800, Junio C Hamano wrote: * jk/diff-graph-cleanup (2013-02-07) 6 commits - combine-diff.c: teach combined diffs about line prefix - diff.c: use diff_line_prefix() where applicable - diff: add diff_line_prefix function - diff.c: make constant

Re: inotify to minimize stat() calls

2013-02-10 Thread demerphq
On 10 February 2013 12:17, Duy Nguyen pclo...@gmail.com wrote: Bear in mind though this is Linux, where lstat is fast. On systems with slow lstat, these timings could look very different due to the large number of lstat calls compared to open+getdents. I really like to see similar numbers on

[PATCH v2 03/15] user-manual: Use 'remote add' to setup push URLs

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us There is no need to use here documents to setup this configuration. It is easier, less confusing, and more robust to use Git's configuration tools directly. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 17

[PATCH v2 14/15] user-manual: Flesh out uncommitted changes and submodule updates

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us If you try and update a submodule with a dirty working directory, you get an error message like: $ git submodule update error: Your local changes to the following files would be overwritten by checkout: ... Please, commit your changes or stash them

[PATCH v2 00/15] User manual updates

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us This combines my ealier patches: * user-manual: Rewrite git-gc section for automatic packing * user-manual: Update for receive.denyCurrentBranch=refuse With a number of additional fixups. Changes since v1: * user-manual: Rewrite git-gc section for

[PATCH v2 06/15] user-manual: Give 'git push -f' as an alternative to +master

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us This mirrors existing language in the description of 'git fetch'. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/user-manual.txt

[PATCH v2 12/15] user-manual: Use request-pull to generate please pull text

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us Less work and more error checking (e.g. does a merge base exist?). Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Documentation/user-manual.txt

[PATCH v2 09/15] user-manual: Use 'git config --global user.*' for setup

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us A simple command line call is easier than spawning an editor, especially for folks new to ideas like the command line and text editors. This is also the approach suggested by 'git commit' if you try and commit without having configured user.name or

[PATCH v2 04/15] user-manual: Use git branch --merged

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us Use 'git branch --merged origin'. This feature was introduced by 049716b (branch --merged/--no-merged: allow specifying arbitrary commit, 2008-07-08), after the documentation that's being replaced moved into the manual with 9e2163ea (user-manual: move

[PATCH v2 10/15] user-manual: Fix 'both: so' - 'both; so' typo

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us The clause so `git log ...` will return no commits... is independent, not a description of both, so a semicolon is more appropriate. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 01/15] user-manual: Rewrite git-gc section for automatic packing

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us This should have happened back in 2007, when `git gc` learned about auto (e9831e8, git-gc --auto: add documentation, 2007-09-17). Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 16 +--- 1 file changed, 5

[PATCH v2 13/15] user-manual: Fix 'you - Git' - 'you--Git' typo

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us Use an em-dash, not a hyphen, to join these clauses. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/user-manual.txt

[PATCH v2 15/15] user-manual: Use --format=tar.gz to create a gzipped tarball

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us This functionality was introduced by 0e804e09 (archive: provide builtin .tar.gz filter, 2011-07-21) for v1.7.7. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

[PATCH v2 07/15] user-manual: Mention 'git remote add' for remote branch config

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us I hardly ever setup remote.name.url using 'git config'. While it may be instructive to do so, we should also point out 'git remote add'. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 17 - 1 file

[PATCH v2 05/15] user-manual: Add a few references to 'git rebase -i'

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us I think this interface is much more convenient than extended cherry picking or using 'git format-patch'. Inserting a number of references should raise awareness among new users. The previously discussed methods (cherry picking and format-patch-ing) are

[PATCH v2 02/15] user-manual: Update for receive.denyCurrentBranch=refuse

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us acd2a45 (Refuse updating the current branch in a non-bare repository via push, 2009-02-11) changed the default to refuse such a push, but it forgot to update the docs. 7d182f5 (Documentation: receive.denyCurrentBranch defaults to 'refuse', 2010-03-17)

[PATCH v2 08/15] user-manual: Standardize backtick quoting

2013-02-10 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us I tried to always use backticks for: * Paths and filenames (e.g. `.git/config`) * Compound refs (e.g. `origin/HEAD`) * Git commands (e.g. `git log`) * Command arguments (e.g. `--pretty`) * URLs (e.g. `git://`), as a subset of command arguments * Special

Re: [PATCH v2 08/15] user-manual: Standardize backtick quoting

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 10:10:34AM -0500, W. Trevor King wrote: @@ -4155,8 +4156,9 @@ As a result, the general consistency of an object can always be tested independently of the contents or the type of the object: all objects can be validated by verifying that (a) their hashes match the

Re: inotify to minimize stat() calls

2013-02-10 Thread Duy Nguyen
On Sun, Feb 10, 2013 at 8:26 PM, demerphq demer...@gmail.com wrote: On 10 February 2013 12:17, Duy Nguyen pclo...@gmail.com wrote: Bear in mind though this is Linux, where lstat is fast. On systems with slow lstat, these timings could look very different due to the large number of lstat calls

Re: [RFC/PATCH] Introduce branch.name.pushremote

2013-02-10 Thread Ramkumar Ramachandra
Junio C Hamano wrote: struct bp { const char *branch; const char *remotename; }; static int pushremote(const char *var, const char *val, void *cb) { struct bp *bp = cb; const char *name, *key; int namelen;

Re: inotify to minimize stat() calls

2013-02-10 Thread Ramkumar Ramachandra
On Sun, Feb 10, 2013 at 4:47 PM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Feb 10, 2013 at 12:24:58PM +0700, Duy Nguyen wrote: On Sun, Feb 10, 2013 at 12:10 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Finn notes in the commit message that it offers no speedup, because .gitignore

Re: inotify to minimize stat() calls

2013-02-10 Thread Erik Faye-Lund
On Sun, Feb 10, 2013 at 12:17 PM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Feb 10, 2013 at 12:24:58PM +0700, Duy Nguyen wrote: On Sun, Feb 10, 2013 at 12:10 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Finn notes in the commit message that it offers no speedup, because .gitignore

Re: inotify to minimize stat() calls

2013-02-10 Thread Robert Zeh
On Sat, Feb 9, 2013 at 1:35 PM, Junio C Hamano gits...@pobox.com wrote: Ramkumar Ramachandra artag...@gmail.com writes: This is much better than Junio's suggestion to study possible implementations on all platforms and designing a generic daemon/ communication channel. That's no weekend

Re: inotify to minimize stat() calls

2013-02-10 Thread Martin Fick
On Sunday, February 10, 2013 12:03:00 pm Robert Zeh wrote: On Sat, Feb 9, 2013 at 1:35 PM, Junio C Hamano gits...@pobox.com wrote: Ramkumar Ramachandra artag...@gmail.com writes: This is much better than Junio's suggestion to study possible implementations on all platforms and designing

Re: `git checkout --orpan` leaves a dirty worktree

2013-02-10 Thread Jens Lehmann
Am 08.02.2013 21:17, schrieb Junio C Hamano: Ramkumar Ramachandra artag...@gmail.com writes: BTW, Is there a better way to clean out the worktree than `git rm -rf .`, since that fails for submodules? The impulsive `reset --hard` obviously fails because there is no HEAD. I _think_ the git

Re: inotify to minimize stat() calls

2013-02-10 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Sun, Feb 10, 2013 at 06:17:32PM +0700, Duy Nguyen wrote: The following patch eliminates untracked search code. As we can see, open+getdents also disappears with this patch: 0.462909 40950 lstat 0.462909 40950 lstat 0.003417 129 brk 0.003417

Re: inotify to minimize stat() calls

2013-02-10 Thread Robert Zeh
On Feb 10, 2013, at 1:26 PM, Martin Fick mf...@codeaurora.org wrote: On Sunday, February 10, 2013 12:03:00 pm Robert Zeh wrote: On Sat, Feb 9, 2013 at 1:35 PM, Junio C Hamano gits...@pobox.com wrote: Ramkumar Ramachandra artag...@gmail.com writes: This is much better than Junio's

Re: [PATCH] fixup! graph: output padding for merge subsequent parents

2013-02-10 Thread John Keeping
On Sun, Feb 10, 2013 at 11:30:39AM -0800, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: Can you squash this into the first commit before you do? Matthieu is correct that the graph_is_commit_finished() check isn't needed in the loop now that we've pulled it out to be

Re: [PATCH v2 02/15] user-manual: Update for receive.denyCurrentBranch=refuse

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us acd2a45 (Refuse updating the current branch in a non-bare repository via push, 2009-02-11) changed the default to refuse such a push, but it forgot to update the docs. 7d182f5 (Documentation:

Re: Git prompt

2013-02-10 Thread Jonathan Nieder
Ethan Reesor wrote: I have a git user set up on my server. It's prompt is set to git-prompt and it's git-shell-commands is empty. [...] How do I make the git user work like github where, upon attempting to get a prompt, the connection is closed? I assume you mean that the user's login shell

Re: [PATCH v2 03/15] user-manual: Use 'remote add' to setup push URLs

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us There is no need to use here documents to setup this configuration. It is easier, less confusing, and more robust to use Git's configuration tools directly. Signed-off-by: W. Trevor King wk...@tremily.us ---

Re: [PATCH v2 04/15] user-manual: Use git branch --merged

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us Use 'git branch --merged origin'. This feature was introduced by 049716b (branch --merged/--no-merged: allow specifying arbitrary commit, 2008-07-08), after the documentation that's being replaced moved into the

Re: [PATCH v2 05/15] user-manual: Add a few references to 'git rebase -i'

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us I think this interface is much more convenient than extended cherry picking or using 'git format-patch'. Inserting a number of references should raise awareness among new users. The previously discussed methods

Re: [PATCH v2 03/15] user-manual: Use 'remote add' to setup push URLs

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 01:33:31PM -0800, Junio C Hamano wrote: Look at how Fetching branches from other repositories is done. It shows the use of remote add and then shows the result by running cat to show the contents. I think that organization is much nicer than completely hiding how

Re: [PATCH v2 04/15] user-manual: Use git branch --merged

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 01:37:01PM -0800, Junio C Hamano wrote: This is making things much less useful. branch --merged origin will show 47 different branches that you are *not* interested in the flow of examples in this part of the tutorial. Also, log origin..branchname allows you to

Re: [PATCH v2 05/15] user-manual: Add a few references to 'git rebase -i'

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 01:53:45PM -0800, Junio C Hamano wrote: This change is very good (modulo the extra blank line at the end). Oops. Will remove from v3. Alternatively, we can explain only the amending of the tip commit in this section, removing everything else; I think that is probably

Re: [PATCH v2 06/15] user-manual: Give 'git push -f' as an alternative to +master

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us This mirrors existing language in the description of 'git fetch'. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [PATCH v2 06/15] user-manual: Give 'git push -f' as an alternative to +master

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 02:00:50PM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: +Note the addition of the `+` sign. Alternatively, you can use the +`-f` flag to force the remote update, as in: + +- +$ git push -f

Re: [PATCH v2 07/15] user-manual: Mention 'git remote add' for remote branch config

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index a68d6b9..424cdd6 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -2909,8 +2909,23 @@ Also note that all of the above configuration can be

Re: [PATCH v2 03/15] user-manual: Use 'remote add' to setup push URLs

2013-02-10 Thread Jonathan Nieder
W. Trevor King wrote: On Sun, Feb 10, 2013 at 01:33:31PM -0800, Junio C Hamano wrote: The resulting text may read like so: … I'm fine with this too, but if this is the suggested route, why bother with `git config` at all? Is it just for ease of scripting? Yes. It can also be helpful when

Re: [PATCH v2 07/15] user-manual: Mention 'git remote add' for remote branch config

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index a68d6b9..424cdd6 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -2909,8 +2909,23 @@ Also note that all of the above configuration can be

Re: [PATCH v2 09/15] user-manual: Use 'git config --global user.*' for setup

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us A simple command line call is easier than spawning an editor, especially for folks new to ideas like the command line and text editors. This is also the approach suggested by 'git commit' if you try and commit

Re: [PATCH v2 03/15] user-manual: Use 'remote add' to setup push URLs

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 02:08:48PM -0800, Jonathan Nieder wrote: For everyday interactive configuration editing, config files have some good advantages: - The settings are easy to read, well organized, and all in one place - The file can include comments. I'm convinced, although the

Re: [PATCH v2 12/15] user-manual: Use request-pull to generate please pull text

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us Less work and more error checking (e.g. does a merge base exist?). Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/user-manual.txt | 11 --- 1 file changed, 4 insertions(+), 7

Re: [PATCH v2 09/15] user-manual: Use 'git config --global user.*' for setup

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 02:12:05PM -0800, Junio C Hamano wrote: +Which will add the following stanza to a file named `.gitconfig` in +your home directory: Looks good, even though I do not think we would want/need to confuse the readers with an unfamiliar word stanza. Aw. I suppose

Re: [PATCH v2 15/15] user-manual: Use --format=tar.gz to create a gzipped tarball

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us This functionality was introduced by 0e804e09 (archive: provide builtin .tar.gz filter, 2011-07-21) for v1.7.7. Signed-off-by: W. Trevor King wk...@tremily.us --- This is a meh at least to me. Unless it uses

Re: [PATCH v2 12/15] user-manual: Use request-pull to generate please pull text

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 02:23:48PM -0800, Junio C Hamano wrote: The request-pull checks a lot more than does a merge base exist?, no? It does, but the man page doesn't list the checks, and I didn't want to read through the source to find them all ;). Maybe I should, and then update the man

Re: [PATCH v2 00/15] User manual updates

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us This combines my ealier patches: * user-manual: Rewrite git-gc section for automatic packing * user-manual: Update for receive.denyCurrentBranch=refuse With a number of additional fixups. Changes since v1: *

Re: [PATCH v2 15/15] user-manual: Use --format=tar.gz to create a gzipped tarball

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 02:27:08PM -0800, Junio C Hamano wrote: This is a meh at least to me. Unless it uses something like git archive -o latest.tar.gz --prefix=project/ HEAD it is not all that interesting. Great suggestion. My original goal was to remove the pipe, but if

Re: [PATCH v2 02/15] user-manual: Update for receive.denyCurrentBranch=refuse

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: On Sun, Feb 10, 2013 at 01:24:47PM -0800, Junio C Hamano wrote: I would not be surprised if some readers felt as if then why not update it instead of rejecting? were a valid question, without a bit more explanation. You can also push to a

Re: [PATCH] fixup! graph: output padding for merge subsequent parents

2013-02-10 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Sun, Feb 10, 2013 at 11:30:39AM -0800, Junio C Hamano wrote: ... Is it correct to say that this essentially re-does 656197ad3805 (graph.c: infinite loop in git whatchanged --graph -m, 2009-07-25) in a slightly different way, in that Michał's

Re: Git prompt

2013-02-10 Thread Jeff King
On Sun, Feb 10, 2013 at 01:25:38PM -0800, Jonathan Nieder wrote: Ethan Reesor wrote: I have a git user set up on my server. It's prompt is set to git-prompt and it's git-shell-commands is empty. [...] How do I make the git user work like github where, upon attempting to get a prompt,

Re: [PATCH v2 03/15] user-manual: Use 'remote add' to setup push URLs

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: On Sun, Feb 10, 2013 at 01:33:31PM -0800, Junio C Hamano wrote: Look at how Fetching branches from other repositories is done. It shows the use of remote add and then shows the result by running cat to show the contents. I think that organization is

Re: [PATCH v2 09/15] user-manual: Use 'git config --global user.*' for setup

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: On Sun, Feb 10, 2013 at 02:12:05PM -0800, Junio C Hamano wrote: +Which will add the following stanza to a file named `.gitconfig` in +your home directory: Looks good, even though I do not think we would want/need to confuse the readers with an

Re: [PATCH v2 15/15] user-manual: Use --format=tar.gz to create a gzipped tarball

2013-02-10 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: On Sun, Feb 10, 2013 at 02:27:08PM -0800, Junio C Hamano wrote: This is a meh at least to me. Unless it uses something like git archive -o latest.tar.gz --prefix=project/ HEAD it is not all that interesting. Great suggestion. My

Re: [PATCH v2 06/15] user-manual: Give 'git push -f' as an alternative to +master

2013-02-10 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: +Note the addition of the `+` sign. Alternatively, you can use the +`-f` flag to force the remote update, as in: + +- +$ git push -f ssh://yourserver.com/~you/proj.git master

Re: [PATCH v2 07/15] user-manual: Mention 'git remote add' for remote branch config

2013-02-10 Thread W. Trevor King
On Sun, Feb 10, 2013 at 02:09:50PM -0800, Junio C Hamano wrote: I'd suggest rewriting everything after If there are other repositories that you also use frequently,... of this section. Replace the first example after for example, after that uses config remote.example.url with the new text in

Re: [PATCH v3 06/11] sequencer.c: always separate (cherry picked from from commit body

2013-02-10 Thread Brandon Casey
On Sun, Jan 27, 2013 at 6:34 PM, Jonathan Nieder jrnie...@gmail.com wrote: Brandon Casey wrote: --- a/sequencer.c +++ b/sequencer.c @@ -497,6 +558,8 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts) } if (opts-record_origin) { +

Re: [PATCH v3 07/11] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-02-10 Thread Brandon Casey
On Sun, Jan 27, 2013 at 7:14 PM, Jonathan Nieder jrnie...@gmail.com wrote: Brandon Casey wrote: --- a/sequencer.c +++ b/sequencer.c [...] @@ -1096,10 +1117,16 @@ void append_signoff(struct strbuf *msgbuf, int ignore_footer) strbuf_addch(sob, '\n'); for (i = msgbuf-len - 1 -

Re: [PATCH v3 11/11] Unify appending signoff in format-patch, commit and sequencer

2013-02-10 Thread Brandon Casey
On Sun, Jan 27, 2013 at 7:39 PM, Jonathan Nieder jrnie...@gmail.com wrote: Brandon Casey wrote: --- a/log-tree.c +++ b/log-tree.c [...] @@ -208,94 +207,6 @@ void show_decorations(struct rev_info *opt, struct commit *commit) putchar(')'); } -/* - * Search for ^[-A-Za-z]+: [^@]+@

Re: Git prompt

2013-02-10 Thread Sitaram Chamarty
On Mon, Feb 11, 2013 at 4:24 AM, Junio C Hamano gits...@pobox.com wrote: Jeff King p...@peff.net writes: On Sun, Feb 10, 2013 at 01:25:38PM -0800, Jonathan Nieder wrote: Ethan Reesor wrote: I have a git user set up on my server. It's prompt is set to git-prompt and it's

[RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
If I disable git-shell's interactive mode by removing the ~/git-shell-commands directory, then attempts to use 'ssh' with the git account interactively produce an error message intended for the administrator: $ ssh git@myserver fatal: Interactive git shell is not enabled.

Re: inotify to minimize stat() calls

2013-02-10 Thread Duy Nguyen
On Mon, Feb 11, 2013 at 3:16 AM, Junio C Hamano gits...@pobox.com wrote: The other lstat() experiment was a very interesting one, but this is not yet an interesting experiment to see where in the ignore codepath we are spending times. We know that we can tell wt_status_collect_untracked() not

Re: inotify to minimize stat() calls

2013-02-10 Thread Duy Nguyen
On Sun, Feb 10, 2013 at 11:45 PM, Ramkumar Ramachandra artag...@gmail.com wrote: So you're skipping the rest of refresh_cache_ent(), which contains our lstat() and returning immediately. Instead of marking paths with the assume unchanged bit, as core.ignoreStat does, you're directly attacking

Re: inotify to minimize stat() calls

2013-02-10 Thread Duy Nguyen
On Mon, Feb 11, 2013 at 2:03 AM, Robert Zeh robert.allan@gmail.com wrote: On Sat, Feb 9, 2013 at 1:35 PM, Junio C Hamano gits...@pobox.com wrote: Ramkumar Ramachandra artag...@gmail.com writes: This is much better than Junio's suggestion to study possible implementations on all platforms

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: How about this? A patch on top could change the default git-shell-commands is not present message if that seems worthwhile. Hmph. I wonder if rewording the message when git-shell-commmands directory is not there may be a better first step (which

Re: inotify to minimize stat() calls

2013-02-10 Thread Duy Nguyen
On Sun, Feb 10, 2013 at 11:58 PM, Erik Faye-Lund kusmab...@gmail.com wrote: Karsten Blees has done something similar-ish on Windows, and he posted the results here: https://groups.google.com/forum/#!topic/msysgit/fL_jykUmUNE/discussion I also seem to remember he doing a ReadDirectoryChangesW

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jeff King
On Sun, Feb 10, 2013 at 05:20:16PM -0800, Jonathan Nieder wrote: This of course now means that the ~/git-shell-commands should not be empty, since that is where this default command also will be present. How about this? I like the general direction this is going, but: +When run

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Jeff King wrote: On Sun, Feb 10, 2013 at 05:20:16PM -0800, Jonathan Nieder wrote: +When run interactively (with no arguments), 'git-shell' will +automatically run `~/git-shell-commands/help` on startup, provided it +exists. If the 'help' command fails then the interactive shell is +aborted.

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: How about this? A patch on top could change the default git-shell-commands is not present message if that seems worthwhile. Hmph. I wonder if rewording the message when git-shell-commmands directory is not there may be a

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Jeff King wrote: On Sun, Feb 10, 2013 at 08:14:04PM -0800, Jonathan Nieder wrote: Only interactive connections. That's the existing behavior. Ah, sorry. I misread the patch. I see now that we already run help, and this is just making the exit value significant. In that case, yeah, I think

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: How about this? A patch on top could change the default git-shell-commands is not present message if that seems worthwhile. Hmph. I wonder if rewording the message when

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Junio C Hamano wrote: Are you shooting for customizability? Yes, and the ability to generate the message dynamically. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jeff King
On Sun, Feb 10, 2013 at 08:26:09PM -0800, Jonathan Nieder wrote: Jeff King wrote: On Sun, Feb 10, 2013 at 08:14:04PM -0800, Jonathan Nieder wrote: Only interactive connections. That's the existing behavior. Ah, sorry. I misread the patch. I see now that we already run help, and this

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jeff King
On Sun, Feb 10, 2013 at 08:32:47PM -0800, Jonathan Nieder wrote: Junio C Hamano wrote: Are you shooting for customizability? Yes, and the ability to generate the message dynamically. As far as the default goes, I think the current one is OK, provided there is an option to

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jeff King
On Sun, Feb 10, 2013 at 05:20:16PM -0800, Jonathan Nieder wrote: diff --git a/shell.c b/shell.c index 84b237fe..3abc2b84 100644 --- a/shell.c +++ b/shell.c @@ -63,10 +63,16 @@ static void cd_to_homedir(void) static void run_shell(void) { - int done = 0; + int done = 0,

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Are you shooting for customizability? Yes, and the ability to generate the message dynamically. Hmph, if that is the case, wouldn't it be a better direction to give a better help for majority of the case where

[PATCH 0/2 v2] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Jeff King wrote: I think what threw me off was reading the documentation part of the patch, which adds a note that we run help on startup, and then elaborates on the exit value. I didn't realize that the first half was documenting what already happened. Tweaking the third paragraph of the

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Ethan Reesor
On Mon, Feb 11, 2013 at 12:22 AM, Junio C Hamano gits...@pobox.com wrote: Hmph, if that is the case, wouldn't it be a better direction to give a better help for majority of the case where git-shell is used as the login shell to allow push and fetch but not for interactive access at all? The

[PATCH 1/2] shell doc: emphasize purpose and security model

2013-02-10 Thread Jonathan Nieder
The original git-shell(1) manpage emphasized that the shell supports only git transport commands, and as the shell gained features that emphasis and focus in the manual has been lost. Bring it back by splitting the manpage into a few short sections and fleshing out each: - SYNOPSIS, describing

[PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-10 Thread Jonathan Nieder
If I disable git-shell's interactive mode by removing the ~/git-shell-commands directory, then attempts to use 'ssh' with the git account interactively produce an error message intended for the administrator: $ ssh git@myserver fatal: Interactive git shell is not enabled.

Re: [PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-10 Thread Ethan Reesor
I feel like the suggestion I posted in response to Junio C Hamano gits...@pobox.com's complaint on the RFC for this patch provides a more elegant solution to the problem of administrators wanting to prevent interactive sessions for users with their login shell set to git-prompt. The suggestion was

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Ethan Reesor
I noticed a typo I made. I meant `git-config` rather than `git-commit`. Sorry for my mistake. On Mon, Feb 11, 2013 at 12:57 AM, Ethan Reesor firelizz...@gmail.com wrote: On Mon, Feb 11, 2013 at 12:22 AM, Junio C Hamano gits...@pobox.com wrote: Hmph, if that is the case, wouldn't it be a better

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Ethan Reesor wrote: That way, there's a default setting, there can be a system-wide message, there can be a user specific message, and those messages can be set via `git-commit`. That won't let me imitate gitolite's behavior without a lot of config file churn:

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Ethan Reesor
Why not have both? That way there is a way to get a customizable response that avoids Junio's complaints and there is a way to do what you are trying to achieve. On Mon, Feb 11, 2013 at 1:09 AM, Jonathan Nieder jrnie...@gmail.com wrote: Ethan Reesor wrote: That way,

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Are you shooting for customizability? Yes, and the ability to generate the message dynamically. Hmph, if that is the case, wouldn't it be a better direction to give a better help for

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
[administrivia: please don't top-post] Ethan Reesor wrote: Why not have both? That way there is a way to get a customizable response that avoids Junio's complaints and there is a way to do what you are trying to achieve. What was Junio's complaint? Jonathan -- To unsubscribe from this list:

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Are you shooting for customizability? Yes, and the ability to generate the message dynamically. Hmph, if that is the case, wouldn't it be a

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: The trouble is that I can't imagine a canned message that everyone will like. (For example, I quite dislike the current one.) That's exactly the situation in which some configurability is helpful. I am not saying we should

Re: [PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: diff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt index 4fe93203..60051e63 100644 --- a/Documentation/git-shell.txt +++ b/Documentation/git-shell.txt @@ -59,6 +59,26 @@ users to list repositories they have access to, create,

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Isn't that a criticism of the git-shell-commands facility in general? If it is common to have a lot of users with distinct home directories but all with git-shell as their login shell, then the git-shell-commands should not go in their home directory

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Ethan Reesor
On Mon, Feb 11, 2013 at 2:12 AM, Jonathan Nieder jrnie...@gmail.com wrote: Isn't that a criticism of the git-shell-commands facility in general? If it is common to have a lot of users with distinct home directories but all with git-shell as their login shell, then the git-shell-commands should

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Junio C Hamano
Ethan Reesor firelizz...@gmail.com writes: For those who _do_ want to give customized commands to their users, they can already have help script to give a friendly message. It just felt silly to force sites to create the directory only to refuse an access to the custom commands feature,

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Ethan Reesor
On Mon, Feb 11, 2013 at 2:22 AM, Junio C Hamano gits...@pobox.com wrote: Ethan Reesor firelizz...@gmail.com writes: Again, would it not be more elegant and powerful to A) have the shell-disabled message/hook/etc specified by git-config on some level, be it /etc/gitconfig or ~/.gitconfig, and

Re: [RFC/PATCH] shell: allow 'help' command to disable interactive shell

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Isn't that a criticism of the git-shell-commands facility in general? If it is common to have a lot of users with distinct home directories but all with git-shell as their login

Re: Pushing a git repository to a new server

2013-02-10 Thread Konstantin Khomoutov
On Sun, Feb 10, 2013 at 04:00:56PM -0500, Ethan Reesor wrote: I'm looking to make a command to push a git repo to a new server. The way I just did it is as follows: localhost git clone --bare /path/to/MyRepo /path/to/tmpdir/MyRepo.git localhost tar xz /path/to/tmpdir/MyRepo.git | ssh

  1   2   >