Re: [PATCH v6 02/11] trailer: process trailers from stdin and arguments

2014-03-07 Thread Dan Carpenter
On Fri, Mar 07, 2014 at 07:19:15AM +0100, Christian Couder wrote: On Wed, Mar 5, 2014 at 11:52 PM, Junio C Hamano gits...@pobox.com wrote: This round is marked as the sixth, but I still see quite a many style issues, which I expect not to see from long timers without being told. Somewhat

Re: [PATH] branch.c:install_branch_config():Simplify code generating verbose message.

2014-03-07 Thread Eric Sunshine
Thanks for the submission. Some comments below to give you a taste of the Git review process... On Thu, Mar 6, 2014 at 2:58 AM, Paweł Wawruch pa...@aleg.pl wrote: From adfcfa0a334378a6242347efc0d614fa193610db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Wawruch?= pa...@aleg.pl Date:

Re: [PATCH v3] commit.c: Replace starts_with() with skip_prefix()

2014-03-07 Thread Eric Sunshine
On Thu, Mar 6, 2014 at 12:05 PM, Karthik Nayak karthik@gmail.com wrote: Replace all instances of starts_with() by skip_prefix(), which can not only be used to check presence of a prefix, but also used further on as it returns the string after the prefix, if the prefix is present. And also

git merge --date --author

2014-03-07 Thread Yann Droneaud
Hi, I was trying to rebuild some history and found myself trying to use some options with git merge which are available in git commit: git merge \ --date 2013-12-31 23:59:59 + \ --author Happy New Year happy.new-year@gregorian.calendar \ current-year But unfortunately,

Re: git merge --date --author

2014-03-07 Thread Michael Haggerty
On 03/07/2014 11:30 AM, Yann Droneaud wrote: I was trying to rebuild some history and found myself trying to use some options with git merge which are available in git commit: git merge \ --date 2013-12-31 23:59:59 + \ --author Happy New Year happy.new-year@gregorian.calendar

Re: [PATCH v3] commit.c: Replace starts_with() with skip_prefix()

2014-03-07 Thread karthik nayak
Hello Eric, Thanks for your reply, and for that information. should i patch again or this should do? And what next? Talk to the mentor? Thanks -- 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: [PATCH v6 02/11] trailer: process trailers from stdin and arguments

2014-03-07 Thread Christian Couder
On Fri, Mar 7, 2014 at 9:08 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Mar 07, 2014 at 07:19:15AM +0100, Christian Couder wrote: Yeah, I don't know why, but these days I find it very hard to review style issues in my own code without being distracted. And by the way is there a

Re: git merge --date --author

2014-03-07 Thread Andreas Schwab
Yann Droneaud ydrone...@opteya.com writes: But I'd like to know if there's a specific reason for git merge to not support --date and --author ? It's rather unusual that a merge is performed on behalf of a different author. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key

RE: difftool sends malformed path to exernal tool on Windows

2014-03-07 Thread Paul Lotz
David, I investigated further and found that \$LOCAL\ \$REMOTE\ return the remote and local files (reversed). (One can easily see this in my 2/28 e-mail.) Reversing these (\$REMOTE\ \$LOCAL\) does indeed reverse the output. It is easy to work around this issue, but how can this be? Paul

Confirm Receipt

2014-03-07 Thread Mrs.Supini Thrunkul
Hello, I am Mrs.Supini Thrunkul from Tai Yau Bank Hong Kong,I need your cooperation to transfer $47.3 million US Dollars to any trusted account within your control. Contact me for more details. Mrs.Supini Thrunkul Tel: +85 2580 848 65 -- To unsubscribe from this list: send the line

Re: [PATCH] show_ident_date: fix always-false conditional

2014-03-07 Thread Jeff King
On Thu, Mar 06, 2014 at 08:35:24PM -0500, Eric Sunshine wrote: 1dca155fe3fa (log: handle integer overflow in timestamps, 2014-02-24) assigns the result of strtol() to an 'int' and then checks it against LONG_MIN and LONG_MAX, indicating underflow or overflow, even though 'int' may not be

Re: [RFC/PATCH 4/4] replace: add --edit option

2014-03-07 Thread Jeff King
On Thu, Mar 06, 2014 at 08:57:58PM -0500, Eric Sunshine wrote: + if (strbuf_read(result, cmd.out, 41) 0) + die_errno(unable to read from mktree); + close(cmd.out); + + if (finish_command(cmd)) +

Re: [PATCH] disable grafts during fetch/push/bundle

