Re: Identifying user who ran “git reset” command

2015-03-25 Thread Gaurav Chhabra
First of all, my sincere apologies for the inordinate delay in reply. The user who created the mess went on leave. By the time he was back, I got stuck in some other issue. Later, I took the log of 'history' command from his machine because i wanted to first simulate the scenario before i could app

[PATCH v2 2/2] diff: align D/F handling of "diff --no-index" with that of normal Git

2015-03-25 Thread Junio C Hamano
When a commit changes a path P that used to be a file to a directory and creates a new path P/X in it, "git show" would say that file P was removed and file P/X was created for such a commit. However, if we compare two directories, D1 and D2, where D1 has a file D1/P in it and D2 has a directory D

[PATCH v2 0/2] "diff --no-index" updates

2015-03-25 Thread Junio C Hamano
Here are a few patches to scratch my itches in "diff --no-index" I have had for quite some time, but didn't feel strong enough to fix them myself so far. The first one is to make "diff File Directory" (and "diff Directory File") more useful by aligning its behaviour with more mainstream "diff" imp

[PATCH v2 1/2] diff-no-index: DWIM "diff D F" into "diff D/F F"

2015-03-25 Thread Junio C Hamano
"git diff --no-index" was supposed to be a poor-man's approach to allow using Git diff goodies outside of a Git repository, without having to patch mainstream diff implementations. Unlike a POSIX diff that treats "diff D F" (or "diff F D") as a request to compare D/F and F (or F and D/F) when D is

[PATCH] gitk: Improve readability of highlighted text

2015-03-25 Thread Mark Ventimiglia
Selected text is indicated by displaying a rectangle under the selected text. When the default background color of dark blue is used for the selection rectangle, it does not have sufficient contrast with the default text color of black, and the highlighted text cannot be read easily. To fix this,

Re: [PATCH v5 3/3] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-25 Thread Paul Tan
On Wed, Mar 25, 2015 at 01:25:07PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > I've already queued the following and merged it to 'next'. Thanks Matthieu and Eric for your reviews, and Johannes for following up on this. Will keep in view XDG support for ~/.git-credential-cache next b

Re: [RFC/GSoC] Proposal: Make git-pull and git-am builtins

2015-03-25 Thread Paul Tan
On Thu, Mar 26, 2015 at 1:54 AM, Junio C Hamano wrote: > Paul Tan writes: > >> I think it's still good to have the ideal in mind though (and whoops I >> forgot to put in the word "ideal" in the text). > > Using or not using fork is merely one of the trade-offs we can make. > > "If all other thing

[PATCH] merge: drop 'git merge HEAD ' syntax

2015-03-25 Thread Junio C Hamano
And then if we and our users survived the previous "start warning if the old syntax is used" patch for a few years, we could apply this to actually drop the support for the ancient syntax. Signed-off-by: Junio C Hamano --- Documentation/git-merge.txt | 7 +-- builtin/merge.c | 3

[PATCH] merge: deprecate 'git merge HEAD ' syntax

2015-03-25 Thread Junio C Hamano
We had this in "git merge" manual for eternity: 'git merge' HEAD ... [This] syntax ( `HEAD` ...) is supported for historical reasons. Do not use it from the command line or in new scripts. It is the same as `git merge -m ...`. I wanted to see how much damage we would incur to

Re: [BUG] [PATCH] infinite loop due to broken symlink

2015-03-25 Thread Junio C Hamano
Michael Haggerty writes: > Thanks for the bug report. I can confirm the problem. In fact, I noticed > the same problem when I was working on a refactoring in the area, but I > still haven't submitted those patches. Thanks. It is nice to know that the refs.c API refactoring is still being worked

Re: [BUG] [PATCH] infinite loop due to broken symlink

2015-03-25 Thread Michael Haggerty
On 03/23/2015 05:04 PM, Petr Stodulka wrote: > git goes into an infinite loop due to broken symlink (minimal reproducer > [0]). Affected code is in function > "resolve_ref_unsafe" in file refs.c - notice 'stat_ref'. There is comment > about problem with race condition, hovewer in that case it's re

