Re: [PATCH] rev-parse: rev-parse: add --is-shallow-repository

2017-09-19 Thread Øystein Walle
> Hm, can you say more about the context? From a certain point of view, > it might make sense for that command to succeed instead: if the repo > is already unshallow, then why should't "fetch --unshallow" complain > instead of declaring victory? A fellow in #git on Freenode was writing a script

Re: [PATCH] rev-parse: rev-parse: add --is-shallow-repository

2017-09-18 Thread Junio C Hamano
Jonathan Nieder writes: >> test_expect_success 'showing the superproject correctly' ' > > With the two tweaks mentioned above, > Reviewed-by: Jonathan Nieder I agree with the fixes to the test titles suggested, so I'll queue the patch with the fixes

Re: [PATCH] rev-parse: rev-parse: add --is-shallow-repository

2017-09-18 Thread Jonathan Nieder
Hi, Øystein Walle wrote: > Running `git fetch --unshallow` on a repo that is not in fact shallow > produces a fatal error message. Hm, can you say more about the context? From a certain point of view, it might make sense for that command to succeed instead: if the repo is already unshallow,

[PATCH] rev-parse: rev-parse: add --is-shallow-repository

2017-09-18 Thread Øystein Walle
Running `git fetch --unshallow` on a repo that is not in fact shallow produces a fatal error message. Add a helper to rev-parse that scripters can use to determine whether a repo is shallow or not. Signed-off-by: Øystein Walle --- Documentation/git-rev-parse.txt | 3 +++