Re: `git stash pop` UX Problem

2014-03-01 Thread Stephen Leake
Matthieu Moy matthieu@grenoble-inp.fr writes: Stephen Leake stephen_le...@stephe-leake.org writes: So a message merge complete; you can drop the stash would be the most git should do. From the user experience point of view, that would be good. It could bother some users, but we have

Re: `git stash pop` UX Problem

2014-03-01 Thread Stephen Leake
Junio C Hamano gits...@pobox.com writes: Stephen Leake stephen_le...@stephe-leake.org writes: Matthieu Moy matthieu@grenoble-inp.fr writes: li...@haller-berlin.de (Stefan Haller) writes: Your intention was clearly to drop the stash, it just wasn't dropped because of the conflict.

Re: [PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-01 Thread Tay Ray Chuan
On Sat, Mar 1, 2014 at 10:58 AM, Duy Nguyen pclo...@gmail.com wrote: On Sat, Mar 1, 2014 at 8:07 AM, Sun He sunheeh...@gmail.com wrote: Signed-off-by: Sun He sunheeh...@gmail.com --- Find the potential places with memcpy by the bash command: $ find . | xargs grep memcpy.*\(.*20.*\)

Re: t9200 cvsexportcommit test fails on Ubuntu server 12.04.4 LTS

2014-03-01 Thread Fabio D'Alfonso
Hi, thanks for the suggestion. Tests failed because the cvs is built with denied root commit on 12.04, I did not notice as the 11.04 works. I use root for system activities on servers. Will sometime in the future start to sudoku... Made a check as git user and was fine. Fabio D'Alfonso

Re: [RFC 0/3] Make git more user-friendly during a merge conflict

2014-03-01 Thread Stephen Leake
David Kastrup d...@gnu.org writes: Stephen Leake stephen_le...@stephe-leake.org writes: David Kastrup d...@gnu.org writes: Stephen Leake stephen_le...@stephe-leake.org writes: David Kastrup d...@gnu.org writes: do the right thing commands also tend to do the wrong thing occasionally

Re: RFC GSoC idea: new git config features

2014-03-01 Thread Matthieu Moy
Jeff King p...@peff.net writes: If we had the keys in-memory, we could reverse this: config code asks for keys it cares about, and we can do an optimized lookup (binary search, hash, etc). I'm actually dreaming of a system where a configuration variable could be declared in Git's source code,

Re: [PATCH] rewrite finish_bulk_checkin() using strbuf

2014-03-01 Thread He Sun
2014-03-01 15:18 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: Hi, Yup, at that position. I don't know, but it failed a few tests on my machine related to bitmap. Another thing to use would be strbuf_splice() Eric Sunshinesunsh...@sunshineco.com has came up with a more elegant way to finish

Re: [PATCH] rewrite finish_bulk_checkin() using strbuf

2014-03-01 Thread Faiz Kothari
On Sat, Mar 1, 2014 at 4:33 PM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 15:18 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: Hi, Yup, at that position. I don't know, but it failed a few tests on my machine related to bitmap. Another thing to use would be strbuf_splice() Eric

[PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Faiz Kothari
Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places to substitute write_or_die(). I spotted other places where strbuf can be used in place of buf[MAX_PATH] but that would require a change in prototype of a lot of

Re: An idea for git bisect and a GSoC enquiry

2014-03-01 Thread Jacopo Notarstefano
I am not sure I understand what you are trying to say. Are you saying that we should stick to good/bad and allow the users use nothing else, because allowing fixed will be confusing? No! Pretty much the opposite of that. My idea (the mark subcommand) is to let people define their own pairs

Re: [RFC 0/3] Make git more user-friendly during a merge conflict

2014-03-01 Thread Matthieu Moy
Stephen Leake stephen_le...@stephe-leake.org writes: So as I understand it, this does _not_ lose your conflict resolutions. Well, then maybe it's time to try the command before continuing commenting on its behavior ;-). $ git status [...] both modified: foo.txt [...] $ git diff

[PATCH v2] branch: die when setting branch as own upstream

2014-03-01 Thread Brian Gesiak
From: modocache modoca...@gmail.com Branch set as own upstream using one of the following commands returns immediately with an exit code of 0: - `git branch --set-upstream-to foo refs/heads/foo` - `git branch --force --track foo foo` Since neither of these actions currently set the upstream, an

[PATCH v4 00/27] Support multiple checkouts

2014-03-01 Thread Nguyễn Thái Ngọc Duy
Phew.. v4 changes are - address all comments from Junio and Eric (I hope) - fix git checkout --to not working from the linked checkouts - report unused files (e.g. $GIT_DIR/repos/xx/config) in count-objects -v Nguyễn Thái Ngọc Duy (27): path.c: make get_pathname() return strbuf instead of

[PATCH v4 03/27] path.c: rename vsnpath() to do_git_path()

2014-03-01 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 v4 02/27] Convert git_snpath() to strbuf_git_path()

2014-03-01 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 v4 01/27] path.c: make get_pathname() return strbuf instead of static buffer

