Re: [PATCH v4 4/4] add: modify already added files when --chmod is given

2017-08-12 Thread Thomas Gummerer
On 08/07, René Scharfe wrote: > Am 14.09.2016 um 23:07 schrieb Thomas Gummerer: > > When the chmod option was added to git add, it was hooked up to the diff > > machinery, meaning that it only works when the version in the index > > differs from the version on disk. &

Re: [PATCH v4 5/5] stash: implement builtin stash

2017-06-27 Thread Thomas Gummerer
On Mon, Jun 26, 2017 at 8:53 AM Matthieu Moy <matthieu@grenoble-inp.fr> wrote: > > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > After the line > > > > test -n "$seen_non_option" || set "push" "$@" > > > >

Re: [PATCH v4 5/5] stash: implement builtin stash

2017-06-25 Thread Thomas Gummerer
On 06/19, Joel Teichroeb wrote: > On Sun, Jun 11, 2017 at 2:27 PM, Thomas Gummerer <t.gumme...@gmail.com> wrote: > >> + > >> +int cmd_stash(int argc, const char **argv, const char *prefix) > >> +{ > >> + int result = 0; > >> + pid_t p

Re: [PATCH v4 5/5] stash: implement builtin stash

2017-06-11 Thread Thomas Gummerer
On 06/07, Joel Teichroeb wrote: > Implement all git stash functionality as a builtin command > > Signed-off-by: Joel Teichroeb > --- Thanks for working on this. A few comments from me below. Mainly on stash push, as that's what I'm most familiar with, and all I had time

[PATCH] completion: add git stash push

2017-05-16 Thread Thomas Gummerer
When introducing git stash push in f5727e26e4 ("stash: introduce push verb", 2017-02-19), I forgot to add it to the completion code. Add it now. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- contrib/completion/git-completion.bash | 5 - 1 file changed, 4 insertion

Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX

2017-04-24 Thread Thomas Gummerer
On 04/21, Christian Couder wrote: > On Thu, Apr 20, 2017 at 11:24 PM, Thomas Gummerer <t.gumme...@gmail.com> > wrote: > > On 04/20, Christian Couder wrote: > >> > >> Could you try with the following patch: > >> > >> http://public-inbox.

Re: [BUG] test suite broken with GIT_TEST_SPLIT_INDEX

2017-04-20 Thread Thomas Gummerer
On 04/20, Christian Couder wrote: > Hi, > > On Thu, Apr 20, 2017 at 10:52 PM, Thomas Gummerer <t.gumme...@gmail.com> > wrote: > > Hi, > > > > I just tried to run the test suite with GIT_TEST_SPLIT_INDEX=YesPlease > > and noticed that a few tests are b

[BUG] test suite broken with GIT_TEST_SPLIT_INDEX

2017-04-20 Thread Thomas Gummerer
Hi, I just tried to run the test suite with GIT_TEST_SPLIT_INDEX=YesPlease and noticed that a few tests are broken both in pu and master. Below the test failures on master: Test Summary Report --- t7009-filter-branch-null-sha1.sh (Wstat: 256 Tests: 5 Failed: 2)

Re: [PATCH v11 2/5] p0006-read-tree-checkout: perf test to time read-tree

2017-04-18 Thread Thomas Gummerer
On 04/17, g...@jeffhostetler.com wrote: > From: Jeff Hostetler > > Created t/perf/repos/many-files.sh to generate large, but > artificial repositories. > > Created t/perf/p0006-read-tree-checkout.sh to measure > performance on various read-tree, checkout, and

Re: [PATCH v3 2/2] p0005-status: time status on very large repo

2017-04-06 Thread Thomas Gummerer
On 04/06, Jeff Hostetler wrote: > > > On 4/6/2017 6:14 PM, Thomas Gummerer wrote: > >On 04/06, g...@jeffhostetler.com wrote: > >>From: Jeff Hostetler <jeffh...@microsoft.com> > >> > >>Signed-off-by: Jeff Hostetler <jeffh...@micr

Re: [PATCH v3 2/2] p0005-status: time status on very large repo

2017-04-06 Thread Thomas Gummerer
On 04/06, g...@jeffhostetler.com wrote: > From: Jeff Hostetler > > Signed-off-by: Jeff Hostetler > --- > t/perf/p0005-status.sh | 61 > ++ > 1 file changed, 61 insertions(+) > create mode 100755

Re: [PATCH v3 0/2] read-cache: call verify_hdr() in a background thread

2017-03-30 Thread Thomas Gummerer
On 03/28, Jeff King wrote: > On Tue, Mar 28, 2017 at 03:50:34PM -0400, Jeff Hostetler wrote: > > > It was a convenient way to isolate, average, and compare > > read_index() times, but I suppose we could do something > > like that. > > > > I did confirm that a ls-files does show a slight 0.008 >

Re: [PATCH v2 3/3] stash: keep untracked files intact in stash -k

2017-03-22 Thread Thomas Gummerer
On 03/21, Jeff King wrote: > On Tue, Mar 21, 2017 at 10:12:19PM +0000, Thomas Gummerer wrote: > > > Currently when there are untracked changes in a file "one" and in a file > > "two" in the repository and the user uses: > > > > git stash p

Re: [PATCH v2 1/3] stash: don't show internal implementation details

2017-03-22 Thread Thomas Gummerer
On 03/21, Jeff King wrote: > On Tue, Mar 21, 2017 at 10:12:17PM +0000, Thomas Gummerer wrote: > > > git stash push uses other git commands internally. Currently it only > > passes the -q flag to those if the -q flag is passed to git stash. when > > using 'git stash pu

[PATCH v2 3/3] stash: keep untracked files intact in stash -k

2017-03-21 Thread Thomas Gummerer
en in the pathspec are changed when git stash push -k is used. Reported-by: Jeff King <p...@peff.net> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 4 +++- t/t3903-stash.sh | 14 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff

[PATCH v2 0/3] Re: [BUG] "git stash -- path" reports wrong unstaged changes

2017-03-21 Thread Thomas Gummerer
in the previous round, and now includes a test for the expected behaviour. - 3/3 is the fix for the bug Peff noticed for git stash -k with changes that are not yet in the index. Thomas Gummerer (3): stash: don't show internal implementation details stash: pass the pathspec argument to git reset stash

[PATCH v2 2/3] stash: pass the pathspec argument to git reset

2017-03-21 Thread Thomas Gummerer
ent to the git reset in question, bringing the behaviour in line with "git stash -- ". Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 2 +- t/t3904-stash-patch.sh | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/git-stas

[PATCH v2 1/3] stash: don't show internal implementation details

2017-03-21 Thread Thomas Gummerer
that the stash is created, without bothering them with the internal details of what's happening. Always pass the -q flag to the internal git clean and git reset commands, to avoid unnecessary and potentially confusing output. Reported-by: Jeff King <p...@peff.net> Signed-off-by: Thomas Gu

Re: [PATCH/RFC 3/3] stash: pass the pathspec argument to git reset

2017-03-21 Thread Thomas Gummerer
On 03/20, Jeff King wrote: > On Sun, Mar 19, 2017 at 08:23:51PM +0000, Thomas Gummerer wrote: > > > For "git stash -p --no-keep-index", the pathspec argument is currently > > not passed to "git reset". This means that changed that are staged but > > t

Re: [PATCH/RFC 1/3] stash: show less information for stash push --

2017-03-21 Thread Thomas Gummerer
On 03/20, Junio C Hamano wrote: > Jeff King writes: > > > On Mon, Mar 20, 2017 at 10:51:16AM -0700, Junio C Hamano wrote: > > > >> > diff --git a/git-stash.sh b/git-stash.sh > >> > index 9c70662cc8..59f055e27b 100755 > >> > --- a/git-stash.sh > >> > +++ b/git-stash.sh > >> > @@

Re: [BUG] "git stash -- path" reports wrong unstaged changes

2017-03-19 Thread Thomas Gummerer
ore > tomorrow :) 2/3 and 3/3 have the fixes for the above. No tests yet, as I'm not 100% sure 3/3 is doing the right thing, though I think it makes the overall experience better. Thomas Gummerer (3): stash: show less information for stash push -- stash: make push -p -q --no-keep-index

