Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 Dec 2014, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Johannes Schindelin johannes.schinde...@gmx.de writes: +static const char *update_worktree(unsigned char *sha1) +{ +... + const char *work_tree = git_work_tree_cfg ? git_work_tree_cfg :

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 Dec 2014, Junio C Hamano wrote: When receive.denyCurrentBranch is set to updateInstead, this hook can be used to override the built-in push-to-deploy logic, which insists that the working tree and the index must be unchanged relative to HEAD. The hook receives the commit

Re: [PATCH] introduce git root

2014-12-02 Thread Christian Couder
On Tue, Dec 2, 2014 at 8:04 AM, Jeff King p...@peff.net wrote: On Mon, Dec 01, 2014 at 05:17:22AM +0100, Christian Couder wrote: On Mon, Dec 1, 2014 at 4:04 AM, Junio C Hamano gits...@pobox.com wrote: If I were redoing this today, I would probably nominate the git potty as such a kitchen

Re: [BUG] Documentation: git log: --exit-code undocumented?

2014-12-02 Thread Sergey Organov
Junio C Hamano gits...@pobox.com writes: David Kastrup d...@gnu.org writes: I disagree that --exit-code does nothing: it indicates whether the listed log is empty. So for example git log -1 --exit-code a..b /dev/null can be used to figure out whether a is a proper ancestor of b or not.

Re: [PATCH 00/19] Add git-list-files

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 3:02 AM, Junio C Hamano gits...@pobox.com wrote: Does this contain a lot of borrowed code or something? The style violation in the patches are unusually high, even compared with your other series. The first one is from coreutils, but I reformatted (and trimmed) to fit

Re: [PATCH 00/19] Add git-list-files

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 12:42 PM, Jeff King p...@peff.net wrote: On Sun, Nov 30, 2014 at 03:55:48PM +0700, Nguyễn Thái Ngọc Duy wrote: This is something else that's been sitting in my tree for a while now. It adds git list-files, intended to be aliased as ls with your favourite display

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 12:39 AM, Junio C Hamano gits...@pobox.com wrote: Sorry, what is a hic? Off topic. It's the sound (in Vietnamese) when you inhale through your nose, e.g. like when you cry.. I know there's an equivalent in English, just can't remember it now. -- Duy -- To unsubscribe from

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 12:04 PM, Mark Levedahl mleved...@gmail.com wrote: On 12/01/2014 12:39 PM, Junio C Hamano wrote: Sorry, what is a hic? If this were an existing feature like git-new-workdir, even though it is from contrib, making it impossible to do something that used to be possible,

Re: [PATCH 09/19] Add git-list-files, a user friendly version of ls-files and more

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 9:50 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sunday, November 30, 2014, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This is more user friendly version of ls-files: * it's automatically colored and columnized * it refreshes the index like all porcelain

Re: [PATCH 1/3] tree.c: update read_tree_recursive callback to pass strbuf as base

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 2:32 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: This allows the callback to use 'base' as a temporary buffer to quickly assemble full path without extra allocation. The callback has to restore it afterwards of course.

[PATCH v5 0/1] http: Add Accept-Language header if possible

2014-12-02 Thread Yi EungJun
Changes since v4 * Fix styles as Junio C Hamano suggested. * Limit number of languages and length of Accept-Language header. Yi EungJun (1): http: Add Accept-Language header if possible http.c | 154 + remote-curl.c

[PATCH v5 1/1] http: Add Accept-Language header if possible

2014-12-02 Thread Yi EungJun
From: Yi EungJun eungjun...@navercorp.com Add an Accept-Language header which indicates the user's preferred languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. Examples: LANGUAGE= - LANGUAGE=ko:en - Accept-Language: ko, en;q=0.9, *;q=0.1 LANGUAGE=ko LANG=en_US.UTF-8 -

RE: [PATCH] git add -i: allow list (un)selection by regexp

2014-12-02 Thread Aarni Koskela
From 9096652a71666920ae8d59dd4317d536ba974d5b Mon Sep 17 00:00:00 2001 From: Aarni Koskela a...@iki.fi Date: Tue, 2 Dec 2014 13:56:15 +0200 Subject: [PATCH] git-add--interactive: allow list (un)selection by regular expression Teach `list_and_choose` to allow `/regexp` and `-/regexp` syntax to

Re: [PATCH 3/3] ls-tree: disable negative pathspec because it's not supported

2014-12-02 Thread Duy Nguyen
On Tue, Dec 2, 2014 at 2:40 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Hmph, that's sad. Should the below say test_expect_failure without test_must_fail, anticipating a fix later? Not a

Git Bash for Mac

2014-12-02 Thread Nizamuddin Chowdhury
Good Morning, My name is Sefath, and I was wondering when i could start using Git for Mac. I’m completely new to coding, and I wanted to start with HTML. However, when I tried installing git bash on my mac, it doesn’t work. Maybe it isn’t compatible with OS X Yosmite? I would really love to

Re: [BUG] Documentation: git log: --exit-code undocumented?

2014-12-02 Thread John Keeping
On Tue, Dec 02, 2014 at 02:30:31PM +0300, Sergey Organov wrote: Junio C Hamano gits...@pobox.com writes: David Kastrup d...@gnu.org writes: I disagree that --exit-code does nothing: it indicates whether the listed log is empty. So for example git log -1 --exit-code a..b /dev/null

Re: [PATCH 00/19] Add git-list-files

2014-12-02 Thread Michael J Gruber
Jeff King schrieb am 02.12.2014 um 06:42: On Sun, Nov 30, 2014 at 03:55:48PM +0700, Nguyễn Thái Ngọc Duy wrote: This is something else that's been sitting in my tree for a while now. It adds git list-files, intended to be aliased as ls with your favourite display options. When I read the

Re: tests do not work with gpg 2.1

2014-12-02 Thread Michael J Gruber
Jeff King schrieb am 28.11.2014 um 17:50: [updated subject, as this is not specific to the v2.2.0 release at all] On Fri, Nov 28, 2014 at 10:48:51AM +0100, Michael J Gruber wrote: Are you running gnome_keyring_deamon by any chance? It think it runs by default in Gnome, claims to offer

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Michael J Gruber
Johannes Schindelin schrieb am 02.12.2014 um 09:47: Hi Junio, On Mon, 1 Dec 2014, Junio C Hamano wrote: When receive.denyCurrentBranch is set to updateInstead, this hook can be used to override the built-in push-to-deploy logic, which insists that the working tree and the index must be

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Johannes Schindelin
Hi Michael, On Tue, 2 Dec 2014, Michael J Gruber wrote: Johannes Schindelin schrieb am 02.12.2014 um 09:47: The only sad part is that the already huge test suite is enlarged by yet another extensive set of test cases (and those tests might not really need to be that extensive because

[PATCH] t/lib-gpg: adjust permissions for gnupg 2.1

2014-12-02 Thread Michael J Gruber
Before gnupg 2.1 (aka modern branch), gpghome would contain only files which allowed t/lib-gpg.sh to set permissions explicitely, and we did that since 28a1b07 (t/lib-gpg: adjust permissions for gnupg 2.1, 2014-12-02) in order to adjust wrong permissions from a checkout on ro file systems. gnupg

Re: git status / git diff -C not detecting file copy

2014-12-02 Thread Pol Online
Jeff, Thanks much for the detailed answer and analysis. Does either of you want to try your hand at a patch? Just enabling copies should be a one-liner. Making it configurable is more involved, but should also be pretty straightforward. I'll have to pass on this. I'm absolutely not familiar

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: This is because you know receive-pack runs inside the $GIT_DIR, whether it is a bare or non-bare repository, so either core.worktree points at a directory that is otherwise unrelated to the $GIT_DIR (but is the correct $GIT_WORK_TREE), or

Re: RCS Keywords in Git done right

2014-12-02 Thread Derek Moore
I've finished testing this work in larger repositories. While the approach is performant and works nicely in small repos, but in larger repos one of the requirements for the correctness of substitutions slows things down (1 or 2 minutes to perform checkouts between branches with 10,000+ files).

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: In this particular case, I think that we really, really *just* need to verify that the presence of the hook switches off the default behavior of updateInstead. *Nothing* else is needed to verify that this particular functionality hasn't

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Tue, 2 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: In this particular case, I think that we really, really *just* need to verify that the presence of the hook switches off the default behavior of updateInstead. *Nothing* else is

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Tue, 2 Dec 2014, Junio C Hamano wrote: This feature [...] needs to be documented with an entry in the BUGS section, saying that it will not work in a repository that is tied to its working tree via the gitdir: mechanism. Fair enough. But which BUGS section? Should I add one to

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Not really. You need to remember that we write tests not to show off the new shiny, but to protect essential invariants from being broken by careless others attempting to rewrite the implementation in the future. Fair enough. You are

Re: RCS Keywords in Git done right

2014-12-02 Thread Derek Moore
My current approach is: 1) find files common between @ @{-1}, ls-tree --full-tree --name-only -r both branches, take the intersection 2) find current branch's commits for common files, for each file in intersection log -1 --format=%H $current_branch -- $file 3) find common files where

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Tue, 2 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Not really. You need to remember that we write tests not to show off the new shiny, but to protect essential invariants from being broken by careless others attempting to rewrite

