Re: commit all the untracked files prior adding them to stage using "git add"

2014-05-17 Thread Tanay Abhra
Arup Rakshit rocketmail.com> writes: > Now I am looking for a way to add those in stage and commit also in a single > line. So I did below :- > > arup linux-wzza:~/Rails/test_app> git commit -m "chapter 19 of Agile Web > Development with Rails" -a > # On branch master > # > # Initial commit

Re: [GIT GUI PATCH v2] git-gui: tolerate major version changes when comparing the git version

2014-05-17 Thread Eric Sunshine
On Sat, May 17, 2014 at 3:49 PM, Jens Lehmann wrote: > Since git 2.0.0 starting git gui in a submodule using a gitfile fails with > the following error: > >No working directory ../../../ > >couldn't change working directory >to "../../../": no such file or >directory > > This is be

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-17 Thread Felipe Contreras
James Denholm wrote: > Felipe Contreras wrote: > > James Denholm wrote: > > > On Fri, May 16, 2014 at 05:39:42PM -0500, Felipe Contreras wrote: > > > > (...) I would venture to say you have never made a package in your > > > > life. > > > > > > And you have, Felipe? Let us see the years of experie

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-17 Thread James Denholm
Felipe Contreras wrote: > James Denholm wrote: > > On Fri, May 16, 2014 at 05:39:42PM -0500, Felipe Contreras wrote: > > > (...) I would venture to say you have never made a package in your > > > life. > > > > And you have, Felipe? Let us see the years of experience you surely have > > in the fiel

Re: [PATCH] Documentation/technical/api-hashmap: Remove source highlighting

2014-05-17 Thread Anders Kaseorg
On Sat, 17 May 2014, Jeremiah Mahler wrote: > I agree that a broken document is an unacceptable failure mode. > > But I do not understand why 'source-highlight' is not an install > requirement for 'git-doc'. If I install 'source-highlight' on > my Debian machine the code looks great. > > apt-g

Re: Delaying 2.0 final