2014-03-07 Thread Jeff King
On Fri, Mar 07, 2014 at 08:08:37AM +0100, Christian Couder wrote: Be it graft or replace, I do not think we want to invite people to use these mechansims too lightly to locally rewrite their history willy-nilly without fixing their mistakes at the object layer with commit --amend, rebase,

Re: [PATCH] show_ident_date: fix always-false conditional

2014-03-07 Thread Eric Sunshine
On Fri, Mar 7, 2014 at 12:15 PM, Jeff King p...@peff.net wrote: On Thu, Mar 06, 2014 at 08:35:24PM -0500, Eric Sunshine wrote: 1dca155fe3fa (log: handle integer overflow in timestamps, 2014-02-24) assigns the result of strtol() to an 'int' and then checks it against LONG_MIN and LONG_MAX,

Re: [PATCH v3] upload-pack: send shallow info over stdin to pack-objects

2014-03-07 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Fri, Mar 7, 2014 at 1:37 AM, Junio C Hamano gits...@pobox.com wrote: I like what I see in this patch, but I wonder if we can essentially revert that temporary shallow file patch and replace it with the same (or a similar) mechanism uniformly? Using

Re: [PATCH v3] upload-pack: send shallow info over stdin to pack-objects

2014-03-07 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Thu, Mar 6, 2014 at 3:49 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh index 3ae9092..a980574 100755 --- a/t/t5537-fetch-shallow.sh +++ b/t/t5537-fetch-shallow.sh @@ -173,4 +173,17

[PATCH] Use long for timezone in pretty.c:show_ident_date()

2014-03-07 Thread Brian Gernhardt
The value is parsed with strtol and compared against LONG_MIN and LONG_MAX, which doesn't make much sense for an int. Signed-off-by: Brian Gernhardt br...@gernhardtsoftware.com --- pretty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pretty.c b/pretty.c index

Re: Microproject idea: new OPT_* macros for PARSE_OPT_NONEG

2014-03-07 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: I don't know the scope of these microprojects, but yes I think it'll take a few hours for this. By the way, a bit more thought on the idea: instead of making OPT_BOOL_NONEG() that sets NONEG, we could make OPT_BOOL_FLAGS(..., NONEG), which is more

Re: [PATCH] Use long for timezone in pretty.c:show_ident_date()

2014-03-07 Thread Eric Sunshine
On Fri, Mar 7, 2014 at 1:47 PM, Brian Gernhardt br...@gernhardtsoftware.com wrote: The value is parsed with strtol and compared against LONG_MIN and LONG_MAX, which doesn't make much sense for an int. Signed-off-by: Brian Gernhardt br...@gernhardtsoftware.com Thanks. Find a more complete fix

Re: git merge --date --author

2014-03-07 Thread Junio C Hamano
Andreas Schwab sch...@linux-m68k.org writes: Yann Droneaud ydrone...@opteya.com writes: But I'd like to know if there's a specific reason for git merge to not support --date and --author ? It's rather unusual that a merge is performed on behalf of a different author. Yes. Michael's

[PATCH] tag: grok --with as synonym to --contains

2014-03-07 Thread Junio C Hamano
Just like git branch can be told to list the branches that has the named commit by git branch --with commit, teach the same short-hand to git tag, so that git tag --with commit shows the releases with the named commit. Signed-off-by: Junio C Hamano gits...@pobox.com --- * After umpteenth time I

Re: Trust issues with hooks and config files

2014-03-07 Thread Jeff King
On Thu, Mar 06, 2014 at 10:47:43PM +0100, Julian Brost wrote: I've noticed some behavior of git that might lead to some security issues if the user is not aware of this. Assume we have an evil user on a system, let's call him eve. He prepares a repository where he allows other user to push

Re: [PATCH v7 03/11] trailer: read and process config information

2014-03-07 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: This patch implements reading the configuration to get trailer information, and then processing it and storing it in a doubly linked list. Read and process the ..., perhaps? The config information is stored in the list whose first item is

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-07 Thread Andrew Keller
On Mar 7, 2014, at 2:53 AM, Henri GEIST geist.he...@laposte.net wrote: Adding a note in the submodule documentation signaling that the automatically cloned missing submodules are cloned with a separate gitdir. And where it is put. Signed-off-by: Henri GEIST geist.he...@laposte.net ---

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

2014-03-07 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: * many style fixes This round is readable ;-) Thanks. * clearer and nicer setup tests Those long lines that use printf with many embedded \n were harder to read and also looked harder to maintain if we ever wanted to change them. Splicing a

Re: [PATCH v7 03/11] trailer: read and process config information