Re: [PATCH 2/2] receive-pack: support push-to-checkout hook

2014-12-02 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: ... (i.e. by only lightly testing obscure code paths that will be executed rarely, risking bugs in favor of adding tests when fixing said bugs when – and if – they arise). I'd like to learn a bit more about this part, not because I want

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Johannes Schindelin johannes.schinde...@gmx.de writes: This is because you know receive-pack runs inside the $GIT_DIR, whether it is a bare or non-bare repository, so either core.worktree points at a directory that is otherwise unrelated to the

Re: [PATCH] introduce git root

2014-12-02 Thread Junio C Hamano
Jeff King p...@peff.net writes: There is also git var, which is a catch-all for printing some deduced environmental defaults. I'd be just as happy to see it go away, though. Having: git --exec-path git --toplevel git --author-ident all work would make sense to me (I often get

Re: [PATCH] git add -i: allow list (un)selection by regexp

2014-12-02 Thread Junio C Hamano
Aarni Koskela aarni.kosk...@andersinnovations.com writes: From 9096652a71666920ae8d59dd4317d536ba974d5b Mon Sep 17 00:00:00 2001 From: Aarni Koskela a...@iki.fi Date: Tue, 2 Dec 2014 13:56:15 +0200 Subject: [PATCH] git-add--interactive: allow list (un)selection by regular expression Remove