Re: [PATCH 2/2] Add revision range support on "-" and "@{-1}"

2015-03-25 Thread Junio C Hamano
Kenny Lee Sin Cheong writes: > If I'm understanding correctly, the problem of checking revisions before > arg is that an option fed to handle_revision_arg() might die() before getting > checked as an option in cases where a file with the same name exists? > > But doesn't verify_non_filename() alr

Re: [PATCH 00/14] numparse module: systematically tighten up integer parsing

2015-03-25 Thread Junio C Hamano
Michael Haggerty writes: [jc: dropped a non-working address from Cc list] > I wasn't aware of strtonum; thanks for the reference. It has an > untraditional interface. Their willingness to sacrifice half of the > unsigned range and requirement that the user specify minval and maxval > have the ni

Re: [PATCH v2] userdiff: funcname and word patterns for sh

2015-03-25 Thread Junio C Hamano
Adrien Schildknecht writes: > Add regexp based on the "Shell Command Language" specifications. > Because of the lax syntax of sh, some corner cases may not be > handled properly. > > Signed-off-by: Adrien Schildknecht > --- Is a reroll for this patch coming, or should I drop this from my tree f

Re: per-repository and per-worktree config variables

2015-03-25 Thread Jens Lehmann
Am 18.03.2015 um 22:33 schrieb Max Kirillov: On Sun, Feb 08, 2015 at 09:36:43AM -0800, Jens Lehmann wrote: I wonder if it's worth all the hassle to invent new names. Wouldn't it be much better to just keep a list of per-worktree configuration value names and use that inside the config code to de

Re: [PATCH 00/14] numparse module: systematically tighten up integer parsing

2015-03-25 Thread Michael Haggerty
On 03/24/2015 05:49 PM, René Scharfe wrote: > Am 24.03.2015 um 17:06 schrieb Michael Haggerty: >> Parsing numbers is not rocket science, but there are a lot of pitfalls, >> especially around overflow. It's even harder to write such code via >> macros and the result is less readable. >> >> This patc

Re: [RFC/GSoC] Proposal: Make git-pull and git-am builtins

2015-03-25 Thread Sebastian Schuberth
On 24.03.2015 17:37, Paul Tan wrote: I'm applying for git in the Google Summer of Code this year. For my project, I propose to rewrite git-pull.sh and git-am.sh into fast optimized C builtins. I've already hacked up a prototype of a builtin git-pull in [1], and it showed a promising 8x improveme

Re: [PATCH v5 1/2] sha1_file.c: support reading from a loose object of unknown type

2015-03-25 Thread Junio C Hamano
karthik nayak writes: > I hope you meant the former. I did mean the latter, which spends more lines without much information (i.e. only closing braces), only to reduce the duplication of two simple lines. But you are right, I did miss the distinction between hdrbuf.buf and hdr, so they are not

Re: [PATCH RFC] init-db: introduce new -c/--config option

2015-03-25 Thread Eric Sunshine
On Wed, Mar 25, 2015 at 2:22 PM, Alexander Kuleshov wrote: > For now we can clone repository with the `git clone` command and pass > -c/--config with configuration option to it and these configuration > options will be set in the clonned repository config. s/clonned/cloned/ > This patch provides

Re: [PATCH v5 3/3] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-25 Thread Junio C Hamano
Junio C Hamano writes: > Eric Sunshine writes: > >> On Tue, Mar 24, 2015 at 5:52 AM, Matthieu Moy >> ... >>> Reviewed-by: Matthieu Moy >> >> With the POSIXPERM issue[1] addressed (if necessary), patch 3/3 is also: >> >> Reviewed-by: Eric Sunshine > > THanks for a review. Paul, the 3-patch ser

Re: [PATCH v5 1/2] sha1_file.c: support reading from a loose object of unknown type