2014-03-07 Thread David Kastrup
Junio C Hamano gits...@pobox.com writes: Christian Couder chrisc...@tuxfamily.org writes: This patch implements reading the configuration to get trailer information, and then processing it and storing it in a doubly linked list. Read and process the ..., perhaps? The config information

Re: [PATCH v7 03/11] trailer: read and process config information

2014-03-07 Thread Junio C Hamano
David Kastrup d...@gnu.org writes: Junio C Hamano gits...@pobox.com writes: Christian Couder chrisc...@tuxfamily.org writes: The config information is stored in the list whose first item is pointed to by: static struct trailer_item *first_conf_item; If feels somewhat strange ... Can't

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-07 Thread Junio C Hamano
Andrew Keller and...@kellerfarm.com writes: diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 21cb59a..ea837fd 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt ... Also, this file contains mostly high-level

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-07 Thread Henri GEIST
Le vendredi 07 mars 2014 à 16:42 -0500, Andrew Keller a écrit : On Mar 7, 2014, at 2:53 AM, Henri GEIST geist.he...@laposte.net wrote: Adding a note in the submodule documentation signaling that the automatically cloned missing submodules are cloned with a separate gitdir. And where it is

Re: [PATCH] submodule : Add --no-separate-git-dir option to add and update command.

2014-03-07 Thread Jens Lehmann
Am 06.03.2014 23:20, schrieb Henri GEIST: Le jeudi 06 mars 2014 à 21:51 +0100, Jens Lehmann a écrit : Am 06.03.2014 21:15, schrieb Henri GEIST: Le jeudi 06 mars 2014 à 20:48 +0100, Jens Lehmann a écrit : Am 06.03.2014 02:25, schrieb Henri GEIST: Wow, that shouldn't even work (as everything

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-07 Thread Junio C Hamano
Henri GEIST geist.he...@laposte.net writes: This information is technical in nature but has some importance for general users. As this kind of clone have a separate gitdir, you will have a surprise if you copy past the worktree as the gitdir will not come together. I am not sure if I

Re: [PATCH v3] upload-pack: send shallow info over stdin to pack-objects

2014-03-07 Thread Duy Nguyen
On Sat, Mar 8, 2014 at 1:27 AM, Junio C Hamano gits...@pobox.com wrote: On the receive-pack side, the comment at the bottom of preprare_shallow_update() makes it clear that, if we wanted to use hooks, we cannot avoid having the proposed new shallow-file in a temporary file, which is

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

2014-03-07 Thread Henri GEIST
Le vendredi 07 mars 2014 à 15:37 -0800, Junio C Hamano a écrit : Henri GEIST geist.he...@laposte.net writes: This information is technical in nature but has some importance for general users. As this kind of clone have a separate gitdir, you will have a surprise if you copy past the

Re: [PATCH v4 18/27] setup.c: support multi-checkout repo setup

2014-03-07 Thread Duy Nguyen
On Thu, Mar 6, 2014 at 2:42 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: core.worktree:: Set the path to the root of the working tree. + If GIT_COMMON_DIR environment variable is set, core.worktree + is ignored and not used for

[PATCH v5 00/28] Support multiple checkouts

2014-03-07 Thread Nguyễn Thái Ngọc Duy
The diff against v4 is kinda big but it's mostly about converting `...` to $(...) and making git_path() and friends return a const string. Another notable change is I no longer attempt to support checkouts on portable devices. Torsten pointed out (privately) that my dealing with Windows drives

[PATCH v5 01/28] path.c: make get_pathname() return strbuf instead of static buffer

2014-03-07 Thread Nguyễn Thái Ngọc Duy
We've been avoiding PATH_MAX whenever possible. This patch makes get_pathname() return a strbuf and updates the callers to take advantage of this. The code is simplified as we no longer need to worry about buffer overflow. vsnpath() behavior is changed slightly: previously it always clears the

[PATCH v5 04/28] path.c: rename vsnpath() to do_git_path()

2014-03-07 Thread Nguyễn Thái Ngọc Duy
The name vsnpath() gives an impression that this is general path handling function. It's not. This is the underlying implementation of git_path(), git_pathdup() and strbuf_git_path() which will prefix $GIT_DIR in the result string. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c

[PATCH v5 08/28] reflog: avoid constructing .lock path with git_path

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Among pathnames in $GIT_DIR, e.g. index or packed-refs, we want to automatically and silently map some of them to the $GIT_DIR of the repository we are borrowing from via $GIT_COMMON_DIR mechanism. When we formulate the pathname for its lockfile, we want it to be in the same location as its final

[PATCH v5 11/28] Add new environment variable $GIT_COMMON_DIR

