Re: [PATCH v13 00/11] Add interpret-trailers builtin

2014-09-15 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: '=' is always accepted as separator when parsing --trailer 'tokensepvalue' command line arguments, for compatibility with other git commands Hmph. Which of other commands take --option foo=bar?

[PATCH/RFC v2 2/2] submodule: modify clone command to recursively shallow clone submodules

2014-09-15 Thread Cole Minnaar
When cloning a repository that contains submodules and specifying the `--depth` option to the 'git clone' command, the top level repository will be cloned with the specified depth, but all submodules within the repository will be cloned in their entirety. Modified 'git clone' to pass the

[PATCH/RFC v2 1/2] submodule: add ability to shallowly clone any branch in a repo as a submodule

2014-09-15 Thread Cole Minnaar
Currently when specifying the `--depth` option to the 'submodule add' command, it can only create a shallow submodule clone of the currently active branch from the cloned repository. If a branch is specified using the `--branch` option, and the `--depth` option is also specified, the 'submodule

Subject: [PATCH] Remove duplicate list of extensions from docs.

2014-09-15 Thread Ciro Santilli
There is now also the Split index extension: probably we forgot to update this line after it was added. We could add the Split index to the line, but it would be just a matter of time before another extension is added and this becomes outdated again. So let's just remove it: it is already easy

RE: Admin Quota Alert

2014-09-15 Thread Erica Vitug
From: Erica Vitug Sent: Monday, September 15, 2014 5:59 AM To: Erica Vitug Subject: Admin Quota Alert Help desk will undergo unscheduled system maintenance today in order to improve your account. The new Microsoft Outlook Web-access 2014 which will be installed

Re: [PATCH] fsck: return non-zero status on missing ref tips

2014-09-15 Thread Michael Haggerty
On 09/12/2014 06:58 AM, Junio C Hamano wrote: On Thu, Sep 11, 2014 at 9:29 PM, Jeff King p...@peff.net wrote: [+cc mhagger for packed-refs wisdom] If we only have a packed copy of refs/heads/master and it is broken, then deleting any _other_ unrelated ref will cause refs/heads/master to be

Re: [PATCH] fsck: return non-zero status on missing ref tips

2014-09-15 Thread Michael Haggerty
On 09/12/2014 06:29 AM, Jeff King wrote: [+cc mhagger for packed-refs wisdom] On Thu, Sep 11, 2014 at 11:38:30PM -0400, Jeff King wrote: Fsck tries hard to detect missing objects, and will complain (and exit non-zero) about any inter-object links that are missing. However, it will not

Re:

2014-09-15 Thread R. Klomp
I couldn't find information about whether the -solo feature is available in all Beyond Compare versions. At the least I can say that it is available in version 3 for Windows, since that is the version that we're using. This issue does not occur when using the normal difftool (command: git

git merge --abort deletes unstaged files

2014-09-15 Thread André Hänsel
As discussed in https://groups.google.com/forum/#!topic/git-users/uR7gzLL2Ovc: I ran git merge to merge a branch. There were some conflicted files. Although they were automatically resolved by git rerere, I still had to add them. I accidentally ran git add . instead of git add -u. I noticed my

Re: git-diff-tree --root

2014-09-15 Thread Junio C Hamano
Roman Neuhauser neuhau...@sigpipe.cz writes: ... I like my scripts as simple as possible, so I'd like to use --root *always*. With --root, the command does not do anything different without for commits that are not root commits, and it shows everything created from nothing for root commits.

Re: git merge --abort deletes unstaged files

2014-09-15 Thread Andreas Schwab
André Hänsel an...@webkr.de writes: I ran git merge to merge a branch. There were some conflicted files. Although they were automatically resolved by git rerere, I still had to add them. If you want them to be added automatically, set rerere.autoupdate=true. Andreas. -- Andreas Schwab,

Re: [RFC] allowing hooks to ignore input?

2014-09-15 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: I think this is a good move. Hooks are written by users, who sometimes are not clueful enough. But what do our writers do when they fail with EPIPE? Die? If so, this patch alone is not sufficient. I think it is in a loop while (...) {

Re: [RFC/PATCH] mailinfo: do not treat From lines as in-body headers

2014-09-15 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sat, Sep 13, 2014 at 05:55:49PM -0700, Junio C Hamano wrote: On Sat, Sep 13, 2014 at 5:47 PM, Jeff King p...@peff.net wrote: On Sat, Sep 13, 2014 at 10:57:14PM +, brian m. carlson wrote: I wonder if git send-email should do what mutt does in this

Re: [PATCH] git-svn: delay term initialization

2014-09-15 Thread Junio C Hamano
Eric Wong normalper...@yhbt.net writes: On my Debian 7 system, this gives annoying warnings when the output of git svn commands are redirected: Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work. The COLUMNS and LINES environment variables didn't work. The resize

Re: [PULL] git svn updates for master

2014-09-15 Thread Junio C Hamano
Eric Wong normalper...@yhbt.net writes: Hi Junio, a couple of small changes and fixes. Most of these should be suitable for maint, too. Thanks. As you said Most, not All, I'll pull it to 'master' for the next release but not for the maintenance track. The following changes since commit

Re: git branch --merged and git branch --verbose do not combine

2014-09-15 Thread Junio C Hamano
David Kastrup d...@gnu.org writes: dak@lola:/usr/local/tmp/lilypond$ ../git/git branch --merged --verbose fatal: malformed object name --verbose Only at the very end of the command line if you omit something that is required, Git helps by defaulting the missing rev to HEAD. You can be a bit

Re: [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Good point. The --quiet spec doesn't say anything about stdout, Please correct it while at it in the doc ;-) I think I had to look it up in the documentation and then in code if git rev-parse --verify --quiet $object the right way to check if the

Re: [PATCH 1/2] add macro REALLOCARRAY

2014-09-15 Thread Junio C Hamano
René Scharfe l@web.de writes: The macro ALLOC_GROW manages several aspects of dynamic memory allocations for arrays: It performs overprovisioning in order to avoid reallocations in future calls, updates the allocation size variable, multiplies the item size and thus allows users to simply

Re: [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: +test_expect_success 'fails silently when using -q with deleted reflogs' ' + ref=$(git rev-parse HEAD) + : .git/logs/refs/test + git update-ref -m test refs/test $ref I'm just curious, why not simply git branch test ? Maybe it's a

Re: [PATCH 2/3] make update-server-info more robust

2014-09-15 Thread Junio C Hamano
Jeff King p...@peff.net writes: Since git update-server-info may be called automatically as part of a push or a gc --auto, we should be robust against two processes trying to update it simultaneously. However, we currently use a fixed tempfile, which means that two simultaneous writers may

Re: [RFC/PATCH] mailinfo: do not treat From lines as in-body headers

2014-09-15 Thread Junio C Hamano
Jeff King p...@peff.net writes: It looks like we have a reasonably sane is_from_line() function. So at least _we_ will not generally break on reading our own output, except in some extreme circumstances (you'd have to come up with something contrived like From me, at 10:30 30 minutes before

Re: [PATCH] Makefile: fix some typos in the preamble

2014-09-15 Thread Junio C Hamano
Ian Liu Rodrigues ian.li...@gmail.com writes: Signed-off-by: Ian Liu Rodrigues ian.li...@gmail.com --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9f984a9..496af55 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,11 @@

Re: [PATCH] compat-util: add _DEFAULT_SOURCE define

2014-09-15 Thread Junio C Hamano
Sergey Senozhatsky sergey.senozhat...@gmail.com writes: glibc has deprecated the use of _BSD_SOURCE define warning _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE To make it easier to maintain a cross platform source code, that warning can be suppressed by

[PATCH v3 3/3] Documentation: a note about stdout for git rev-parse --verify --quiet

2014-09-15 Thread David Aguilar
Signed-off-by: David Aguilar dav...@gmail.com --- This patch is new: we now mention that stdout contains the valid object name when --quiet is used, which may not be clear when reading this paragraph in isolation. Documentation/git-rev-parse.txt | 1 + 1 file changed, 1 insertion(+) diff --git

Re: git branch --merged and git branch --verbose do not combine

2014-09-15 Thread David Kastrup
Junio C Hamano gits...@pobox.com writes: David Kastrup d...@gnu.org writes: dak@lola:/usr/local/tmp/lilypond$ ../git/git branch --merged --verbose fatal: malformed object name --verbose Only at the very end of the command line if you omit something that is required, Git helps by defaulting

[PATCH v3 1/3] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-15 Thread David Aguilar
Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Helped-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com --- Differences since last time: This goes back to the original approach of using git update-ref plumbing instead of git

[PATCH v3 2/3] t1503: use test_must_be_empty

2014-09-15 Thread David Aguilar
Use `test_must_be_be_empty file` instead of `test -z $(cat file)`. Suggested-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com --- Unchanged since last time, but rebased for the change in the previous patch. t/t1503-rev-parse-verify.sh | 12 ++-- 1 file

Re: [PATCH 1/2] check-headers: add header usage checks for .c files

2014-09-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: +check_header_usage () { + first=$(grep '^#include' $1 | + head -n1 | + sed -e 's,#include ,,' -e 's,$,,') perhaps a single sed invocation suffices? sed -n -e '/^#include/{ s/#include []\(.*\).*/\1/p

Re: [PATCH 1/2] check-headers: add header usage checks for .c files

2014-09-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Teach check-header.sh to ensure that the first included header in .c files is either git-compat-util.h, builtin.h, or cache.h. Ensure that common-cmds.h is only included by help.c. Move the logic into functions so that we can skip parts of the check.

Re: [PATCH 1/2] check-headers: add header usage checks for .c files

2014-09-15 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: David Aguilar dav...@gmail.com writes: Teach check-header.sh to ensure that the first included header in .c files is either git-compat-util.h, builtin.h, or cache.h. Ensure that common-cmds.h is only included by help.c. Move the logic into

Re: git merge --abort deletes unstaged files

2014-09-15 Thread Junio C Hamano
Andreas Schwab sch...@linux-m68k.org writes: André Hänsel an...@webkr.de writes: I ran git merge to merge a branch. There were some conflicted files. Although they were automatically resolved by git rerere, I still had to add them. If you want them to be added automatically, set

Re: [PATCH 1/2] check-headers: add header usage checks for .c files

2014-09-15 Thread David Aguilar
On Mon, Sep 15, 2014 at 12:19:06PM -0700, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: David Aguilar dav...@gmail.com writes: Teach check-header.sh to ensure that the first included header in .c files is either git-compat-util.h, builtin.h, or cache.h. Ensure that

Re: [RFC/PATCH] mailinfo: do not treat From lines as in-body headers

2014-09-15 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Why cache.h when this is still only between mail{info,split}.c both of which do not really deal with any Git data? For mailsplit, we are trying to detect mbox boundary various MUAs would use in their output, and is_from_line() may be appropriate, but

Re: git branch --merged and git branch --verbose do not combine

2014-09-15 Thread Junio C Hamano
David Kastrup d...@gnu.org writes: This gives the same result as git branch --verbose --merged namely _only_ listing the current branch verbosely. Hmph. Then that is a different issue. As I never use --merged myself, even though I use git branch [--verbose] --no-merged pu quite often to

Re: [PATCH v14 01/11] trailer: add data structures and basic functions

2014-09-15 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: +/* Get the length of buf from its beginning until its last alphanumeric character */ That makes it sound as if feeding abc%de#f@ to the function returns 3 for abc, but +static size_t alnum_len(const char *buf, size_t len) +{ + while

Re: [PATCH] credential-cache: close stderr in daemon process

2014-09-15 Thread Junio C Hamano
Jeff King p...@peff.net writes: + if (!debug) + freopen(/dev/null, w, stderr); I am getting this: credential-cache--daemon.c:216:10: error: ignoring return value of 'freopen', declared with attribute warn_unused_result [-Werror=unused-result] which is somewhat irritating.

[PATCH v2] pretty: add %D format specifier

2014-09-15 Thread Harry Jeffery
Add a new format specifier, '%D' that is identical in behaviour to '%d', except that it does not include the ' (' prefix or ')' suffix provided by '%d'. Signed-off-by: Harry Jeffery ha...@exec64.co.uk --- Documentation/pretty-formats.txt | 6 -- log-tree.c | 24

RE: [boinc_dev] (local ?) BOINC repo broken again -or- how to act on the CR/LF changes made upstream

2014-09-15 Thread Rom Walton
Our server runs an older version of git. 1.7.1 We are in the process of migrating to a new server which runs a more up-to-date distro. - Rom -Original Message- From: Torsten Bögershausen [mailto:tbo...@web.de] Sent: Sunday, September 14, 2014 7:23 AM To: Toralf Förster; Torsten

Re: git merge --abort deletes unstaged files

2014-09-15 Thread Andreas Schwab
Junio C Hamano gits...@pobox.com writes: Andreas Schwab sch...@linux-m68k.org writes: André Hänsel an...@webkr.de writes: I ran git merge to merge a branch. There were some conflicted files. Although they were automatically resolved by git rerere, I still had to add them. If you want

Re: git merge --abort deletes unstaged files

2014-09-15 Thread Junio C Hamano
On Mon, Sep 15, 2014 at 2:54 PM, Andreas Schwab sch...@linux-m68k.org wrote: Junio C Hamano gits...@pobox.com writes: Andreas Schwab sch...@linux-m68k.org writes: André Hänsel an...@webkr.de writes: I ran git merge to merge a branch. There were some conflicted files. Although they were

[PATCH v5 00/23] Signed push

2014-09-15 Thread Junio C Hamano
The first round is found at $gmane/255520. The second round is found at $gmane/255701. The third round is found at $gmane/256464. The forth round is found at $gmane/256518. Not much had to have changed since the last round, except for the hooks used in the test that have been fixed to slurp all

[PATCH v5 03/23] receive-pack: do not reuse old_sha1[] for other things

2014-09-15 Thread Junio C Hamano
This piece of code reads object names of shallow boundaries, not old_sha1[], i.e. the current value the ref points at, which is to be replaced by what is in new_sha1[]. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/receive-pack.c | 8 +--- 1 file changed, 5 insertions(+), 3

[PATCH v5 16/23] push: the beginning of git push --signed

2014-09-15 Thread Junio C Hamano
While signed tags and commits assert that the objects thusly signed came from you, who signed these objects, there is not a good way to assert that you wanted to have a particular object at the tip of a particular branch. My signing v2.0.1 tag only means I want to call the version v2.0.1, and it

[PATCH v5 04/23] receive-pack: factor out queueing of command

2014-09-15 Thread Junio C Hamano
Make a helper function to accept a line of a protocol message and queue an update command out of the code from read_head_info(). Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/receive-pack.c | 50 +- 1 file changed, 29 insertions(+),

[PATCH v5 13/23] gpg-interface: move parse_gpg_output() to where it should be

2014-09-15 Thread Junio C Hamano
Earlier, ffb6d7d5 (Move commit GPG signature verification to commit.c, 2013-03-31) moved this helper that used to be in pretty.c (i.e. the output code path) to commit.c for better reusability. It was a good first step in the right direction, but still suffers from a myopic view that commits will

[PATCH v5 11/23] send-pack: refactor inspecting and resetting status and sending commands

2014-09-15 Thread Junio C Hamano
The main loop over remote_refs list inspects the ref status to see if we need to generate pack data (i.e. a delete-only push does not need to send any additional data), resets it to expecting the status report state, and formats the actual update commands to be sent. Split the former two out of

[PATCH v5 09/23] receive-pack: factor out capability string generation

2014-09-15 Thread Junio C Hamano
Similar to the previous one for send-pack, make it easier and cleaner to add to capability advertisement. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/receive-pack.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/builtin/receive-pack.c

[PATCH v5 15/23] pack-protocol doc: typofix for PKT-LINE

2014-09-15 Thread Junio C Hamano
Everywhere else we use PKT-LINE to denote the pkt-line formatted data, but shallow/deepen messages are described with PKT_LINE(). Fix them. Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/technical/pack-protocol.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v5 08/23] send-pack: factor out capability string generation

2014-09-15 Thread Junio C Hamano
A run of 'var ? var : ' fed to a long printf string in a deeply nested block was hard to read. Move it outside the loop and format it into a strbuf. As an added bonus, the trick to add agent=agent-name by using two conditionals is replaced by a more readable version. Signed-off-by: Junio C

[PATCH v5 17/23] receive-pack: GPG-validate push certificates

2014-09-15 Thread Junio C Hamano
Reusing the GPG signature check helpers we already have, verify the signature in receive-pack and give the results to the hooks via GIT_PUSH_CERT_{SIGNER,KEY,STATUS} environment variables. Policy decisions, such as accepting or rejecting a good signature by a key that is not fully trusted, is

[PATCH v5 05/23] send-pack: move REF_STATUS_REJECT_NODELETE logic a bit higher

2014-09-15 Thread Junio C Hamano
20e8b465 (refactor ref status logic for pushing, 2010-01-08) restructured the code to set status for each ref to be pushed, but did not quite go far enough. We inspect the status set earlier by set_refs_status_for_push() and then perform yet another update to the status of a ref with an otherwise

[PATCH v5 14/23] gpg-interface: move parse_signature() to where it should be

2014-09-15 Thread Junio C Hamano
Our signed-tag objects set the standard format used by Git to store GPG-signed payload (i.e. the payload followed by its detached signature) [*1*], and it made sense to have a helper to find the boundary between the payload and its signature in tag.c back then. Newer code added later to parse

[PATCH v5 06/23] send-pack: refactor decision to send update per ref

2014-09-15 Thread Junio C Hamano
A new helper function ref_update_to_be_sent() decides for each ref if the update is to be sent based on the status previously set by set_ref_status_for_push() and also if this is a mirrored push. Signed-off-by: Junio C Hamano gits...@pobox.com --- send-pack.c | 36

[PATCH v5 02/23] receive-pack: parse feature request a bit earlier

2014-09-15 Thread Junio C Hamano
Ideally, we should have also allowed the first shallow to carry the feature request trailer, but that is water under the bridge now. This makes the next step to factor out the queuing of commands easier to review. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/receive-pack.c | 26

[PATCH v5 01/23] receive-pack: do not overallocate command structure

2014-09-15 Thread Junio C Hamano
An update command in the protocol exchange consists of 40-hex old object name, SP, 40-hex new object name, SP, and a refname, but the first instance is further followed by a NUL with feature requests. The command structure, which has a flex-array member that stores the refname at the end, was

[PATCH v5 20/23] signed push: add pushee header to push certificate

2014-09-15 Thread Junio C Hamano
Record the URL of the intended recipient for a push (after anonymizing it if it has authentication material) on a new pushee URL header. Because the networking configuration (SSH-tunnels, proxies, etc.) on the pushing user's side varies, the receiving repository may not know the single canonical

[PATCH v5 21/23] signed push: fortify against replay attacks

2014-09-15 Thread Junio C Hamano
In order to prevent a valid push certificate for pushing into an repository from getting replayed to push to an unrelated one, send a nonce string from the receive-pack process and have the signer include it in the push certificate. The receiving end uses an HMAC hash of the path to the

[PATCH v5 19/23] signed push: remove duplicated protocol info

2014-09-15 Thread Junio C Hamano
With the interim protocol, we used to send the update commands even though we already send a signed copy of the same information when push certificate is in use. Update the send-pack/receive-pack pair not to do so. The notable thing on the receive-pack side is that it makes sure that there is no

[PATCH v5 23/23] t5541: test push --signed to smart HTTP server

2014-09-15 Thread Junio C Hamano
Currently it seems that somewhere in the transport option setting chain the --signed bit gets lost and this does not pass. Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t5541-http-push-smart.sh | 39 +++ 1 file changed, 39 insertions(+) diff --git

[PATCH v5 18/23] send-pack: send feature request on push-cert packet

2014-09-15 Thread Junio C Hamano
We would want to update the interim protocol so that we do not send the usual update commands when the push certificate feature is in use, as the same information is in the certificate. Once that happens, the push-cert packet may become the only protocol command, but then there is no packet to

[PATCH v5 12/23] send-pack: clarify that cmds_sent is a boolean

2014-09-15 Thread Junio C Hamano
We use it to make sure that the feature request is sent only once on the very first request packet (ignoring the shallow line, which was an unfortunate mistake we cannot retroactively fix with existing receive-pack already deployed in the field) and we set it to true with cmds_sent++, not because

[PATCH v5 22/23] signed push: allow stale nonce in stateless mode

2014-09-15 Thread Junio C Hamano
When operating with the stateless RPC mode, we will receive a nonce issued by another instance of us that advertised our capability and refs some time ago. Update the logic to check received nonce to detect this case, compute how much time has passed since the nonce was issued and report the

[PATCH v5 10/23] send-pack: rename new_refs to need_pack_data

2014-09-15 Thread Junio C Hamano
The variable counts how many non-deleting command is being sent, but is only checked with 0-ness to decide if we need to send the pack data. Signed-off-by: Junio C Hamano gits...@pobox.com --- send-pack.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/send-pack.c

[PATCH v5 07/23] send-pack: always send capabilities

2014-09-15 Thread Junio C Hamano
We tried to avoid sending one extra byte, NUL and nothing behind it to signal there is no protocol capabilities being sent, on the first command packet on the wire, but it just made the code look ugly. Signed-off-by: Junio C Hamano gits...@pobox.com --- send-pack.c | 4 +--- 1 file changed, 1

Re: git merge --abort deletes unstaged files

2014-09-15 Thread Andreas Schwab
Junio C Hamano gits...@pobox.com writes: On Mon, Sep 15, 2014 at 2:54 PM, Andreas Schwab sch...@linux-m68k.org wrote: Junio C Hamano gits...@pobox.com writes: Andreas Schwab sch...@linux-m68k.org writes: André Hänsel an...@webkr.de writes: I ran git merge to merge a branch. There were

Re: [PATCH v3 2/3] t1503: use test_must_be_empty

2014-09-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Use `test_must_be_be_empty file` instead of `test -z $(cat file)`. Suggested-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com --- Unchanged since last time, but rebased for the change in the previous patch. It probably

Re: [PATCH v3 1/3] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Helped-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com --- Differences since last time: This goes back to the original approach

Re: [PATCH v3 3/3] Documentation: a note about stdout for git rev-parse --verify --quiet

2014-09-15 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Signed-off-by: David Aguilar dav...@gmail.com --- This patch is new: we now mention that stdout contains the valid object name when --quiet is used, which may not be clear when reading this paragraph in isolation. Documentation/git-rev-parse.txt | 1

Re: [PATCH v2] pretty: add %D format specifier

2014-09-15 Thread Junio C Hamano
Harry Jeffery ha...@exec64.co.uk writes: Add a new format specifier, '%D' that is identical in behaviour to '%d', except that it does not include the ' (' prefix or ')' suffix provided by '%d'. Signed-off-by: Harry Jeffery ha...@exec64.co.uk --- The patch is broken and does not apply with

Apparent bug in git-gc

2014-09-15 Thread Dale R. Worley
I have an unpleasant bug in git-gc: Git version: 1.8.3.1 Running on: Fedora 19 Gnu/Linux I have an 11 GB repository. It passes git-fsck (though with a number of dangling objects). But when I run git-gc on it, the file refs/heads/master disappears. Since HEAD points to refs/heads/master,

Re: [PATCH 2/3] make update-server-info more robust

2014-09-15 Thread Jeff King
On Mon, Sep 15, 2014 at 11:39:12AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Since git update-server-info may be called automatically as part of a push or a gc --auto, we should be robust against two processes trying to update it simultaneously. However, we currently

Re: [RFC/PATCH] mailinfo: do not treat From lines as in-body headers

2014-09-15 Thread Jeff King
On Mon, Sep 15, 2014 at 11:56:16AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: It looks like we have a reasonably sane is_from_line() function. So at least _we_ will not generally break on reading our own output, except in some extreme circumstances (you'd have to come

Re: [RFC/PATCH] mailinfo: do not treat From lines as in-body headers

2014-09-15 Thread Jeff King
On Mon, Sep 15, 2014 at 01:15:35PM -0700, Junio C Hamano wrote: If we only want to skip ?From in pasted format-patch output, we would want a rule in mailinfo that is tighter than is_from_line() in mailsplit. That is, something like this on top of your patch. Or is this a bit too

Re: [PATCH] credential-cache: close stderr in daemon process

2014-09-15 Thread Jeff King
On Mon, Sep 15, 2014 at 02:38:11PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: + if (!debug) + freopen(/dev/null, w, stderr); I am getting this: credential-cache--daemon.c:216:10: error: ignoring return value of 'freopen', declared with attribute

Re: Apparent bug in git-gc

2014-09-15 Thread Jeff King
On Mon, Sep 15, 2014 at 07:34:03PM -0400, Dale R. Worley wrote: I have an 11 GB repository. It passes git-fsck (though with a number of dangling objects). But when I run git-gc on it, the file refs/heads/master disappears. That's the expected behavior. Gc runs git pack-refs, which puts an

Re: [PATCH 1/2] add macro REALLOCARRAY

2014-09-15 Thread Junio C Hamano
On Sun, Sep 14, 2014 at 9:55 AM, René Scharfe l@web.de wrote: +#define REALLOCARRAY(x, alloc) x = xrealloc((x), (alloc) * sizeof(*(x))) I have been wondering if x could be an expression that has an operator that binds weaker than the assignment '='. That may necessitate the LHS of the

Re: [PATCH v3 1/3] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-15 Thread David Aguilar
On Mon, Sep 15, 2014 at 03:32:37PM -0700, Junio C Hamano wrote: David Aguilar dav...@gmail.com writes: Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Helped-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com ---

[PATCH v4 2/3] refs: make rev-parse --quiet actually quiet

2014-09-15 Thread David Aguilar
When a reflog is deleted, e.g. when git stash clears its stashes, git rev-parse --verify --quiet dies: fatal: Log for refs/stash is empty. The reason is that the get_sha1() code path does not allow us to suppress this message. Pass the flags bitfield through get_sha1_with_context() so

[PATCH v4 1/3] t1503: use test_must_be_empty

2014-09-15 Thread David Aguilar
Use `test_must_be_be_empty file` instead of `test -z $(cat file)`. Suggested-by: Fabian Ruch baf...@gmail.com Signed-off-by: David Aguilar dav...@gmail.com --- This patch should probably be applied on top of the da/rev-parse-verify-quiet which is currently in pu and contains the rev-parse

[PATCH v4 3/3] stash: prefer --quiet over shell redirection of the standard error stream

2014-09-15 Thread David Aguilar
Use `git rev-parse --verify --quiet` instead of redirecting stderr to /dev/null. Signed-off-by: David Aguilar dav...@gmail.com --- This patch is unchanged from when it was first written, but is now correct thanks to the preceding patch. git-stash.sh | 13 +++-- 1 file changed, 7