Re: [PATCH 24/34] checkout: reject if the branch is already checked out elsewhere

2014-12-02 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: FWIW git-branch usually can show the original branch of detached head (must not always). I don't think we have a plumbing equivalent for it though. People can tail -1 $GIT_DIR/logs/HEAD| sed .. but that seems hacky. @{-1}, i.e. the last branch I checked

Re: RCS Keywords in Git done right

2014-12-02 Thread Derek Moore
PPS: Sounds like I need Peff's git-blame-tree from here: https://github.com/peff/git/compare/jk/faster-blame-tree -- 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 http://vger.kernel.org/majordomo-info.html

Re: http-protocol question

2014-12-02 Thread Junio C Hamano
Jeff King p...@peff.net writes: For a public repository, it might make sense to provide a config option to loosen the is_our_ref check completely (i.e., to just has_sha1_file). But such an option does not yet exist. In principle, yes, but that cannot be has_sha1_file(); it has to have a fully

Re: [RFC] [PATCH] remote: add new --fetch option for set-url

2014-12-02 Thread Peter Wu
On Saturday 29 November 2014 13:31:18 Philip Oakley wrote: From: Peter Wu pe...@lekensteyn.nl Ok, I will make a clear note about the default (without --only) behavior having weird behavior for historical reasons. Are you really OK with --only=both? It sounds a bit odd (mathematically

Re: git status / git diff -C not detecting file copy

2014-12-02 Thread Junio C Hamano
Jeff King p...@peff.net writes: Interestingly, the rename behavior dates all the way back to: commit 753fd78458b6d7d0e65ce0ebe7b62e1bc55f3992 Author: Linus Torvalds torva...@ppc970.osdl.org Date: Fri Jun 17 15:34:19 2005 -0700 Use -M instead of -C for git diff and git status

Re: Git Bash for Mac

2014-12-02 Thread Kevin
On Tue, Dec 2, 2014 at 1:21 PM, Nizamuddin Chowdhury mchowdhur...@gmail.com wrote: Good Morning, My name is Sefath, and I was wondering when i could start using Git for Mac. I’m completely new to coding, and I wanted to start with HTML. However, when I tried installing git bash on my mac,

Re: http-protocol question

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 09:45:06AM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: For a public repository, it might make sense to provide a config option to loosen the is_our_ref check completely (i.e., to just has_sha1_file). But such an option does not yet exist. In

Re: [RFC][PATCH] send-email: add --[no-]xmailer option

2014-12-02 Thread Luis Henriques
On Mon, Mar 24, 2014 at 09:38:27PM +, Luis Henriques wrote: Add --[no-]xmailer that allows a user to disable adding the 'X-Mailer:' header to the email being sent. Ping It's been a while since I sent this patch. Is there any interest in having this switch in git-send-email? I honestly

Re: git status / git diff -C not detecting file copy

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 09:57:07AM -0800, Junio C Hamano wrote: To get a rough sense of how much effort is entailed in the various options, here are git log --raw timings for git.git (all timings are warm cache, best-of-five, wall clock time): The rationale of the change talks about big

Re: [PATCH 00/19] Add git-list-files

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 06:45:52PM +0700, Duy Nguyen wrote: As a side note, I wonder if it would be sensible to whitelist some commands as porcelain, and allow aliases to override them (either entirely, or just to add-in some options). Agreed. Maybe not all porcelain (some like

Re: [PATCH/RFC v2] Squashed changes for multiple worktrees vs. submodules

2014-12-02 Thread Jens Lehmann
Am 01.12.2014 um 00:27 schrieb Max Kirillov: builtin/checkout.c: use absolute path instead of given argument for picking worktree name, it happens to be needed because for submodule checkout the new worktree is always . environment.c: add GIT_COMMON_DIR to local_repo_env git-submodule.sh:

Re: [PATCH] t/lib-gpg: adjust permissions for gnupg 2.1

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 02:40:27PM +0100, Michael J Gruber wrote: Before gnupg 2.1 (aka modern branch), gpghome would contain only files which allowed t/lib-gpg.sh to set permissions explicitely, and we did that since 28a1b07 (t/lib-gpg: adjust permissions for gnupg 2.1, 2014-12-02) in order

Re: tests do not work with gpg 2.1

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 01:55:31PM +0100, Michael J Gruber wrote: That private-keys directory is from the first run of gpg2.1 on a pre-2.1 GPGHOME. It converts the old secring db to that new dir of entries and uses that instead. Thanks for untangling this. As I mentioned elsewhere in the

Re: tests do not work with gpg 2.1

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 04:21:33PM -0500, Jeff King wrote: I'm not sure if the most expedient path is trying to convince gpg developers that it's a bug, or if there is some workaround (like --passphrase-file /dev/null or something). I've been using the patch below to test, and am tempted to

Re: git status / git diff -C not detecting file copy

2014-12-02 Thread Bryan Turner
On Tue, Dec 2, 2014 at 5:55 PM, Jeff King p...@peff.net wrote: So from these timings, I'd conclude that: 1. It's probably fine to turn on copies for git status. 2. It's probably even OK to use -C -C for some projects. Even though 22s looks scary there, that's only 11ms for git.git

Re: git status / git diff -C not detecting file copy

2014-12-02 Thread Jeff King
On Wed, Dec 03, 2014 at 08:40:47AM +1100, Bryan Turner wrote: On Tue, Dec 2, 2014 at 5:55 PM, Jeff King p...@peff.net wrote: So from these timings, I'd conclude that: 1. It's probably fine to turn on copies for git status. 2. It's probably even OK to use -C -C for some projects.

Re: [PATCH/RFC v2] Squashed changes for multiple worktrees vs. submodules

2014-12-02 Thread Max Kirillov
On Tue, Dec 02, 2014 at 09:45:24PM +0100, Jens Lehmann wrote: But, while hacking the submodule init I became more convinced that the modules directory should be common and submodules in checkout should be a checkouts of the submodule. Because this is looks like concept of submodules, that

Re: [RFC] [PATCH] remote: add new --fetch option for set-url

2014-12-02 Thread Junio C Hamano
Peter Wu pe...@lekensteyn.nl writes: On Saturday 29 November 2014 13:31:18 Philip Oakley wrote: From: Peter Wu pe...@lekensteyn.nl Ok, I will make a clear note about the default (without --only) behavior having weird behavior for historical reasons. Are you really OK with --only=both?

configure failed to detect no asciidoc

2014-12-02 Thread Mike Berry
I just downloaded the latest git, and tried to build with: make configure ./configure make all doc build failed while building doc, asciidoc not found I would have thought the configure would have detected that. I downloaded, built, and installed asciidoc, and re-built git, things

Re: [PATCH] t/lib-gpg: adjust permissions for gnupg 2.1

2014-12-02 Thread Junio C Hamano
Jeff King p...@peff.net writes: Taking a step back, though, I am not sure I understand the reasoning behind the original e7f224f. The rationale in the commit message is that we want to make sure that the files are writable. But why would they not be? They are created by cp -R,... Wait.

Disabling credential helper?

2014-12-02 Thread brian m. carlson
At $DAYJOB, we have a Git server[0] that supports the smart HTTP protocol. That server can return a 401 if the repository is private or doesn't exist. We have several scripts, some of which run interactively, some not, that we simply want to fail if git fetch gets a non-2xx code. Unfortunately,

Re: [PATCH] t/lib-gpg: adjust permissions for gnupg 2.1

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 03:57:50PM -0800, Junio C Hamano wrote: Wait. After doing this, $ mkdir -p src/a src/b 2src/a/c chmod a-w src/b src/a/c $ cp -R src dst $ ls -lR dst dst/b and dst/a/c are 0440 (with umask 0027, which makes src/b and src/a/c also 0440, which is

Re: configure failed to detect no asciidoc

2014-12-02 Thread brian m. carlson
On Tue, Dec 02, 2014 at 04:32:56PM -0700, Mike Berry wrote: The documentation is still causing me trouble as my firewall doesn't like the html in Documentation/docbook.xsl, but that's probably a firewall issue. Is there documentation method, not requiring active web access? If you have XML

Re: [PATCH] git add -i: allow list (un)selection by regexp

2014-12-02 Thread Eric Sunshine
On Tue, Dec 2, 2014 at 12:26 PM, Junio C Hamano gits...@pobox.com wrote: Aarni Koskela aarni.kosk...@andersinnovations.com writes: From 9096652a71666920ae8d59dd4317d536ba974d5b Mon Sep 17 00:00:00 2001 From: Aarni Koskela a...@iki.fi Date: Tue, 2 Dec 2014 13:56:15 +0200 Subject: [PATCH]

Re: [PATCH 1/3] tree.c: update read_tree_recursive callback to pass strbuf as base

2014-12-02 Thread Eric Sunshine
On Tue, Dec 2, 2014 at 7:11 AM, Duy Nguyen pclo...@gmail.com wrote: On Tue, Dec 2, 2014 at 2:32 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: This allows the callback to use 'base' as a temporary buffer to quickly assemble full path without extra

Re: Deprecation warnings under XCode

2014-12-02 Thread Eric Sunshine
On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano gits...@pobox.com wrote: Torsten Bögershausen tbo...@web.de writes: On 12/01/2014 04:02 AM, Michael Blume wrote: I have no idea whether this should concern anyone, but my mac build of git shows CC imap-send.o imap-send.c:183:36: warning:

Re: Disabling credential helper?

2014-12-02 Thread Jonathan Nieder
(+peff) Hi, brian m. carlson wrote: We've used GIT_ASKPASS=/bin/echo, which seems to solve the problem, although it's ugly and I'm concerned it might break in the future. Is there a better way to do this? That's a good question. Before falling back to the askpass based prompt, Git tries

Re: Deprecation warnings under XCode

2014-12-02 Thread Michael Blume
On Tue, Dec 2, 2014 at 4:37 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano gits...@pobox.com wrote: Torsten Bögershausen tbo...@web.de writes: On 12/01/2014 04:02 AM, Michael Blume wrote: I have no idea whether this should concern anyone, but

Re: Disabling credential helper?

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 04:59:53PM -0800, Jonathan Nieder wrote: brian m. carlson wrote: We've used GIT_ASKPASS=/bin/echo, which seems to solve the problem, although it's ugly and I'm concerned it might break in the future. Is there a better way to do this? That's a good question.

Re: Disabling credential helper?

2014-12-02 Thread Jonathan Nieder
Jeff King wrote: On Tue, Dec 02, 2014 at 04:59:53PM -0800, Jonathan Nieder wrote: As long as you have no credential helpers configured, your GIT_ASKPASS based approach should work fine. Yeah, it's fine (as is GIT_ASKPASS=true). You could also provide a credential helper that gives you an

Re: Disabling credential helper?

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 05:29:50PM -0800, Jonathan Nieder wrote: Jeff King wrote: On Tue, Dec 02, 2014 at 04:59:53PM -0800, Jonathan Nieder wrote: As long as you have no credential helpers configured, your GIT_ASKPASS based approach should work fine. Yeah, it's fine (as is

Re: Our cumbersome mailing list workflow

2014-12-02 Thread Stefan Beller
On Sun, Nov 30, 2014 at 6:46 PM, Junio C Hamano gits...@pobox.com wrote: Michael Haggerty mhag...@alum.mit.edu writes: It seems like a few desirable features are being talked about here, and summarizing the discussion as centralized vs decentralized is too simplistic. What is really

Re: [PATCH 1/4] refs.c: rename the transaction functions

2014-12-02 Thread Jonathan Nieder
Stefan Beller wrote: No changes since sending it 5 days ago. branch.c | 13 + builtin/commit.c | 10 +++ builtin/fetch.c| 12 builtin/receive-pack.c | 13 - builtin/replace.c | 10 +++ builtin/tag.c | 10 +++

Re: [RFC][PATCH] send-email: add --[no-]xmailer option

2014-12-02 Thread Eric Wong
Luis Henriques hen...@camandro.org wrote: On Mon, Mar 24, 2014 at 09:38:27PM +, Luis Henriques wrote: Add --[no-]xmailer that allows a user to disable adding the 'X-Mailer:' header to the email being sent. Ping It's been a while since I sent this patch. Is there any interest in

Re: [PATCH 2/4] refs.c: rename transaction.updates to transaction.ref_updates

2014-12-02 Thread Jonathan Nieder
Stefan Beller wrote: The updates are only holding refs not reflogs, so express it to the reader. Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Makes sense. Reviewed-by: Jonathan Nieder jrnie...@gmail.com --

Re: Deprecation warnings under XCode

2014-12-02 Thread Eric Sunshine
On Tue, Dec 2, 2014 at 8:12 PM, Michael Blume blume.m...@gmail.com wrote: On Tue, Dec 2, 2014 at 4:37 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, Dec 1, 2014 at 1:04 PM, Junio C Hamano gits...@pobox.com wrote: I am not a Mac person, but is this about APPLE_COMMON_CRYPTO support

Re: [PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-12-02 Thread Jonathan Nieder
Stefan Beller wrote: When performing a reflog transaction update, only write to the reflog iff msg is non-NULL. This can then be combined with REFLOG_TRUNCATE to perform an update that only truncates but does not write. This change only affects whether or not a reflog entry should be

Re: [PATCH 4/4] reflog.c: use a reflog transaction when writing during expire

2014-12-02 Thread Jonathan Nieder
Stefan Beller wrote: --- a/builtin/reflog.c +++ b/builtin/reflog.c [...] @@ -290,7 +291,7 @@ static int unreachable(struct expire_reflog_cb *cb, struct commit *commit, unsig static int expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1, const char *email,

Re: [RFC][PATCH] send-email: add --[no-]xmailer option

2014-12-02 Thread Kyle J. McKay
On Dec 2, 2014, at 18:34, Eric Wong wrote: Luis Henriques hen...@camandro.org wrote: On Mon, Mar 24, 2014 at 09:38:27PM +, Luis Henriques wrote: Add --[no-]xmailer that allows a user to disable adding the 'X- Mailer:' header to the email being sent. Ping It's been a while since I

Re: Our cumbersome mailing list workflow

2014-12-02 Thread Jonathan Nieder
Stefan Beller wrote: How are non-regulars/newcomers, who supposingly need more iterations on a patch, supposed to handle the inter patch change log conveniently? I think this is one of the more important issues. I don't think there's any reason that newcomers should need more iterations than

[PATCH/RFC] rerere: error out on autoupdate failure

2014-12-02 Thread Jonathan Nieder
We have been silently tolerating errors by returning early with an error that the caller ignores since rerere.autoupdate was introduced in v1.6.0-rc0~120^2 (2008-06-22). So on error (for example if the index is already locked), rerere can return success silently without updating the index or with

[PATCH 0/14] Re: copy.c: make copy_fd preserve meaningful errno

2014-12-02 Thread Jonathan Nieder
Stefan Beller wrote: On Mon, Nov 17, 2014 at 4:48 PM, Jonathan Nieder jrnie...@gmail.com wrote: After this patch, setting errno is not part of the contract of copy_fd, so the bug Ronnie was fixing is gone. But it's a little more invasive. What do you think? I really like that approach and

[PATCH 01/14] strbuf: introduce strbuf_prefixf()

2014-12-02 Thread Jonathan Nieder
When preparing an error message in a strbuf, it can be convenient to add a formatted string to the beginning: if (transaction_commit(t, err)) { strbuf_prefixf(err, cannot fetch '%s': , remotename); return -1; } The new strbuf_prefixf is like

[PATCH 02/14] add_to_alternates_file: respect GIT_OBJECT_DIRECTORY

2014-12-02 Thread Jonathan Nieder
The objects directory is spelled as get_object_directory(), not git_path(objects). Some other code still hard-codes the objects/ directory name, so in the long term we may want to get rid of the pretense of support for GIT_OBJECT_DIRECTORY altogether, but this makes the code more consistent for

[PATCH 03/14] copy_fd: pass error message back through a strbuf

2014-12-02 Thread Jonathan Nieder
This way, callers can put the message in context or even avoid printing the message altogether. Currently hold_lock_file_for_append tries to save errno in order to produce a meaningful message about the failure and tries to print a second message using errno. Unfortunately the errno it uses is

[PATCH 04/14] hold_lock_file_for_append: pass error message back through a strbuf

2014-12-02 Thread Jonathan Nieder
This way, the code does not need to carefully safeguard errno to allow callers to print a reasonable error message when they choose to do some cleanup before die()-ing. Fixes a bug waiting to happen where copy_fd would clobber the errno passed back via hold_lock_file_for_append from read() or

[PATCH 05/14] lock_packed_refs: pass error message back through a strbuf

2014-12-02 Thread Jonathan Nieder
This saves us from having to be careful about preserving errno and makes it more explicit in the die-on-error case that the caller is exiting without a chance to clean up. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- builtin/clone.c | 6 +- refs.c | 17 ++---

[PATCH 06/14] lockfile: introduce flag for locks outside .git

2014-12-02 Thread Jonathan Nieder
When the lockfile API was introduced, it was only used for the index file and error messages like fatal: Unable to create '/path/to/foo.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other

[PATCH 07/14] fast-import: use message from lockfile API when writing marks fails

2014-12-02 Thread Jonathan Nieder
The usual way to handle errors from hold_lock_file_for_update is to get a message from unable_to_lock_message or unable_to_lock_die, which can explain to the user how to check for other git processes running concurrently and unlink the .lock file if safe. fast-import didn't use the

[PATCH 08/14] credentials: use message from lockfile API when locking ~/.git-credentials fails

2014-12-02 Thread Jonathan Nieder
If writing $HOME/.git-credentials.lock (or locking another file specified with the --file option) fails due to the lock file already existing, chances are that it is because another git process already locked the file. Use the message from the lockfile API that says so, to help the user to look

[PATCH 09/14] config: use message from lockfile API when locking config file fails

2014-12-02 Thread Jonathan Nieder
The message from the lockfile API includes advice about how to remove a stale lock file after a previous git process crashed. Pass the LOCK_OUTSIDE_REPOSITORY flag to avoid confusing error messages that imply the lockfile is under .git. These functions (and 'git config --file') are useful for

[PATCH 10/14] rerere: error out on autoupdate failure

2014-12-02 Thread Jonathan Nieder
We have been silently tolerating errors by returning early with an error that the caller ignores since rerere.autoupdate was introduced in v1.6.0-rc0~120^2 (2008-06-22). So on error (for example if the index is already locked), rerere can return success silently without updating the index or with

[PATCH 11/14] hold_locked_index: pass error message back through a strbuf

2014-12-02 Thread Jonathan Nieder
Today hold_locked_index takes a boolean parameter indicating whether to die with a message or to return -1 with errno indicating the nature of the problem on error. Pass back an error message through an 'err' parameter instead. This method of error reporting was introduced in the ref transaction

[PATCH 12/14] hold_lock_file_for_update: pass error message back through a strbuf

2014-12-02 Thread Jonathan Nieder
This makes it more obvious when callers forget to print a message on error, while still giving callers a chance to clean up before exiting. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- Documentation/technical/api-lockfile.txt | 33 +++- builtin/apply.c

[PATCH 13/14] lockfile: remove unused function 'unable_to_lock_die'

2014-12-02 Thread Jonathan Nieder
The old callers now use the message passed back by hold_lock_file_for_update / hold_lock_file_for_append instead of trying to interpret errno. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- lockfile.c | 8 lockfile.h | 1 - 2 files changed, 9 deletions(-) diff --git a/lockfile.c

[PATCH 14/14] lockfile: make 'unable_to_lock_message' private

2014-12-02 Thread Jonathan Nieder
The old external callers now use the message passed back by hold_lock_file_for_update / hold_lock_file_for_append instead of trying to interpret errno. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- That's the end of the series. Thanks for reading. Thoughts? lockfile.c | 42

Re: [PATCH 04/14] hold_lock_file_for_append: pass error message back through a strbuf

2014-12-02 Thread Torsten Bögershausen
On 12/03/2014 06:14 AM, Jonathan Nieder wrote: This way, the code does not need to carefully safeguard errno to allow callers to print a reasonable error message when they choose to do some cleanup before die()-ing. Fixes a bug waiting to happen where copy_fd would clobber the errno passed back

Re: [PATCH 04/14] hold_lock_file_for_append: pass error message back through a strbuf

2014-12-02 Thread Jonathan Nieder
Torsten Bögershausen wrote: On 12/03/2014 06:14 AM, Jonathan Nieder wrote: --- a/lockfile.c +++ b/lockfile.c @@ -179,45 +179,36 @@ int hold_lock_file_for_update(struct lock_file *lk, const char *path, int flags) return fd; } -int hold_lock_file_for_append(struct lock_file *lk,