2014-03-01 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. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c | 120

[PATCH v4 09/27] commit: use SEQ_DIR instead of hardcoding sequencer

2014-03-01 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 v4 08/27] fast-import: use git_path() for accessing .git dir instead of get_git_dir()

2014-03-01 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 4fd18a3..08a1e78 100644 ---

[PATCH v4 07/27] reflog: avoid constructing .lock path with git_path

2014-03-01 Thread Nguyễn Thái Ngọc Duy
git_path() soon understands the path given to it and can transform the path instead of just prepending $GIT_DIR. So given path abc, git_path() may return $GIT_DIR/abc. But given path def, git_path() may return $GIT_DIR/ghi. Giving path def.lock to git_path() may confuse it and make it believe

[PATCH v4 12/27] *.sh: avoid hardcoding $GIT_DIR/hooks/...

2014-03-01 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 v4 11/27] git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects

2014-03-01 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 v4 10/27] Add new environment variable $GIT_COMMON_DIR

2014-03-01 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 v4 13/27] git-stash: avoid hardcoding $GIT_DIR/logs/....

2014-03-01 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 ae7d16e..12d9b37 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -183,7 +183,7 @@ store_stash () { fi

[PATCH v4 04/27] path.c: group git_path(), git_pathdup() and strbuf_git_path() together

2014-03-01 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 29048fe..ccd7228 100644 --- a/path.c +++ b/path.c @@ -78,6 +78,16 @@ void strbuf_git_path(struct strbuf *sb, const char

[PATCH v4 06/27] *.sh: respect $GIT_INDEX_FILE

2014-03-01 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..c9dc9ba 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -218,7 +218,7 @@ test true = $rebase {

[PATCH v4 05/27] Make git_path() aware of file relocation in $GIT_DIR

2014-03-01 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. All 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()

[PATCH v4 19/27] wrapper.c: wrapper to open a file, fprintf then close

2014-03-01 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 98b5dd3..99b86d9 100644 --- a/cache.h +++ b/cache.h @@ -1239,6 +1239,8 @@ static inline ssize_t

[PATCH v4 16/27] setup.c: convert check_repository_format_gently to use strbuf

2014-03-01 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 v4 18/27] setup.c: support multi-checkout repo setup

2014-03-01 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_DIR/commondir presents. This is because commondir repos are intended for separate/linked checkouts and pointing them back to a fixed core.worktree just does

[PATCH v4 15/27] setup.c: detect $GIT_COMMON_DIR in is_git_directory()

2014-03-01 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 v4 14/27] setup.c: convert is_git_directory() to use strbuf

2014-03-01 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 v4 17/27] setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()

2014-03-01 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 v4 22/27] checkout: clean up half-prepared directories in --to mode

2014-03-01 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 fa7b54a..28f9ac1 100644 --- a/builtin/checkout.c +++

[PATCH v4 23/27] checkout: detach if the branch is already checked out elsewhere

2014-03-01 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

[PATCH v4 21/27] checkout: support checking out into a new working directory

2014-03-01 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 v4 25/27] gc: style change -- no SP before closing bracket

2014-03-01 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 v4 24/27] prune: strategies for linked checkouts

2014-03-01 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 v4 20/27] use new wrapper write_file() for simple file writing

2014-03-01 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 v4 27/27] count-objects: report unused files in $GIT_DIR/repos/...

2014-03-01 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 | 37 - path.c | 4 2

[PATCH 3/3] branch: die when setting branch as own upstream