2014-03-07 Thread Nguyễn Thái Ngọc Duy
This variable is intended to support multiple working directories attached to a repository. Such a repository may have a main working directory, created by either git init or git clone and one or more linked working directories. These working directories and the main repository share the same

[PATCH v5 12/28] git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects

2014-03-07 Thread Nguyễn Thái Ngọc Duy
If $GIT_COMMON_DIR is set, $GIT_OBJECT_DIRECTORY should be $GIT_COMMON_DIR/objects, not $GIT_DIR/objects. Just let rev-parse --git-path handle it. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-sh-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v5 10/28] commit: use SEQ_DIR instead of hardcoding sequencer

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/commit.c b/builtin/commit.c index 3767478..ee3ac10 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -155,7 +155,7 @@ static void

[PATCH v5 03/28] Convert git_snpath() to strbuf_git_path()

2014-03-07 Thread Nguyễn Thái Ngọc Duy
In the previous patch, git_snpath() is modified to allocate a new strbuf buffer because vsnpath() needs that. But that makes it awkward because git_snpath() receives a pre-allocated buffer from outside and has to copy data back. Rename it to strbuf_git_path() and make it receive strbuf directly.

[PATCH v5 06/28] Make git_path() aware of file relocation in $GIT_DIR

2014-03-07 Thread Nguyễn Thái Ngọc Duy
We allow the user to relocate certain paths out of $GIT_DIR via environment variables, e.g. GIT_OBJECT_DIRECTORY, GIT_INDEX_FILE and GIT_GRAFT_FILE. Callers are not supposed to use git_path() or git_pathdup() to get those paths. Instead they must use get_object_directory(), get_index_file() and