2014-05-17 Thread Jiang Xin
2014-05-18 8:31 GMT+08:00 Jiang Xin : > 2014-05-17 6:45 GMT+08:00 Junio C Hamano : >> As we seem to have a few regressions we may want to fix, I will not >> be cutting the 2.0 final today (https://tinyurl.com/gitCal). >> >> I queued the following near the bottom of 'pu' (these are also >> merged to

Re: [GIT GUI PATCH v2] git-gui: tolerate major version changes when comparing the git version

2014-05-17 Thread Chris Packham
On 18/05/14 07:49, Jens Lehmann wrote: > Since git 2.0.0 starting git gui in a submodule using a gitfile fails with > the following error: > >No working directory ../../../ > >couldn't change working directory >to "../../../": no such file or >directory > > This is because "git r

Re: Delaying 2.0 final

2014-05-17 Thread Jiang Xin
2014-05-17 6:45 GMT+08:00 Junio C Hamano : > As we seem to have a few regressions we may want to fix, I will not > be cutting the 2.0 final today (https://tinyurl.com/gitCal). > > I queued the following near the bottom of 'pu' (these are also > merged to 'next' to keep pu^{/match.next} in sync with

[GIT GUI PATCH v2] git-gui: tolerate major version changes when comparing the git version

2014-05-17 Thread Jens Lehmann
Since git 2.0.0 starting git gui in a submodule using a gitfile fails with the following error: No working directory ../../../ couldn't change working directory to "../../../": no such file or directory This is because "git rev-parse --show-toplevel" is only run when git gui sees a g

commit all the untracked files prior adding them to stage using "git add"

2014-05-17 Thread Arup Rakshit
Here is the currently added files in my repository : arup@linux-wzza:~/Rails/test_app> git status # On branch master # # Initial commit # # Untracked files: # (use "git add ..." to include in what will be committed) # # .gitignore # Gemfile # Gemfile.lock # README.rdoc #

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-17 Thread Felipe Contreras
Jeff King wrote: > On Sat, May 17, 2014 at 12:25:30AM -0500, Felipe Contreras wrote: > > > > I agree with the line of reasoning you laid out in your email, > > > especially: > > > > What a shock. > > Please stop with these unproductive and rude comments. I am sorry, but the fact of the matter i

Re: Problem: staging of an alternative repository

2014-05-17 Thread Pasha Bolokhov
Hi again I've come up with a fix for this. It's just two and a half lines, and required more studying the code than typing. A lot of path-processing work has been implemented in "abspath.c" and "dir.c", including the symlinks and checking whether one path is a subdirectory of another.

[PATCH v3] format-patch --signature-file

2014-05-17 Thread Jeremiah Mahler
Added feature that allows a signature file to be used with format-patch. $ git format-patch --signature-file ~/.signature -1 Now signatures with newlines and other special characters can be easily included. Signed-off-by: Jeremiah Mahler --- Documentation/git-format-patch.txt | 4 buil

[PATCH v3] format-patch --signature-file

2014-05-17 Thread Jeremiah Mahler
v3 patch to add format-patch --signature-file option. This revision includes changes suggested by Jeff King: - Instead of a custom OPTION_CALLBACK, use OPT_FILENAME which correctly resolves file names which are not evaluated by the shell such as "--signature-file=" - Use str

[PATCH v3 08/10] replace: add tests for --edit

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t6050-replace.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 719a116..68b3cb2 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -318,6 +318,33 @@ test_expect_success

[PATCH v3 06/10] replace: refactor checking ref validity

2014-05-17 Thread Christian Couder
This will be useful in a following commit when we will want to check if the ref already exists before we let the user edit an object. Signed-off-by: Christian Couder --- builtin/replace.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/builti

[PATCH v3 07/10] replace: die early if replace ref already exists

2014-05-17 Thread Christian Couder
If a replace ref already exists for an object, it is much better for the user if we error out before we let the user edit the object, rather than after. Signed-off-by: Christian Couder --- builtin/replace.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/replace.c

[PATCH v3 04/10] replace: add --edit option

2014-05-17 Thread Christian Couder
From: Jeff King This allows you to run: git replace --edit SHA1 to get dumped in an editor with the contents of the object for SHA1. The result is then read back in and used as a "replace" object for SHA1. The writing/reading is type-aware, so you get to edit "ls-tree" output rather than th

[PATCH v3 00/10] replace: add option to edit a Git object

2014-05-17 Thread Christian Couder
This patch series comes from what Peff sent in the following thread: http://thread.gmane.org/gmane.comp.version-control.git/243361/focus=243528 The only changes compared to v2 are in the test (8/10) and documentation patches (10/10). Thanks to Peff. Christian Couder (6): replace: make sure --e

[PATCH v3 05/10] replace: make sure --edit results in a different object

2014-05-17 Thread Christian Couder
It's a bad idea to create a replace ref for an object that points to the original object itself. That's why we have to check if the result from editing the original object is a different object and error out if it isn't. Signed-off-by: Christian Couder --- builtin/replace.c | 3 +++ 1 file chan

[PATCH v3 10/10] Documentation: replace: describe new --edit option

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/git-replace.txt | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 0a02f70..61461b9 100644 --- a/Documentation/git-replace.txt +++ b/Documentatio

[PATCH v3 03/10] replace: factor object resolution out of replace_object

2014-05-17 Thread Christian Couder
From: Jeff King As we add new options that operate on objects before replacing them, we'll want to be able to feed raw sha1s straight into replace_object. Split replace_object into the object-resolution part and the actual replacement. Signed-off-by: Jeff King Signed-off-by: Christian Couder -

[PATCH v3 09/10] replace: add --edit to usage string

2014-05-17 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/replace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/replace.c b/builtin/replace.c index 4ee3d92..1bb491d 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -16,6 +16,7 @@ static const char * const git_replace_usage[] = {

[PATCH v3 01/10] replace: refactor command-mode determination

2014-05-17 Thread Christian Couder
From: Jeff King The git-replace command has three modes: listing, deleting, and replacing. The first two are selected explicitly. If none is selected, we fallback to listing when there are no arguments, and replacing otherwise. Let's figure out up front which operation we are going to do, before

[PATCH v3 02/10] replace: use OPT_CMDMODE to handle modes

2014-05-17 Thread Christian Couder
From: Jeff King By using OPT_CMDMODE, the mutual exclusion between modes is taken care of for us. It also makes it easy for us to maintain a single variable with the mode, which makes its intent more clear. We can use a single switch() to make sure we have covered all of the modes. This ends up

Re: [PATCH v2] format-patch --signature-file

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 06:00:14AM -0400, Jeff King wrote: > On Sat, May 17, 2014 at 01:59:11AM -0700, Jeremiah Mahler wrote: > > > > if (signature) { > > > if (signature_file) > > > die("you cannot specify both a signature and a signature-file"); > > > /* otherwise, we already hav

Re: [PATCH v10 25/44] receive-pack.c: use a reference transaction for updating the refs

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: > Wrap all the ref updates inside a transaction to make the update atomic. > > Signed-off-by: Ronnie Sahlberg > --- > builtin/receive-pack.c | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/builtin/rec

Re: [PATCH] Documentation/technical/api-hashmap: Remove source highlighting

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 07:08:55AM -0400, Anders Kaseorg wrote: > The highlighting was pretty, but unfortunately, the failure mode when > source-highlight is not installed was that the entire code block > disappears. See https://bugs.debian.org/745591, > https://bugs.launchpad.net/bugs/1316810. >

Re: [PATCH v10 24/44] fetch.c: use a single ref transaction for all ref updates

2014-05-17 Thread Michael Haggerty
On 05/17/2014 05:05 PM, Michael Haggerty wrote: > On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: >> [...] >> disk and thus we would not return STORE_REF_ERROR_DF_CONFLICT for this case. >> >> I think this new behaviour is more correct, since if there was a problem >> we would not even try to commit

Re: [PATCH v10 24/44] fetch.c: use a single ref transaction for all ref updates

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: > Change store_updated_refs to use a single ref transaction for all refs that > are updated during the fetch. This makes the fetch more atomic when update > failures occur. > > Since ref update failures will now no longer occur in the code path for >

Re: [PATCH v10 22/44] fetch.c: clear errno before calling functions that might set it

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: > In s_update_ref there are two calls that when they fail we return an error > based on the errno value. In particular we want to return a specific error > if ENOTDIR happened. Both these functions do have failure modes where they > may return an error

Re: [PATCH v10 18/44] branch.c: use ref transaction for all ref updates

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: > Change create_branch to use a ref transaction when creating the new branch. > ref_transaction_create will check that the ref does not already exist and fail > otherwise meaning that we no longer need to keep a lock on the ref during the > setup_track

Re: [PATCH v10 14/44] replace.c: use the ref transaction functions for updates

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: > Update replace.c to use ref transactions for updates. > > Signed-off-by: Ronnie Sahlberg > --- > builtin/replace.c | 14 -- > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/builtin/replace.c b/builtin/replace.c > ind

Re: [PATCH v10 13/44] tag.c: use ref transactions when doing updates

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: > Change tag.c to use ref transactions for all ref updates. > > Signed-off-by: Ronnie Sahlberg > --- > builtin/tag.c | 14 -- > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/builtin/tag.c b/builtin/tag.c > index c6e8a

Re: [PATCH v10 04/44] refs.c: add an err argument to repack_without_refs

2014-05-17 Thread Michael Haggerty
On 05/16/2014 07:36 PM, Ronnie Sahlberg wrote: > Update repack_without_refs to take an err argument and update it if there > is a failure. Pass the err variable from ref_transaction_commit to this > function so that callers can print a meaningful error message if _commit > fails due to a problem in

Re: [GIT GUI PATCH] git-gui: use vcompare when comparing the git version

2014-05-17 Thread Pat Thoyts
Junio C Hamano writes: >Junio C Hamano writes: > >> Jens Lehmann writes: >> >>> Junio, I believe this issue needs to be fixed before 2.0 final. Otherwise >>> git gui will not work inside submodules anymore due to the major version >>> number change from 1 to 2. I'd like to hear Pat's opinion on

[PATCH] Documentation/technical/api-hashmap: Remove source highlighting

2014-05-17 Thread Anders Kaseorg
The highlighting was pretty, but unfortunately, the failure mode when source-highlight is not installed was that the entire code block disappears. See https://bugs.debian.org/745591, https://bugs.launchpad.net/bugs/1316810. Signed-off-by: Anders Kaseorg --- Documentation/technical/api-hashmap.t

Re: [PATCH v2] format-patch --signature-file

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 01:59:11AM -0700, Jeremiah Mahler wrote: > > if (signature) { > > if (signature_file) > > die("you cannot specify both a signature and a signature-file"); > > /* otherwise, we already have the value */ > > } else if (signature_file) { > > struct

Re: [PATCH v2] format-patch --signature-file

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 03:42:24AM -0400, Jeff King wrote: > On Sat, May 17, 2014 at 12:25:48AM -0700, Jeremiah Mahler wrote: > > > > We have routines for reading directly into a strbuf, which eliminates > > > the need for this 1024-byte limit. We even have a wrapper that can make > > > this much

Re: [PATCH v2 1/2] t4205, t6006: Add failing tests for the case when i18n.logOutputEncoding is set

2014-05-17 Thread Alexey Shumkin
On Fri, May 16, 2014 at 11:49:40AM -0700, Junio C Hamano wrote: > Alexey Shumkin writes: > > > Pretty format string %<(N,[ml]trunc)>%s truncates subject to a given > > length with an appropriate padding. This works for non-ASCII texts when > > i18n.logOutputEncoding is UTF-8 only (independently o

Re: [PATCH v2] format-patch --signature-file

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 12:25:48AM -0700, Jeremiah Mahler wrote: > > We have routines for reading directly into a strbuf, which eliminates > > the need for this 1024-byte limit. We even have a wrapper that can make > > this much shorter: > > > > struct strbuf buf = STRBUF_INIT; > > > > strbu

Re: [PATCH v2] format-patch --signature-file

2014-05-17 Thread Jeremiah Mahler
On Fri, May 16, 2014 at 04:14:45AM -0400, Jeff King wrote: > On Thu, May 15, 2014 at 06:31:21PM -0700, Jeremiah Mahler wrote: ... > > A few questions/comments: > > > +static int signature_file_callback(const struct option *opt, const char > > *arg, > > +

Re: [PATCH v2 00/10] replace: add option to edit a Git object

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:22AM +0200, Christian Couder wrote: > This patch series comes from what Peff sent in the following thread: > > http://thread.gmane.org/gmane.comp.version-control.git/243361/focus=243528 > > The first 4 patches (1/4, 2/4, 3/4 and 4/4) didn't change since v1. > I adde

Re: [PATCH v2 10/10] Documentation: replace: describe new --edit option

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:32AM +0200, Christian Couder wrote: > @@ -63,6 +64,14 @@ OPTIONS > --delete:: > Delete existing replace refs for the given objects. > > +--edit :: > + Launch an editor to let the user change the content of > + , then create a new object of the same ty

Re: [PATCH v2 08/10] replace: add tests for --edit

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:30AM +0200, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > t/t6050-replace.sh | 29 + > 1 file changed, 29 insertions(+) Yay, tests. > +test_expect_success 'setup a fake editor' ' > + cat >fakeeditor <<-\EOF && >

Re: [PATCH v2 07/10] replace: die early if replace ref already exists

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:29AM +0200, Christian Couder wrote: > If a replace ref already exists for an object, it is > much better for the user if we error out before we > let the user edit the object, rather than after. Definitely. Code looks fine to me. -Peff -- To unsubscribe from this li

Re: [PATCH v2 05/10] replace: make sure --edit results in a different object

2014-05-17 Thread Jeff King
On Sat, May 17, 2014 at 08:41:27AM +0200, Christian Couder wrote: > It's a bad idea to create a replace ref for an object > that points to the original object itself. > > That's why we have to check if the result from editing > the original object is a different object and error out > if it isn't