2014-03-01 Thread Brian Gesiak
Branch set as own upstream using one of the following commands returns immediately with an exit code of 0: - `git branch --set-upstream-to foo refs/heads/foo` - `git branch --force --track foo foo` Since neither of these actions currently set the upstream, an exit code of 0 is misleading.

[PATCH v4 26/27] gc: support prune --repos

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

Re: [PATCH 3/3] branch: die when setting branch as own upstream

2014-03-01 Thread Brian Gesiak
Sorry for the multiple patches--I noticed the commit author was off in the first one. This patch converts the warning to an error, should it be decided that it's prudent to do so (I'm in favor of doing so). If not, I think the other two patches I submitted are good to merge. Thanks for all the

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread He Sun
2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places to substitute write_or_die(). I spotted other places where strbuf can be used in place of

[PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Faiz Kothari
Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- - write_or_die(1, rpc.result.buf, rpc.result.len); + strbuf_write_or_die(1, (rpc.result.buf)); May be this should be strbuf_write_or_die(1, (rpc.result)); Yes, I changed that :-) Thanks again. Maybe we just

[PATCH] git-compat-util.h:rewrite skip_prefix() as loop

2014-03-01 Thread Siddharth Goel
Rewrote skip_prefix() function so that prefix is scanned once. Signed-off-by: Siddharth Goel siddharth98...@gmail.com --- git-compat-util.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 614a5e9..550dce3 100644 ---