[PATCH/RFC 1/3] stash: show less information for stash push --

2017-03-19 Thread Thomas Gummerer
ithout bothering them with the internal details of what's happening. Always pass the -q flag to git clean and git reset in the pathspec case, to avoid unnecessary and potentially confusing output. Reported-by: Jeff King <p...@peff.net> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.c

[PATCH/RFC 3/3] stash: pass the pathspec argument to git reset

2017-03-19 Thread Thomas Gummerer
ent to the git reset in question, bringing the behaviour in line with "git stash -- ". Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- So this make things a bit inconsistent in for example the following situation: $ git status -s M git-stash.sh M read-cache.c

[PATCH/RFC 2/3] stash: make push -p -q --no-keep-index quiet

2017-03-19 Thread Thomas Gummerer
since "git stash save -p" was introduced in dda1f2a5 ("Implement 'git stash save --patch'", 2009-08-13). Properly pass the -q flag on to git reset, to make "git stash push -p -q" as quiet as it should be. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- gi

Re: [BUG] "git stash -- path" reports wrong unstaged changes

2017-03-18 Thread Thomas Gummerer
On 03/17, Jeff King wrote: > I used "git stash -- path" for the first time today and happened to > notice an oddity. If I run: > > git init -q repo > cd repo > > for i in one two; do > echo content >$i > git add $i > done > git

