Question

For example, in Git, when I run git status, I see whether there are any untracked files in my working dir.

How do I check whether there are untracked files with darcs?

(I'm using darcs-2.1.2.)

Was it helpful?

Solution

darcs whatsnew (which can be abbreviated to just darcs wh or darcs wha) is equivalent to git diff (keep in mind, though, that darcs has no concept of Git index).

darcs whatsnew -ls(same as --look-for-adds --summary) is closer to git status, giving an overview of changes in the working directory:

helm:myproj oleg$ darcs wha -ls
M ./basicmodule.py -2 +1
A ./newfile.py
a ./temp.txt

OTHER TIPS

(Found the answer at http://irclog.perlgeek.de/darcs/2009-04-01.)

darcs whatsnew -l

According to darcs whatsnew --help:

-l  --look-for-adds       look for (non-boring) files that could be added

Bare darcs whatsnew prints a huge output with the diffs (if there are a lot of diffs), so that even if the info was there, I couldn't see it, but this option is nice.

For example:

/etc/modprobe.d # darcs init
/etc/modprobe.d # darcs add -r .
/etc/modprobe.d # darcs whatsnew -l
A ./aliases
A ./alsa-modindex
A ./alsa-modindex.rpmnew
A ./arch
A ./blacklist
A ./blacklist-cups
A ./blacklist-edac
A ./blacklist-framebuffer
A ./blacklist-hwmon
A ./blacklist-net
A ./blacklist-watchdog
A ./install
A ./isapnp
A ./options
A ./oss
/etc/modprobe.d # darcs remove ./alsa-modindex.rpmnew
/etc/modprobe.d # darcs whatsnew -l
A ./aliases
A ./alsa-modindex
A ./arch
A ./blacklist
A ./blacklist-cups
A ./blacklist-edac
A ./blacklist-framebuffer
A ./blacklist-hwmon
A ./blacklist-net
A ./blacklist-watchdog
A ./install
A ./isapnp
A ./options
A ./oss
a ./alsa-modindex.rpmnew
/etc/modprobe.d # 

So, a small "a" is for untracked files. Big "A" is probably for the ones added, but not recorded, is it?

Yes, it is. After I ran darcs record, only the untracked one remains:

/etc/modprobe.d # darcs whatsnew -l
a ./alsa-modindex.rpmnew
/etc/modprobe.d # 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top