Re: [PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-01 Thread He Sun
2014-03-01 10:58 GMT+08:00 Duy Nguyen pclo...@gmail.com: On Sat, Mar 1, 2014 at 8:07 AM, Sun He sunheeh...@gmail.com wrote: Signed-off-by: Sun He sunheeh...@gmail.com --- Find the potential places with memcpy by the bash command: $ find . | xargs grep memcpy.*\(.*20.*\) Helped-by:

Re: [PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-01 Thread He Sun
2014-03-01 10:58 GMT+08:00 Duy Nguyen pclo...@gmail.com: On Sat, Mar 1, 2014 at 8:07 AM, Sun He sunheeh...@gmail.com wrote: Signed-off-by: Sun He sunheeh...@gmail.com --- Find the potential places with memcpy by the bash command: $ find . | xargs grep memcpy.*\(.*20.*\) Helped-by:

Re: [PATCH] Replace memcpy with hashcpy when dealing hash copy globally

2014-03-01 Thread He Sun
Got it. Thanks. 2014-03-01 17:13 GMT+08:00 Tay Ray Chuan rcta...@gmail.com: On Sat, Mar 1, 2014 at 10:58 AM, Duy Nguyen pclo...@gmail.com wrote: On Sat, Mar 1, 2014 at 8:07 AM, Sun He sunheeh...@gmail.com wrote: Signed-off-by: Sun He sunheeh...@gmail.com --- Find the potential places with

[PATCH] Place cache.h at the first place to match generl rule

2014-03-01 Thread Sun He
Signed-off-by: Sun He sunheeh...@gmail.com Helped-by: Duy Nguyen pclo...@gmail.com --- The general rule is if cache.h or git-compat-util.h is included, it is the first #include. I parsed all the source files, and find many files start with builtin.h. And git-compat-util.h is the first in it.

Re: [PATCH v4 13/27] git-stash: avoid hardcoding $GIT_DIR/logs/....

2014-03-01 Thread Torsten Bögershausen
On 2014-03-01 13.12, Nguyễn Thái Ngọc Duy wrote: 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 ae7d16e..12d9b37 100755 --- a/git-stash.sh +++ b/git-stash.sh

[PATCH] contrib/subtree - unset prefix before proceeding

2014-03-01 Thread Gilles Filippini
This is to prevent unwanted prefix when such an environment variable exists. The case occurs for example during the Debian package build where the git-subtree test suite is called with 'prefix=/usr', which makes test 21 fail: not ok 21 - Check that prefix argument is required for split

Re: [RFC 0/3] Make git more user-friendly during a merge conflict

2014-03-01 Thread Stephen Leake
Matthieu Moy matthieu@grenoble-inp.fr writes: $ git status On branch master nothing to commit, working directory clean $ ok, you've lost your conflict resolutions. In fact, it now seems that 'git reset --mixed' is always the same as 'git reset --merge'. So I must be missing something!

Re: [PATCH v4 19/27] wrapper.c: wrapper to open a file, fprintf then close

2014-03-01 Thread Torsten Bögershausen
On 2014-03-01 13.12, Nguyễn Thái Ngọc Duy wrote: 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 98b5dd3..99b86d9 100644 --- a/cache.h +++

Re: [PATCH v4 24/27] prune: strategies for linked checkouts

2014-03-01 Thread Torsten Bögershausen
On 2014-03-01 13.13, Nguyễn Thái Ngọc Duy wrote: [] +static dev_t get_device_or_die(const char *path) +{ + struct stat buf; + if (stat(path, buf)) + die_errno(failed to stat '%s', path); + /* Ah Windows! Make different drives different partitions */ + if

Re: [PATCH] Place cache.h at the first place to match generl rule

2014-03-01 Thread brian m. carlson
On Sat, Mar 01, 2014 at 11:05:23PM +0800, Sun He wrote: Signed-off-by: Sun He sunheeh...@gmail.com Helped-by: Duy Nguyen pclo...@gmail.com Your commit summary has generl instead of general. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 |

Re: Branch Name Case Sensitivity

2014-03-01 Thread Lee Hopkins
Incorporating Torsten suggestions and some documentation: --- Documentation/config.txt | 12 builtin/init-db.c|4 +++- config.c |5 + environment.c|1 + refs.c | 26 +++--- 5 files changed,

[PATCH] commit.c:record_author_date() use skip_prefix() instead of starts_with()

2014-03-01 Thread Tanay Abhra
Signed-off-by: Tanay Abhra tanay...@gmail.com --- commit.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commit.c b/commit.c index 6bf4fe0..c954ecb 100644 --- a/commit.c +++ b/commit.c @@ -566,7 +566,7 @@ static void record_author_date(struct author_date_slab

[GSoC14][RFC] Proposal Draft: Refactor tempfile handling

2014-03-01 Thread Brian Gesiak
Hello all, My name is Brian Gesiak. I'm a research student at the University of Tokyo, and I'm hoping to participate in this year's Google Summer of Code by contributing to Git. I'm a longtime user, first-time contributor--some of you may have noticed my microproject patches.[1][2] I'd like to

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Johannes Sixt
Am 01.03.2014 12:21, schrieb Faiz Kothari: Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Implemented write_or_die.c:strbuf_write_or_die() and used in relevant places to substitute write_or_die(). I spotted other places where strbuf can be used in place of buf[MAX_PATH] but that would

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Michael Haggerty
Please leave a little more time for people to give feedback between versions of a patch series (unless the first version was so broken that it would be pointless for any other reviewer to waste time on it. And please label the versions of a single patch series [PATCH] then [PATCH v2], [PATCH v3],

[PATCH][GSoC] git-compat-util.h:rewrite skip_prefix() as loop

2014-03-01 Thread kgeorgiou
Rewritten git-compat-util.h:skip_prefix() as a loop, so that it doesn't have to scan through the prefix string twice as a miniproject for GSoC 2014. (I've just noticed that this miniproject has already been tackled by another contributor, if that's a problem I can pick something else.) Looking

Re: [PATCH v4 24/27] prune: strategies for linked checkouts

2014-03-01 Thread Duy Nguyen
On Sun, Mar 2, 2014 at 12:12 AM, Torsten Bögershausen tbo...@web.de wrote: On 2014-03-01 13.13, Nguyễn Thái Ngọc Duy wrote: [] +static dev_t get_device_or_die(const char *path) +{ + struct stat buf; + if (stat(path, buf)) + die_errno(failed to stat '%s', path); +

[PATCH v2] implemented strbuf_write_or_die()

2014-03-01 Thread Faiz Kothari
Signed-off-by: Faiz Kothari faiz.of...@gmail.com --- Thanks for the feedback. Implemented write_or_dir.c:strbuf_write_or_die() again. Checks if NULL is passed to prevent segmentation fault, I was not sure what error message to print so for now its write error. Changed the prototype as suggested.

Re: [BUG] Halt during fetch on MacOS

2014-03-01 Thread Kyle J. McKay
On Feb 28, 2014, at 22:15, Jeff King wrote: On Fri, Feb 28, 2014 at 03:26:28PM -0800, Conley Owens wrote: test.sh #!/bin/bash rungit() { mkdir $1 GIT_DIR=$1 git init --bare echo '[remote aosp]' $1/config echo 'url = https://android.googlesource.com/platform/external/tinyxml2'

[PATCH v2] Place cache.h at the first place to match general rule

2014-03-01 Thread Sun He
Signed-off-by: Sun He sunheeh...@gmail.com Helped-by: Duy Nguyen pclo...@gmail.com --- PATCH v2 Fix the spelling bug of general in subject as is suggested by brain m.calson sand...@crustytoothpaste.net The general rule is if cache.h or git-compat-util.h is included, it is the first #include.

[PATCH v2] finish_tmp_packfile():use strbuf for pathname construction

2014-03-01 Thread Sun He
Signed-off-by: Sun He sunheeh...@gmail.com Helped-by: Eric Sunshine sunsh...@sunshineco.com Helped-by: Michael Haggerty mhag...@alum.mit.edu --- This patch has assumed that you have already fix the bug of tmpname in builtin/pack-objects.c:write_pack_file() warning() builtin/pack-objects.c | 15

[PATCH v2] Replace tmpname with pack_tmp_name in warning. The developer mistook tmpname for pack_tmp_name.

2014-03-01 Thread Sun He
Signed-off-by: Sun He sunheeh...@gmail.com --- As tmpname is used without initialization, it should be a mistake. builtin/pack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index c733379..4922ce5 100644 ---

Re: [PATCH v2] implemented strbuf_write_or_die()

2014-03-01 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 7:18 PM, Faiz Kothari faiz.of...@gmail.com wrote: Subject: implemented strbuf_write_or_die() Imperative tone is preferred. The commit message tells what it is doing, not what it did. Subject: introduce strbuf_write_or_die() Signed-off-by: Faiz Kothari

[PATCH 3/3] rebase: new convenient option to edit a single commit

2014-03-01 Thread Nguyễn Thái Ngọc Duy
git rebase -e XYZ is basically the same as EDITOR=sed -i '1s/pick XYZ/edit XYZ/' $@ \ git rebase -i XYZ^ In English, it prepares the todo list for you to edit only commit XYZ to save your time. The time saving is only significant when you edit a lot of commits separately. Signed-off-by: Nguyễn

[PATCH 0/3] rebase's convenient options

2014-03-01 Thread Nguyễn Thái Ngọc Duy
A polished version from the RFC. Now you can do git rebase -i -10 - git rebase -i HEAD~10 git rebase -e XYZ - send you to commit XYZ for editing Nguyễn Thái Ngọc Duy (3): rev-parse: support OPT_NUMBER_CALLBACK in --parseopt rebase: accept -number as another way of saying HEAD~number

[PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-01 Thread Nguyễn Thái Ngọc Duy
This is rev-list style, where people can do git rev-list -3 in addition to git rev-list HEAD~3. A lot of commands are driven by the revision machinery and also accept this form. This addition to rebase is just for convenience. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCH 1/3] rev-parse: support OPT_NUMBER_CALLBACK in --parseopt

2014-03-01 Thread Nguyễn Thái Ngọc Duy
If the option spec is -NUM Help string then rev-parse will accept and parse -([0-9]+) and return -NUM $1 Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/rev-parse.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/builtin/rev-parse.c

Re: [PATCH v2] implemented strbuf_write_or_die()

2014-03-01 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 9:47 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Mar 1, 2014 at 7:18 PM, Faiz Kothari faiz.of...@gmail.com wrote: Implementing this clearly distinguishes between writing a normal buffer and writing a strbuf. Also, it provides an interface to write strbuf

Re: [PATCH] implemented strbuf_write_or_die()

2014-03-01 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 7:51 AM, He Sun sunheeh...@gmail.com wrote: 2014-03-01 19:21 GMT+08:00 Faiz Kothari faiz.of...@gmail.com: diff --git a/remote-curl.c b/remote-curl.c index 10cb011..dee8716 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -634,7 +634,7 @@ static int rpc_service(struct

Re: [PATCH] git-compat-util.h:rewrite skip_prefix() as loop

2014-03-01 Thread Siddharth Goel
To my surprise, git format-patch had removed the Git Notes that I had put to my commit (regarding GSoC). I have written this patch as a part of the GSoC 2014 MicroProject for Git. Going through the mail-chain I observed that many students have attempted this Microproject. So is it ok if I stick to

hello

2014-03-01 Thread Sandra Hassan
HelloMy name is Miss Sandra Hassan I saw your profile today and ibecame interested in you, I will also want to know you moreand I want you to send an email to my mailbox so that I can give you my pictureyours new friend.Sandra مرحبااسمي ملكة جمال ساندرا حسن رأيت بروفايلك اليوم وأناأصبحت

Re: [PATCH v2] Replace tmpname with pack_tmp_name in warning. The developer mistook tmpname for pack_tmp_name.

2014-03-01 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 9:43 PM, Sun He sunheeh...@gmail.com wrote: Subject: Replace tmpname with pack_tmp_name in warning. The developer mistook tmpname for pack_tmp_name. The subject should be a short summary of the change, and the rest of the commit message before the --- line provides extra

Re: [PATCH v2] Place cache.h at the first place to match general rule

2014-03-01 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 9:18 PM, Sun He sunheeh...@gmail.com wrote: Signed-off-by: Sun He sunheeh...@gmail.com Helped-by: Duy Nguyen pclo...@gmail.com Footers should follow a temporal order. For instance: 1. Duy helped you. 2. You revised your patch based upon his input. 3. You signed off

Re: [PATCH][GSoC] git-compat-util.h:rewrite skip_prefix() as loop

2014-03-01 Thread Eric Sunshine
Thanks for the submission. Minor comments below to give you a taste of what it's like to contribute to this project... On Sat, Mar 1, 2014 at 5:42 PM, kgeorgiou kyriakos.a.georg...@gmail.com wrote: Subject: git-compat-util.h:rewrite skip_prefix() as loop Space after colon. You might be able to

Re: [PATCH] git-compat-util.h:rewrite skip_prefix() as loop

2014-03-01 Thread Eric Sunshine
Thanks for the submission. Minor comments below to give you a taste of what it's like to contribute to this project... On Sat, Mar 1, 2014 at 8:32 AM, Siddharth Goel siddharth98...@gmail.com wrote: Rewrote skip_prefix() function so that prefix is scanned once. Good description. In this project,

Re: [PATCH] git-compat-util.h:rewrite skip_prefix() as loop

2014-03-01 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 10:22 PM, Siddharth Goel siddharth98...@gmail.com wrote: To my surprise, git format-patch had removed the Git Notes that I had put to my commit (regarding GSoC). I have written this patch as a part of the GSoC 2014 MicroProject for Git. You probably wanted to use the

Re: [PATCH v2] Replace tmpname with pack_tmp_name in warning. The developer mistook tmpname for pack_tmp_name.

2014-03-01 Thread He Sun
2014-03-02 11:59 GMT+08:00 Eric Sunshine sunsh...@sunshineco.com: On Sat, Mar 1, 2014 at 9:43 PM, Sun He sunheeh...@gmail.com wrote: Subject: Replace tmpname with pack_tmp_name in warning. The developer mistook tmpname for pack_tmp_name. The subject should be a short summary of the change,

[PATCH v3] write_pack_file: use correct variable in diagnostic

2014-03-01 Thread Sun He
'pack_tmp_name' is the subject of the utime() check, so report it in the warning, not the uninitialized 'tmpname' Signed-off-by: Sun He sunheeh...@gmail.com --- Changing the subject and adding valid information as tutored by Eric Sunshine. Thanks to him. builtin/pack-objects.c | 2 +- 1

[PATCH v3 1/2] Introduce strbuf_write_or_die()

2014-03-01 Thread Faiz Kothari
Signed-off-by: Faiz Kothari faiz.of...@gmail.com Introduced a new function strbuf.c:strbuf_write_or_die() to the strbuf family of functions. Now use this API instead of write_or_die.c:write_or_die() --- Hi, Thanks for the suggestions and feedbacks. As Johannes Sixt pointed out, the function is

[PATCH v3 2/2] use strbuf_write_or_die()

2014-03-01 Thread Faiz Kothari
Signed-off-by: Faiz Kothari faiz.of...@gmail.com Used strbuf.c:strbuf_write_or_die() instead of write_or_die.c:write_or_die() at relevant places. --- builtin/cat-file.c |2 +- builtin/notes.c|6 +++--- builtin/receive-pack.c |2 +- builtin/send-pack.c|2 +-