On 10/4/2014 1:42 AM, Junio C Hamano wrote:
Matthieu Moy matthieu@grenoble-inp.fr writes:
Junio C Hamano gits...@pobox.com writes:
Well, the normal use-case for unset.variable is to put it in a local
config file, to unset a variable set in another, lower-priority file.
I agree that is
On Mon, Oct 6, 2014 at 11:59 AM, Tanay Abhra tanay...@gmail.com wrote:
3 Special case unset.variable, so that git config unset.variable foo.baz
pastes it on the top of the file. The implementation should be trivial, but,
Junio had said in an earlier mail that he doesn't think this approach
On 10/7/2014 12:58 AM, Junio C Hamano wrote:
The point is to preventgit config --add foo.baz anothervalue starting from
--- --- ---
[foo]
bar = some
[unset] variable = foo.baz
--- --- ---
from adding foo.baz next to existing foo.bar. We would want to end up with
--- --- ---
Junio C Hamano gits...@pobox.com writes:
Tanay Abhra tanay...@gmail.com writes:
I can think of two solutions, one leave it as it is and advertise it to be
explicitly typed in the config files at the appropriate position or to change
the behavior of unset.variable to unset all matching
Matthieu Moy matthieu@grenoble-inp.fr writes:
Junio C Hamano gits...@pobox.com writes:
...
Off the top of my head, from an end-user's point of view, something
like this would give a behaviour that is at least understandable:
Let's make sure we have the same starting point (i.e.
Junio C Hamano gits...@pobox.com writes:
That is why I said unset.variable is unworkable with existing git
config command line. Always appending at the end is usable for
ordinary variables, but for unset.variable, it is most likely the
least useful thing to do. You can explain among 47
Junio C Hamano gits...@pobox.com writes:
The git config [--add] section.var value UI, [...] finds the var = value
definition at the end (or adds a section at the end and then adds
[...]
It is fine for single-valued ones that follow the last one wins
semantics; git config would add the new
Matthieu Moy matthieu@grenoble-inp.fr writes:
Junio C Hamano gits...@pobox.com writes:
The git config [--add] section.var value UI, [...] finds the var = value
definition at the end (or adds a section at the end and then adds
[...]
It is fine for single-valued ones that follow the last
Helped-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
t/t1300-repo-config.sh | 54 ++
1 file changed, 54 insertions(+)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index ce5ea01..f75c001
Tanay Abhra tanay...@gmail.com writes:
+test_expect_success 'document how unset.variable will behave in shell
scripts' '
+ rm -f .git/config
+ cat expect -\EOF
+ EOF
+ git config foo.bar boz1
+ git config --add foo.bar boz2
+ git config unset.variable foo.bar
On 10/3/2014 1:39 AM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
+test_expect_success 'document how unset.variable will behave in shell
scripts' '
+rm -f .git/config
+cat expect -\EOF
+EOF
+git config foo.bar boz1
+git config --add foo.bar boz2
Tanay Abhra tanay...@gmail.com writes:
On 10/3/2014 1:39 AM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
+test_expect_success 'document how unset.variable will behave in shell
scripts' '
+ rm -f .git/config
+ cat expect -\EOF
+ EOF
+ git config foo.bar boz1
On 10/3/2014 1:53 AM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
On 10/3/2014 1:39 AM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
+test_expect_success 'document how unset.variable will behave in shell
scripts' '
+ rm -f .git/config
+ cat expect
Tanay Abhra tanay...@gmail.com writes:
I can think of two solutions, one leave it as it is and advertise it to be
explicitly typed in the config files at the appropriate position or to change
the behavior of unset.variable to unset all matching variables in that file,
before and after. We
14 matches
Mail list logo