Re: GSoC 2017

2017-03-04 Thread Thomas Gummerer
On 03/04, Thomas Gummerer wrote: > Hi, > > On 03/04, Valery Tolstov wrote: > > Hi. > > > > Want to participate in GSoC 2017 with Git. > > Can I choose "Make 'git tag --contains ' less chatty" as my > > microproject? > > Feel free to choose

Re: GSoC 2017

2017-03-04 Thread Thomas Gummerer
Hi, On 03/04, Valery Tolstov wrote: > Hi. > > Want to participate in GSoC 2017 with Git. > Can I choose "Make 'git tag --contains ' less chatty" as my microproject? Feel free to choose any microproject from the list. A good way to start is to check whether other students already attempted the

Re: [PATCH v8 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-03-01 Thread Thomas Gummerer
On 02/28, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > + git reset ${GIT_QUIET:+-q} -- "$@" > > + git ls-files -z --modified -- "$@" | > > + git checkout-in

[PATCH v8 5/6] stash: use stash_push for no verb form

2017-02-28 Thread Thomas Gummerer
stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-st

[PATCH v8 2/6] stash: add test for the create command line arguments

2017-02-28 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v8 0/6] stash: support pathspec argument

2017-02-28 Thread Thomas Gummerer
echo original >expect && + test_cmp expect file && + test_cmp expect other-file && + git stash pop && + echo modified >expect && + test_cmp expect file && + test_cmp expect other-file +' + test_expect_

[PATCH v8 6/6] stash: allow pathspecs in the no verb form

2017-02-28 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 11 +++ git-stash.sh| 3 +++ t/t3903-stash.sh| 15 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentati

