Re: Can't git stash after using git add -N

2016-03-16 Thread Duy Nguyen
On Wed, Mar 16, 2016 at 11:51 AM, Junio C Hamano wrote: > Josh Triplett writes: > >> As far as I can tell, if I run "git add -N" on a file, and then commit >> without adding the file contents, it gets committed as an empty file. > > Is that true? Git once worked like that in earlier days, but I

[PATCH 0/1] http: Fix crash when passing malformed URL

2016-03-16 Thread Anton Wuerfel
When passing a malformed URL to http_init() in http.c, git dies from a null pointer dereference. An example for a malformed URL is http:/git-scm.com (note the single slash after the protocol). I could not reproduce this error within any functions of git - I just noticed it during development of a

[PATCH 1/1] http: Fix crash when passing malformed URL

2016-03-16 Thread Anton Wuerfel
When passing a malformed URL to http_init() in http.c, git dies from a null pointer dereference. An example for a malformed URL is http:/git-scm.com (note the single slash after the protocol). This patch adds simple error handling as git notices the malformed URL already, but never checks the error

Re: [GSOC] Microproject "Move ~/.git-credential-cache to ~/.config/git"

2016-03-16 Thread 惠轶群
2016-03-16 3:21 GMT+08:00 Jeff King : > I don't think so. I suppose one could have a script that tests for the > existence of the socket or something. I agree, that is what I meant by "third-party tools". But for user who write script like that, it's easy to figure out the problem and either upda

[PATCH/RFC/GSoC 1/3] path.c: implement xdg_runtime_dir()

2016-03-16 Thread Hui Yiqun
this function does the following: 1. if $XDG_RUNTIME_DIR is non-empty, `$XDG_RUNTIME_DIR/git` is used in next step, otherwise `/tmp/git-$uid` is taken. 2. ensure that above directory does exist. what's more, it must has correct permission and ownership. 3. a newly allocated string consisting of th

[PATCH/RFC/GSoC 2/3] git-credential-cache: put socket to xdg-compatible path

2016-03-16 Thread Hui Yiqun
move .git-credential-cache/socket to xdg_runtime_dir("credential-cache.sock") Signed-off-by: Hui Yiqun --- credential-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/credential-cache.c b/credential-cache.c index f4afdc6..40d838b 100644 --- a/credential-cache.c +++ b/c

[PATCH/RFC/GSoC 3/3] t0301: test credential-cache support of XDG_RUNTIME_DIR

2016-03-16 Thread Hui Yiqun
t0301 now tests git-credential-cache support for XDG user-specific runtime file $XDG_RUNTIME_DIR/git/credential.sock. Specifically: * if $XDG_RUNTIME_DIR exists, use socket at `$XDG_RUNTIME_DIR/git/credential-cache.sock`. * otherwise, `/tmp/git-$uid/credential-cache.sock` is taken. Signed-off-

Re: [PATCH/RFC/GSoC 05/17] rebase-options: implement rebase_options_load() and rebase_options_save()

2016-03-16 Thread Johannes Schindelin
Hi Paul, On Mon, 14 Mar 2016, Stefan Beller wrote: > On Sat, Mar 12, 2016 at 2:46 AM, Paul Tan wrote: > > These functions can be used for loading and saving common rebase options > > into a state directory. > > > > Signed-off-by: Paul Tan > > --- > > rebase-common.c | 69 > > +

Re: [PATCH/RFC/GSoC 01/17] perf: introduce performance tests for git-rebase

2016-03-16 Thread Johannes Schindelin
Hi Paul, On Sat, 12 Mar 2016, Paul Tan wrote: > diff --git a/t/perf/p3404-rebase-interactive.sh > b/t/perf/p3404-rebase-interactive.sh > new file mode 100755 > index 000..aaca105 > --- /dev/null > +++ b/t/perf/p3404-rebase-interactive.sh > @@ -0,0 +1,26 @@ > > [...] > > +test_perf 'rebase -i

[PATCH v3] submodule-config: use hashmap_iter_first()

2016-03-16 Thread Alexander Kuleshov
The hashmap API provides hashmap_iter_first() helper for initialion and getting the first entry of a hashmap. Let's use it instead of doing initialization manually and then get the first entry. There are no functional changes, just cleanup. Signed-off-by: Alexander Kuleshov Reviewed-by: Stefan B