[PATCH v5 07/28] *.sh: respect $GIT_INDEX_FILE

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-pull.sh | 2 +- git-stash.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git-pull.sh b/git-pull.sh index 0a5aa2c..2a90262 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -218,7 +218,7 @@ test true = $rebase {

[PATCH v5 09/28] fast-import: use git_path() for accessing .git dir instead of get_git_dir()

2014-03-07 Thread Nguyễn Thái Ngọc Duy
This allows git_path() to redirect info/fast-import to another place if needed Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- fast-import.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fast-import.c b/fast-import.c index a9f328d..28e7a63 100644 ---

[PATCH v5 02/28] path.c: make get_pathname() call sites return const char *

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Before the previous commit, get_pathname returns an array of PATH_MAX length. Even if git_path() and similar functions does not use the whole array, git_path() caller can, in theory. After the commit, get_pathname() may return a buffer that has just enough room for the returned string and

[PATCH v5 05/28] path.c: group git_path(), git_pathdup() and strbuf_git_path() together

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/path.c b/path.c index 987fdec..1c0f160 100644 --- a/path.c +++ b/path.c @@ -78,6 +78,16 @@ void strbuf_git_path(struct strbuf *sb, const char

[PATCH v5 19/28] setup.c: support multi-checkout repo setup

2014-03-07 Thread Nguyễn Thái Ngọc Duy
The repo setup procedure is updated to detect $GIT_DIR/commondir and set $GIT_COMMON_DIR properly. The core.worktree is ignored when $GIT_COMMON_DIR is set. This is because the config file is shared in multi-checkout setup, but checkout directories _are_ different. Making core.worktree effective

[PATCH v5 13/28] *.sh: avoid hardcoding $GIT_DIR/hooks/...

2014-03-07 Thread Nguyễn Thái Ngọc Duy
If $GIT_COMMON_DIR is set, it should be $GIT_COMMON_DIR/hooks/, not $GIT_DIR/hooks/. Just let rev-parse --git-path handle it. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-am.sh | 22 +++--- git-rebase--interactive.sh | 6

[PATCH v5 15/28] setup.c: convert is_git_directory() to use strbuf

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- setup.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/setup.c b/setup.c index 6c3f85f..4994437 100644 --- a/setup.c +++ b/setup.c @@ -184,31 +184,36 @@ void

[PATCH v5 17/28] setup.c: convert check_repository_format_gently to use strbuf

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- setup.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/setup.c b/setup.c index 7e5b334..5085ab1 100644 --- a/setup.c +++ b/setup.c @@ -288,7 +288,9 @@ void setup_work_tree(void) static int

[PATCH v5 18/28] setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- setup.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.c b/setup.c index 5085ab1..42849f3 100644 --- a/setup.c +++ b/setup.c @@ -292,6 +292,10 @@ static int check_repository_format_gently(const char

[PATCH v5 20/28] wrapper.c: wrapper to open a file, fprintf then close

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 2 ++ wrapper.c | 31 +++ 2 files changed, 33 insertions(+) diff --git a/cache.h b/cache.h index 992e241..979ac6e 100644 --- a/cache.h +++ b/cache.h @@ -1239,6 +1239,8 @@ static inline ssize_t

[PATCH v5 14/28] git-stash: avoid hardcoding $GIT_DIR/logs/....

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- git-stash.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 0de9a6c..8093326 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -183,7 +183,7 @@ store_stash () { fi

[PATCH v5 16/28] setup.c: detect $GIT_COMMON_DIR in is_git_directory()

2014-03-07 Thread Nguyễn Thái Ngọc Duy
If the file $GIT_DIR/commondir exists, it contains the value of $GIT_COMMON_DIR. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/gitrepository-layout.txt | 7 ++ setup.c| 43 +- 2 files changed, 44

[PATCH v5 28/28] count-objects: report unused files in $GIT_DIR/repos/...

2014-03-07 Thread Nguyễn Thái Ngọc Duy
In linked checkouts, borrowed parts like config is taken from $GIT_COMMON_DIR. $GIT_DIR/config is never used. Report them as garbage. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/count-objects.c | 4 +++- cache.h | 1 + path.c | 29

[PATCH v5 27/28] gc: support prune --repos

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/config.txt | 7 +++ builtin/gc.c | 17 + 2 files changed, 24 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 313d4b3..c635b8d 100644 ---

[PATCH v5 22/28] checkout: support checking out into a new working directory

2014-03-07 Thread Nguyễn Thái Ngọc Duy
git checkout --to sets up a new working directory with a .git file pointing to $GIT_DIR/repos/id. It then executes git checkout again on the new worktree with the same arguments except --to is taken out. The second checkout execution, which is not contaminated with any info from the current

[PATCH v5 23/28] checkout: clean up half-prepared directories in --to mode

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 49 +++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index aa4ffd1..97fdfcc 100644 --- a/builtin/checkout.c +++

[PATCH v5 21/28] use new wrapper write_file() for simple file writing

2014-03-07 Thread Nguyễn Thái Ngọc Duy
This fixes common problems in these code about error handling, forgetting to close the file handle after fprintf() fails, or not printing out the error string.. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/branch.c | 4 +--- builtin/init-db.c | 7 +-- daemon.c

[PATCH v5 26/28] gc: style change -- no SP before closing bracket

2014-03-07 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/gc.c b/builtin/gc.c index c19545d..39d9b27 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -260,7 +260,7 @@ int cmd_gc(int argc, const char

[PATCH v5 25/28] prune: strategies for linked checkouts

2014-03-07 Thread Nguyễn Thái Ngọc Duy
(alias R=$GIT_COMMON_DIR/repos/id) - linked checkouts are supposed to keep its location in $R/gitdir up to date. The use case is auto fixup after a manual checkout move. - linked checkouts are supposed to update mtime of $R/gitdir. If $R/gitdir's mtime is older than a limit, and it

[PATCH v5 24/28] checkout: detach if the branch is already checked out elsewhere

2014-03-07 Thread Nguyễn Thái Ngọc Duy
The normal rule is anything outside refs/heads/ is detached. This increases strictness of the rule a bit more: if the branch is checked out (either in $GIT_COMMON_DIR/HEAD or any $GIT_DIR/repos/.../HEAD) then it's detached as well. A hint is given so the user knows where to go and do something

Confirm Receipt

2014-03-07 Thread Mrs.Supini Thrunkul
Hello, I am Mrs.Supini Thrunkul from Tai Yau Bank Hong Kong,I need your cooperation to transfer $47.3 million US Dollars to any trusted account within your control. Contact me for more details. Mrs.Supini Thrunkul Tel: +85 2580 848 65 -- To unsubscribe from this list: send the line

Re: [PATCH v5 01/28] path.c: make get_pathname() return strbuf instead of static buffer

2014-03-07 Thread Torsten Bögershausen
On 2014-03-08 03.47, Nguyễn Thái Ngọc Duy wrote: We've been avoiding PATH_MAX whenever possible. This patch makes get_pathname() return a strbuf and updates the callers to take advantage of this. The code is simplified as we no longer need to worry about buffer overflow. vsnpath() behavior

[GSoC][PATCH v2] use strchrnul() in place of strchr() and strlen()

2014-03-07 Thread Rohit Mani
Avoid scanning strings twice, once with strchr() and then with strlen(), by using strchrnul(). Helped-by: Junio C Hamano gits...@pobox.com Signed-off-by: Rohit Mani rohit.m...@outlook.com --- PATCH v2 Updated commit description Updated code according to suggestions [1] [1]