[PATCH v8 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-28 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 9 +++- git-stash.sh | 39 +++--

[PATCH v8 1/6] stash: introduce push verb

2017-02-28 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 3 +++ git-stash.sh

[PATCH v8 3/6] stash: refactor stash_create

2017-02-28 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 8365ebba2a..ef5d1b45be 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -58,8

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Thomas Gummerer
On 02/27, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > + test -n "$untracked" || git ls-files --error-unmatch -- "$@" >/dev/null > > || exit 1 > > This silent "exit 1" made me scratch my head,

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Thomas Gummerer
On 02/27, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > if test -z "$patch_mode" > > then > > - git reset --hard ${GIT_QUIET:+-q} > > + if test $# != 0 > > + th

[PATCH v7 5/6] stash: use stash_push for no verb form

2017-02-25 Thread Thomas Gummerer
stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-st

[PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-25 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 9 - git-stash.sh | 37 ++

[PATCH v7 1/6] stash: introduce push verb

2017-02-25 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 3 +++ git-stash.sh

[PATCH v7 0/6] stash: support pathspec argument

2017-02-25 Thread Thomas Gummerer
athspec shows no changes when there are none' ' - >file && - git add file && - git stash push not-file >actual && + >foo && + git add foo && + git commit -m "tmp" && + git stash push foo &

[PATCH v7 6/6] stash: allow pathspecs in the no verb form

2017-02-25 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 11 +++ git-stash.sh| 3 +++ t/t3903-stash.sh| 15 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentati

[PATCH v7 3/6] stash: refactor stash_create

2017-02-25 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 8365ebba2a..ef5d1b45be 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -58,8

[PATCH v7 2/6] stash: add test for the create command line arguments

2017-02-25 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

Re: [PATCH v6 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-25 Thread Thomas Gummerer
On 02/21, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > - git reset --hard ${GIT_QUIET:+-q} > > This hunk is probably the most important one to review in the whole > series, in the sense that these are entirely new code that did

Re: [PATCH v6 0/6] stash: support pathspec argument

2017-02-25 Thread Thomas Gummerer
On 02/20, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > @@ -55,10 +53,13 @@ push [-p|--patch] [-k|--[no-]keep-index] > > [-u|--include-untracked] [-a|--all] [-q > > > > Save your local modifications to a new 'stash

[PATCH v6 6/6] stash: allow pathspecs in the no verb form

2017-02-19 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 11 +++ git-stash.sh| 3 +++ t/t3903-stash.sh| 15 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentati

[PATCH v6 1/6] stash: introduce push verb

2017-02-19 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 3 +++ git-stash.sh

[PATCH v6 3/6] stash: refactor stash_create

2017-02-19 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 8365ebba2a..ef5d1b45be 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -58,8

[PATCH v6 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-19 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 9 - git-stash.sh

[PATCH v6 5/6] stash: use stash_push for no verb form

2017-02-19 Thread Thomas Gummerer
stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-st

[PATCH v6 2/6] stash: add test for the create command line arguments

2017-02-19 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v6 0/6] stash: support pathspec argument

2017-02-19 Thread Thomas Gummerer
untracked=${1-"BUG: create_stash () -u requires an argument"} + untracked=${1?"BUG: create_stash () -u requires an argument"} ;; --) shift Thomas Gummerer (6): stash: introduce push verb stash: add te

Re: [PATCH v5 6/6] stash: allow pathspecs in the no verb form

2017-02-19 Thread Thomas Gummerer
On 02/17, Jeff King wrote: > On Fri, Feb 17, 2017 at 10:41:41PM +0000, Thomas Gummerer wrote: > > > Now that stash_push is used in the no verb form of stash, allow > > specifying the command line for this form as well. Always use -- to > > disambiguate pathspecs from ot

Re: [PATCH v5 3/6] stash: refactor stash_create

2017-02-19 Thread Thomas Gummerer
On 02/17, Jeff King wrote: > On Fri, Feb 17, 2017 at 10:41:38PM +0000, Thomas Gummerer wrote: > > > Refactor the internal stash_create function to use a -m flag for > > specifying the message and -u flag to indicate whether untracked files > > should be added to the st

Re: [PATCH v5 0/6] stash: support pathspec argument

2017-02-17 Thread Thomas Gummerer
On 02/17, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > [some people may see this message twice, as I forgot to check if the > copy I received had "Some A . Body" not enclosed in dq; blindly > doing "Reply-All" ended up

Re: [PATCH v5 0/6] stash: support pathspec argument

2017-02-17 Thread Thomas Gummerer
On 02/17, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Thanks Matthieu, Peff and Junio for the discussion on v3 and v4. > > > > Changes since v4: > > Dropped patch 1 from the series, as it's already in master > > >

[PATCH v5 5/6] stash: use stash_push for no verb form

2017-02-17 Thread Thomas Gummerer
stash: simplify defaulting to "save" and reject unknown options"). However it was never the intent to allow that, but rather it was allowed accidentally. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 8 git-st

[PATCH v5 0/6] stash: support pathspec argument

2017-02-17 Thread Thomas Gummerer
foo && - git add foo && - STASH_ID=$(git stash create -m "create test message new style") && - echo "On master: create test message new style" >expect && - git show --pretty=%s -s ${STASH_ID} >actual &&

[PATCH v5 6/6] stash: allow pathspecs in the no verb form

2017-02-17 Thread Thomas Gummerer
-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 3 +++ t/t3903-stash.sh | 15 +++ 2 files changed, 18 insertions(+) diff --git a/git-stash.sh b/git-stash.sh index 2a33614cb7..1446fbe2e8 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -667,12 +

[PATCH v5 3/6] stash: refactor stash_create

2017-02-17 Thread Thomas Gummerer
the same. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 1 + git-stash.sh| 23 +++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt

[PATCH v5 1/6] stash: introduce push verb

2017-02-17 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 46 +

[PATCH v5 2/6] stash: add test for the create command line arguments

2017-02-17 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v5 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-17 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 11 ++ git-stash.sh

Re: [PATCH v4 4/7] stash: introduce new format create

2017-02-14 Thread Thomas Gummerer
On 02/14, Matthieu Moy wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > create_stash () { > > - stash_msg="$1" > > - untracked="$2" > > + stash_msg= > > + untracked= > > + new_style= > > + whi

Re: [PATCH v3 0/5] stash: support pathspec argument

2017-02-14 Thread Thomas Gummerer
On 02/14, Matthieu Moy wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > I'm almost convinced of special casing "-p". (Maybe I'm easy to > > convince as well, because it would be convenient ;) ) However it's a > > bit weird that now "git

Re: [PATCH v3 4/5] stash: introduce new format create

2017-02-14 Thread Thomas Gummerer
On 02/13, Jeff King wrote: > On Mon, Feb 13, 2017 at 04:57:34PM -0500, Jeff King wrote: > > > Yeah, I think your patch is actually fixing that case. But your search > > is only part of the story. You found somebody using "-m" explicitly, but > > what about somebody blindly calling: > > > > git

Re: [PATCH v3 0/5] stash: support pathspec argument

2017-02-13 Thread Thomas Gummerer
On 02/13, Jeff King wrote: > On Mon, Feb 13, 2017 at 10:35:31PM +0100, Matthieu Moy wrote: > > > > Is it really that dangerous, though? The likely outcome is Git saying > > > "nope, you don't have any changes to the file named drop". Of course the > > > user may have meant something different,

Re: [PATCH v3 2/5] stash: introduce push verb

2017-02-13 Thread Thomas Gummerer
On 02/13, Matthieu Moy wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Introduce a new git stash push verb in addition to git stash save. The > > push verb is used to transition from the current command line arguments > > to a more conventional way,

Re: [PATCH v4 0/7] stash: support pathspec argument

2017-02-12 Thread Thomas Gummerer
On 02/12, Thomas Gummerer wrote: > Thanks Peff and Junio for the review of the last round. > Sorry it seems like I messed up the In-Reply-To header. Previous rounds were at: v1: http://public-inbox.org/git/20170121200804.19009-1-t.gumme...@gmail.com/ v2: http://public-inbox.o

[PATCH v4 3/7] stash: add test for the create command line arguments

2017-02-12 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v4 4/7] stash: introduce new format create

2017-02-12 Thread Thomas Gummerer
this change, it created a stash with the message "-m works", but now it creates a stash with the message "-m". Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 1 + git-stash.sh| 52 +

[PATCH v4 5/7] stash: teach 'push' (and 'create') to honor pathspec

2017-02-12 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 11 ++ git-stash.sh

[PATCH v4 6/7] stash: use stash_push for no verb form

2017-02-12 Thread Thomas Gummerer
something with a message, but changes their mind, and now would like to apply a stash, but forgets to remove the -m flag. E.g. git stash -m mes^H^H^Happly would result in a stash with the message apply, while the user might have intended to apply a previous stash. Signed-off-by: Thomas Gummerer <t.gu

[PATCH v4 7/7] stash: allow pathspecs in the no verb form

2017-02-12 Thread Thomas Gummerer
Now that stash_push is used in the no verb form of stash, allow specifying the command line for this form as well. Always use -- to disambiguate pathspecs from other non-option arguments. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 1 + t/t3903-stash.s

[PATCH v4 0/7] stash: support pathspec argument

2017-02-12 Thread Thomas Gummerer
amp;& + >untracked && + git stash push file && test_path_is_file untracked ' +test_expect_success 'stash without verb with pathspec' ' + >"foo bar" && + >foo && + >bar && + git add foo* &

[PATCH v4 2/7] stash: introduce push verb

2017-02-12 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 46 +

[PATCH v4 1/7] Documentation/stash: remove mention of git reset --hard

2017-02-12 Thread Thomas Gummerer
to a few files is introduced. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 2e9cef06e6..2e9e344cd7 100644 --- a/Documen

Re: [PATCH v3 0/5] stash: support pathspec argument

2017-02-12 Thread Thomas Gummerer
[+cc Matthieu Moy as author of a patch mentioned below] On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:37PM +0000, Thomas Gummerer wrote: > > > Thanks Junio for the review in the previous round. > > > > Changes since v2: > > > > - $

Re: [PATCH v3 5/5] stash: teach 'push' (and 'create') to honor pathspec

2017-02-11 Thread Thomas Gummerer
On 02/05, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > @@ -72,6 +72,11 @@ create_stash () { > > untracked="$1" > > new_style=t > > ;; >

Re: [PATCH v3 4/5] stash: introduce new format create

2017-02-11 Thread Thomas Gummerer
On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:41PM +0000, Thomas Gummerer wrote: > > > git stash create currently supports a positional argument for adding a > > message. This is not quite in line with how git commands usually take > > comments (using a -m f

Re: [PATCH v3 3/5] stash: add test for the create command line arguments

2017-02-11 Thread Thomas Gummerer
On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:40PM +0000, Thomas Gummerer wrote: > > > +test_expect_success 'create stores correct message' ' > > + >foo && > > + git add foo && > > + STASH_ID=$(git stash create "create

Re: [PATCH v3 2/5] stash: introduce push verb

2017-02-11 Thread Thomas Gummerer
[sorry for the late responses, life is keeping me busy] On 02/06, Jeff King wrote: > On Sun, Feb 05, 2017 at 08:26:39PM +0000, Thomas Gummerer wrote: > > > + -m|--message) > > + shift > > + stash_msg=$

[PATCH v3 2/5] stash: introduce push verb

2017-02-05 Thread Thomas Gummerer
line arguments like other Git commands do, so that the user can say which subset of paths to stash (and leave others behind). Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh | 46 +

[PATCH v3 1/5] Documentation/stash: remove mention of git reset --hard

2017-02-05 Thread Thomas Gummerer
to a few files is introduced. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 2e9cef06e6..2e9e344cd7 100644 --- a/Documen

[PATCH v3 0/5] stash: support pathspec argument

2017-02-05 Thread Thomas Gummerer
ed.sh index f372fc8ca8..9a98e31a3e 100755 --- a/t/t3905-stash-include-untracked.sh +++ b/t/t3905-stash-include-untracked.sh @@ -185,4 +185,30 @@ test_expect_success 'stash save --all is stash poppable' ' test -s .gitignore ' +test_expect_success 'stash push --include-untracked with path

[PATCH v3 3/5] stash: add test for the create command line arguments

2017-02-05 Thread Thomas Gummerer
Currently there is no test showing the expected behaviour of git stash create's command line arguments. Add a test for that to show the current expected behaviour and to make sure future refactorings don't break those expectations. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>

[PATCH v3 4/5] stash: introduce new format create

2017-02-05 Thread Thomas Gummerer
git stash create with positional arguments. This also adds a -u argument, for untracked files. This is already used internally as another positional argument, but can now be used from the command line. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.tx

[PATCH v3 5/5] stash: teach 'push' (and 'create') to honor pathspec

2017-02-05 Thread Thomas Gummerer
files. Allow 'git stash push' to take pathspec to specify which paths to stash. Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt| 11 ++ git-stash.sh

Re: [PATCH v2 1/4] Documentation/stash: remove mention of git reset --hard

2017-02-05 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Don't mention git reset --hard in the documentation for git stash save. > > It's an implementation detail that doesn't matter to the end user and > > thus shouldn't be e

Re: [PATCH v2 4/4] stash: support filename argument

2017-02-05 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Add an optional filename argument to git stash push, which allows for > > stashing a single (or multiple) files. > > You can give pathspec with one or more elements, so "

Re: [PATCH v2 3/4] introduce new format for git stash create

2017-02-04 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > create_stash () { > > - stash_msg="$1" > > - untracked="$2" > > + stash_msg= > > + untracked= > > + new_style= &g

Re: [PATCH v2 2/4] stash: introduce push verb

2017-02-04 Thread Thomas Gummerer
On 01/30, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > Introduce a new git stash push verb in addition to git stash save. The > > push verb is used to transition from the current command line arguments > > to a more conventi

[PATCH v2 4/4] stash: support filename argument

2017-01-29 Thread Thomas Gummerer
files. Add an optional filename argument to git stash push, which allows for stashing a single (or multiple) files. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 9 + git-stash.sh| 30 +++--- t

[PATCH v2 2/4] stash: introduce push verb

2017-01-29 Thread Thomas Gummerer
filename argument to stash single files. Using that as a positional argument is much more consistent with the rest of git, than using the positional argument for the message. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- git-stash.sh

[PATCH v2 1/4] Documentation/stash: remove mention of git reset --hard

2017-01-29 Thread Thomas Gummerer
to a few files is introduced. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 2e9cef06e6..0fc23c25ee 100644 --- a/Documen

[PATCH v2 0/4] stash: create filename argument

2017-01-29 Thread Thomas Gummerer
uot; >expect && + git show --pretty=%s ${STASH_ID} | head -n1 >actual && + test_cmp expect actual +' + test_expect_success 'stash -- stashes and restores the file' ' >foo && >bar && @@ -811,4 +829,19 @@ test_expect_success 'stash with

[PATCH v2 3/4] introduce new format for git stash create

2017-01-29 Thread Thomas Gummerer
git stash create with positional arguments. This also adds a -u argument, for untracked files. This is already used internally as another positional argument, but can now be used from the command line. Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- Documentation/git-stash.tx

Re: [PATCH 3/3] stash: support filename argument

2017-01-29 Thread Thomas Gummerer
On 01/23, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > diff --git a/git-stash.sh b/git-stash.sh > > index d6b4ae3290..7dcce629bd 100755 > > --- a/git-stash.sh > > +++ b/git-stash.sh > > @@ -41,7 +41,7 @@ no_changes () {

Re: [PATCH 2/3] stash: introduce push verb

2017-01-29 Thread Thomas Gummerer
On 01/23, Junio C Hamano wrote: > Thomas Gummerer <t.gumme...@gmail.com> writes: > > > + stash_msg="$*" > > + > > + if test -z stash_msg > > A dollar-sign is missing here, I think. Yes, thanks. > > + then > > + push_s

<    1   2   3   4   5   6   7   8   9   >