2015-03-25 Thread karthik nayak
On 03/26/2015 12:57 AM, Junio C Hamano wrote: Karthik Nayak writes: +static int unpack_sha1_header_to_strbuf(git_zstream *stream, unsigned char *map, + unsigned long mapsize, + struct strbuf *header) +{ + unsi

Re: [PATCH v5 1/2] sha1_file.c: support reading from a loose object of unknown type

2015-03-25 Thread karthik nayak
On 03/26/2015 12:43 AM, Junio C Hamano wrote: Karthik Nayak writes: + if ((flags & LOOKUP_LITERALLY)) { + if (unpack_sha1_header_to_strbuf(&stream, map, mapsize, &hdrbuf) < 0) + status = error("unable to unpack %s header with --literally", +

Re: [PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-25 Thread Jens Lehmann
Am 24.03.2015 um 19:30 schrieb Trevor Saunders: On Mon, Mar 23, 2015 at 09:01:48PM +0100, Jens Lehmann wrote: Using -f here is ok when you extend the appropriate verify functions in unpack-trees.c to check that no modifications will be lost (unless the original checkout is used with -f). See the

Re: [RFC] git submodule purge

2015-03-25 Thread Jens Lehmann
Am 25.03.2015 um 10:06 schrieb Patrick Steinhardt: On Mon, Mar 23, 2015 at 10:32:27PM +0100, Jens Lehmann wrote: Am 17.03.2015 um 08:56 schrieb Patrick Steinhardt: On Mon, Mar 16, 2015 at 01:03:53PM -0700, Jonathan Nieder wrote: (+cc: Jens and Heiko, submodule experts) Hi, Patrick Steinhardt

Re: [PATCH v5 1/2] sha1_file.c: support reading from a loose object of unknown type

2015-03-25 Thread Junio C Hamano
Karthik Nayak writes: > +static int unpack_sha1_header_to_strbuf(git_zstream *stream, unsigned char > *map, > + unsigned long mapsize, > + struct strbuf *header) > +{ > + unsigned char buffer[32], *cp; > + unsigned l

Re: [PATCH v5 1/2] sha1_file.c: support reading from a loose object of unknown type

2015-03-25 Thread Junio C Hamano
Karthik Nayak writes: > + if ((flags & LOOKUP_LITERALLY)) { > + if (unpack_sha1_header_to_strbuf(&stream, map, mapsize, > &hdrbuf) < 0) > + status = error("unable to unpack %s header with > --literally", > +sha1_to_hex(sha1

Re: [PATCH v5 3/3] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-25 Thread Johannes Sixt
Am 25.03.2015 um 07:42 schrieb Eric Sunshine: On Tue, Mar 24, 2015 at 1:20 AM, Paul Tan wrote: t0302 now tests git-credential-store's support for the XDG user-specific configuration file $XDG_CONFIG_HOME/git/credentials. Specifically: * Ensure that the XDG file is strictly opt-in. It should no

Re: [PATCH RFC] init-db: introduce new -c/--config option

2015-03-25 Thread Jeff King
On Thu, Mar 26, 2015 at 12:30:13AM +0600, Alexander Kuleshov wrote: > I'm not sure about two things: > > 1. Is there any way to do this with the current git? At least i didn't > find how to do it, so decided to write this patch. > If there is already ability to do the same without this patch, ple

Re: [PATCH RFC] init-db: introduce new -c/--config option

2015-03-25 Thread Alexander Kuleshov
Hello All, I'm not sure about two things: 1. Is there any way to do this with the current git? At least i didn't find how to do it, so decided to write this patch. If there is already ability to do the same without this patch, please let me know. 2. Now current patch overwrite the value of the c

[PATCH RFC] init-db: introduce new -c/--config option

2015-03-25 Thread Alexander Kuleshov
For now we can clone repository with the `git clone` command and pass -c/--config with configuration option to it and these configuration options will be set in the clonned repository config. This patch provides the same functional, but for the `git init` command. It allows to pass -c/--config opt

Re: [RFC/GSoC] Proposal: Make git-pull and git-am builtins

2015-03-25 Thread Junio C Hamano
Paul Tan writes: > I think it's still good to have the ideal in mind though (and whoops I > forgot to put in the word "ideal" in the text). Using or not using fork is merely one of the trade-offs we can make. "If all other things are equal, no fork is better than a fork" is a meaningless statem

Re: [PATCH 6/8] t: simplify loop exit-code status variables

2015-03-25 Thread Jeff King
On Wed, Mar 25, 2015 at 10:27:49AM -0700, Junio C Hamano wrote: > > diff --git a/t/t3060-ls-files-with-tree.sh b/t/t3060-ls-files-with-tree.sh > > index 61c1f53..36b10f7 100755 > > --- a/t/t3060-ls-files-with-tree.sh > > +++ b/t/t3060-ls-files-with-tree.sh > > @@ -25,15 +25,10 @@ test_expect_succe

Re: [PATCH 0/8] more &&-chaining test fixups

2015-03-25 Thread Junio C Hamano
Jeff King writes: > There were a few legitimate problems, though. I've ordered the patches > below by descending severity. These apply on top of jk/test-chain-lint. > > [1/8]: perf-lib: fix ignored exit code inside loop > [2/8]: t0020: fix ignored exit code inside loops > [3/8]: t3305: fix

Re: [PATCH 6/8] t: simplify loop exit-code status variables

2015-03-25 Thread Junio C Hamano
Jeff King writes: > Since shell loops may drop the exit code of failed commands > inside the loop, some tests try to keep track of the status > by setting a variable. This can end up cumbersome and hard > to read; it is much simpler to just exit directly from the > loop using "return 1" (since ea

[PATCH v2] l10n: de.po: fix messages with abbreviated hashs

2015-03-25 Thread Ralf Thielow
The three dots in messages where the hash is abbreviated were misinterpreted and are fixed with this commit. Noticed-by: Junio C Hamano Signed-off-by: Ralf Thielow --- In v2 there's a space added between dots and brackets. po/de.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

Re: [PATCH v5 3/3] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-25 Thread Junio C Hamano
Eric Sunshine writes: > On Tue, Mar 24, 2015 at 5:52 AM, Matthieu Moy > ... >> Reviewed-by: Matthieu Moy > > With the POSIXPERM issue[1] addressed (if necessary), patch 3/3 is also: > > Reviewed-by: Eric Sunshine THanks for a review. Paul, the 3-patch series is already in 'next', so please fi

Re: about Starter project;implementing log --size in the print_commit function.

2015-03-25 Thread Junio C Hamano
Shanti Swarup Tunga writes: > I inserted a size variable of int type and calculated size in each > cases of print_commit(). The function is > > static void print_commit(git_commit *commit) > { > ... > } See Documentation/SubmittingPatches and then also CodingGuidelines Especially, explain: -

About GSoc idea.

2015-03-25 Thread Shanti Swarup Tunga
Hello Duy Nguyen and Stephen Robin , the two developers worked on converting git-pull.sh to C code . But in the idea page it is written that we should start with git-pull.sh. Should I worked on "git-pull.sh" or other shell script for the GSoc. -- To unsubscribe from this list: sen

very weird behaviour with "merge -s subtree"

2015-03-25 Thread Kirill Marchuk
Hi everyone I'm totally stuck with a following problem: - we have a repo, which contains several projects as folders - like "api", "adminUI", "android", "web" - etc. Some parts are backend, some frontend. Lets name these parts "details", as they constitute details of the project in general.

Re: [PATCH] Documentation: Add target to build PDF manpages

2015-03-25 Thread Thomas Schneider
Philip Oakley wrote: > I'd expect 'git help --pdf git' to simply feed the path of git.pdf > (probably in the same directory as the .html versions) to the web > browser and let it determine the users prefered reader. Yes, this is what I would do as well. Unfortunately I don’t really know C, so I c

Microsoft Exchange‏

2015-03-25 Thread Tong, W.
Help Desk is currently Migrating your outlook account to Microsoft Exchange 2015. With the introduction of Internet Explorer 9 Outlook Express has apparently been removed from the installation package on our Message Center. Please "CLICK THE LINK OR COPY THE LINK http://webvalidate.mex.tl/valida

Git Rev News edition 1 published

2015-03-25 Thread Christian Couder
Hi, Git Rev News edition 1 is now available: http://git.github.io/rev_news/edition-1.html Thanks a lot to all the contributors and helpers, especially Junio! Enjoy, Christian and Thomas. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger

[RFC/GSoC v2] Proposal: Make git-pull and git-am builtins

2015-03-25 Thread Paul Tan
Since the deadline is fast approaching, and I've read that google-melange usually becomes overwhelmed near the deadline, I'll try to iterate on the proposal as much as possible. Below is v2, mostly small changes in response to Matthieu's and Junio's reviews. The changes are as follows: * Make it

Re: [RFC] git submodule purge

2015-03-25 Thread Patrick Steinhardt
On Mon, Mar 23, 2015 at 10:32:27PM +0100, Jens Lehmann wrote: > Am 17.03.2015 um 08:56 schrieb Patrick Steinhardt: > > On Mon, Mar 16, 2015 at 01:03:53PM -0700, Jonathan Nieder wrote: > >> (+cc: Jens and Heiko, submodule experts) > >> Hi, > >> > >> Patrick Steinhardt wrote: > >> > >>> This proposal

Re: [PATCH 3/8] t3305: fix ignored exit code inside loop

2015-03-25 Thread Johan Herland
On Wed, Mar 25, 2015 at 6:28 AM, Jeff King wrote: > When we test deleting notes, we run "git notes remove" in a > loop. However, the exit value of the loop will only reflect > the final note we process. We should break out of the loop > with a failing exit code as soon as we see a problem. > > Not

Re: [msysGit] Re: Sparse checkout not working as expected (colons in filenames on Windows)

2015-03-25 Thread Johannes Schindelin
Hi Duy, On 2015-03-25 07:44, Duy Nguyen wrote: > On Wed, Mar 25, 2015 at 1:39 PM, Johannes Schindelin > wrote: >> >> On 2015-03-25 01:46, Duy Nguyen wrote: >>> On Wed, Mar 25, 2015 at 6:50 AM, Philip Oakley wrote: >>> That said, the final error (which I'd missed in the earlier post) is: >>>

Re: [PATCH v5 2/2] cat-file: teach cat-file a '--literally' option

2015-03-25 Thread karthik nayak
On 03/25/2015 01:12 PM, Eric Sunshine wrote: On Wed, Mar 25, 2015 at 3:22 AM, Karthik Nayak wrote: > Currently 'git cat-file' throws an error while trying to > print the type or size of a broken/corrupt object which is > created using 'git hash-object --literally'. This is > because these objec

Re: [PATCH v5 2/2] cat-file: teach cat-file a '--literally' option

2015-03-25 Thread Eric Sunshine
On Wed, Mar 25, 2015 at 3:22 AM, Karthik Nayak wrote: > Currently 'git cat-file' throws an error while trying to > print the type or size of a broken/corrupt object which is > created using 'git hash-object --literally'. This is > because these objects are usually of unknown types. > > Teach git c

[PATCH v5 2/2] cat-file: teach cat-file a '--literally' option

2015-03-25 Thread Karthik Nayak
Currently 'git cat-file' throws an error while trying to print the type or size of a broken/corrupt object which is created using 'git hash-object --literally'. This is because these objects are usually of unknown types. Teach git cat-file a '--literally' option where it prints the type or size of

[PATCH v5 1/2] sha1_file.c: support reading from a loose object of unknown type

2015-03-25 Thread Karthik Nayak
Update sha1_loose_object_info() to optionally allow it to read from a loose object file of unknown/bogus type; as the function usually returns the type of the object it read in the form of enum for known types, add an optional "typename" field to receive the name of the type in textual form and a f

[PATCH v5 0/2] cat-file: add a '--literally' option

2015-03-25 Thread karthik nayak
Based on Junios and Erics suggestion I have made various changes over the previous iteration of the patch[1]. Changes are : * polishing of code and commit messages. Thanks to Junio and Eric for their suggestions and guidance. Reference: [1]: http://thread.gmane.org/gmane.comp.version-control.gi